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 43 alized">..<h2>TC
0150: 4c 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 65 6e 63 72 ibrary..for encr
01e0: 79 70 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64 ypted socket and
01f0: 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d I/O channel com
0200: 6d 75 6e 69 63 61 74 69 6f 6e 73 2e 3c 2f 64 64 munications.</dd
0210: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 >. </dl>.
0220: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 </dd>. <dd><a
0230: 20 68 72 65 66 3d 22 23 53 59 4e 4f 50 53 49 53 href="#SYNOPSIS
0240: 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 20 3c ">SYNOPSIS</a> <
0250: 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 64 6c /dd>. <dd><dl
0260: 3e 0a 09 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 >..<dd><b>packag
0270: 65 20 72 65 71 75 69 72 65 20 54 63 6c 3c 2f 62 e require Tcl</b
0280: 3e 20 3c 65 6d 3e 3f 3c 62 3e 38 2e 35 2d 3c 2f > <em>?<b>8.5-</
0290: 62 3e 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c b>?</em></dd>..<
02a0: 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 dd><b>package re
02b0: 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e 20 3c 65 quire tls</b> <e
02c0: 6d 3e 3f 3c 62 3e 31 2e 38 2d 3c 2f 62 3e 3f 3c m>?<b>1.8-</b>?<
02d0: 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 26 /em></dd>..<dt>&
02e0: 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 3c 64 64 3e nbsp;</dt>..<dd>
02f0: 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e <b>tls::init</b>
0300: 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f <em>?options?</
0310: 65 6d 3e 20 3c 2f 64 64 3e 0a 09 3c 64 64 3e 3c em> </dd>..<dd><
0320: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 b>tls::socket</b
0330: 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 20 > <em>?options?
0340: 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f host port</em></
0350: 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74 6c 73 3a dd>..<dd><b>tls:
0360: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e :socket</b> <em>
0370: 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 ?-server command
0380: 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 ? ?options? port
0390: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c 64 64 3e </em></dd>..<dd>
03a0: 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b <b>tls::handshak
03b0: 65 3c 2f 62 3e 20 3c 65 6d 3e 20 63 68 61 6e 6e e</b> <em> chann
03c0: 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c 64 el</em></dd>..<d
03d0: 64 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75 73 d><b>tls::status
03e0: 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d 6c 6f 63 61 6c </b> <em>?-local
03f0: 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f ? channel</em></
0400: 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74 6c 73 3a dd>..<dd><b>tls:
0410: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 :connection</b>
0420: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e <em>channel</em>
0430: 3c 2f 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74 6c </dd>..<dd><b>tl
0440: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 s::import</b> <e
0450: 6d 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f m>channel ?optio
0460: 6e 73 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c ns?</em></dd>..<
0470: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 dd><b>tls::unimp
0480: 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e ort</b> <em>chan
0490: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c nel</em></dd>..<
04a0: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 dt> </dt>..
04b0: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68 <dd><b>tls::ciph
04c0: 65 72 73 3c 2f 62 3e 20 3c 65 6d 3e 3f 70 72 6f ers</b> <em>?pro
04d0: 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f tocol? ?verbose?
04e0: 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f 65 6d ?supported?</em
04f0: 3e 3c 2f 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74 ></dd>..<dd><b>t
0500: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 ls::protocols</b
0510: 3e 3c 2f 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74 ></dd>..<dd><b>t
0520: 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c ls::version</b><
0530: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 3c 2f /dd>. </dl></
0540: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 dd>. <dd><a h
0550: 72 65 66 3d 22 23 43 4f 4d 4d 41 4e 44 53 22 3e ref="#COMMANDS">
0560: 43 4f 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 64 64 COMMANDS</a></dd
0570: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 >. <dd><a hre
0580: 66 3d 22 23 43 45 52 54 49 46 49 43 41 54 45 20 f="#CERTIFICATE
0590: 56 41 4c 49 44 41 54 49 4f 4e 22 3e 43 45 52 54 VALIDATION">CERT
05a0: 49 46 49 43 41 54 45 20 56 41 4c 49 44 41 54 49 IFICATE VALIDATI
05b0: 4f 4e 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 ON</a></dd>.
05c0: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 41 <dd><a href="#CA
05d0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e LLBACK OPTIONS">
05e0: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
05f0: 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 </a></dd>. <d
0600: 64 3e 3c 61 20 68 72 65 66 3d 22 23 44 45 42 55 d><a href="#DEBU
0610: 47 22 3e 44 45 42 55 47 3c 2f 61 3e 3c 2f 64 64 G">DEBUG</a></dd
0620: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 >. <dd><a hre
0630: 66 3d 22 23 48 54 54 50 53 20 45 58 41 4d 50 4c f="#HTTPS EXAMPL
0640: 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c 45 E">HTTPS EXAMPLE
0650: 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 </a></dd>. <d
0660: 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 50 45 43 d><a href="#SPEC
0670: 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f IAL CONSIDERATIO
0680: 4e 53 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53 NS">SPECIAL CONS
0690: 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f IDERATIONS</a></
06a0: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 dd>. <dd><a h
06b0: 72 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e ref="#SEE ALSO">
06c0: 53 45 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 SEE ALSO</a></dd
06d0: 3e 0a 3c 2f 64 6c 3e 0a 3c 62 72 3e 0a 0a 3c 68 >.</dl>.<br>..<h
06e0: 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d r>..<h3><a name=
06f0: 22 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 3e 3c "NAME">NAME</a><
0700: 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 /h3>..<p><strong
0710: 3e 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 2d 20 >tls</strong> -
0720: 62 69 6e 64 69 6e 67 20 74 6f 20 3c 73 74 72 6f binding to <stro
0730: 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f ng>OpenSSL</stro
0740: 6e 67 3e 20 6c 69 62 72 61 72 79 0a 66 6f 72 20 ng> library.for
0750: 65 6e 63 72 79 70 74 65 64 20 73 6f 63 6b 65 74 encrypted socket
0760: 20 61 6e 64 20 49 2f 4f 20 63 68 61 6e 6e 65 6c and I/O channel
0770: 20 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 2e communications.
0780: 3c 2f 70 3e 0a 3c 62 72 3e 0a 0a 3c 68 72 3e 0a </p>.<br>..<hr>.
0790: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 59 .<h3><a name="SY
07a0: 4e 4f 50 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 NOPSIS">SYNOPSIS
07b0: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 62 </a></h3>..<p><b
07c0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 >package require
07d0: 20 54 63 6c 3c 2f 62 3e 20 3c 65 6d 3e 3f 3c 62 Tcl</b> <em>?<b
07e0: 3e 38 2e 35 2d 3c 2f 62 3e 3f 3c 2f 65 6d 3e 3c >8.5-</b>?</em><
07f0: 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 67 65 20 72 br>.<b>package r
0800: 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e 20 3c equire tls</b> <
0810: 65 6d 3e 3f 3c 62 3e 31 2e 38 2d 3c 2f 62 3e 3f em>?<b>1.8-</b>?
0820: 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c </em><br>.<br>.<
0830: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6e a href="#tls::in
0840: 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 it"><b>tls::init
0850: 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 </b> <i>?options
0860: 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 ?</i></a><br>.<a
0870: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 href="#tls::soc
0880: 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 ket"><b>tls::soc
0890: 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 ket</b> <i>?opti
08a0: 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f ons? host port</
08b0: 69 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 i><br>.<a href="
08c0: 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 #tls::socket"><b
08d0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e >tls::socket</b>
08e0: 20 3c 69 3e 3f 2d 73 65 72 76 65 72 20 63 6f 6d <i>?-server com
08f0: 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 mand? ?options?
0900: 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e port</i></a><br>
0910: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
0920: 73 74 61 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a status"><b>tls::
0930: 73 74 61 74 75 73 3c 2f 62 3e 20 3c 69 3e 3f 2d status</b> <i>?-
0940: 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f local? channel</
0950: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
0960: 65 66 3d 22 23 74 6c 73 3a 3a 63 6f 6e 6e 65 63 ef="#tls::connec
0970: 74 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 63 6f tion"><b>tls::co
0980: 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 3e nnection</b> <i>
0990: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c channel</i></a><
09a0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
09b0: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 22 3e 3c 62 s::handshake"><b
09c0: 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c >tls::handshake<
09d0: 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f /b> <i>channel</
09e0: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
09f0: 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 ef="#tls::import
0a00: 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 "><b>tls::import
0a10: 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 20 </b> <i>channel
0a20: 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 ?options?</i></a
0a30: 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 ><br>.<a href="#
0a40: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c tls::unimport"><
0a50: 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c b>tls::unimport<
0a60: 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f /b> <i>channel</
0a70: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a i></a><br>.<br>.
0a80: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 <a href="#tls::c
0a90: 69 70 68 65 72 73 22 3e 3c 62 3e 74 6c 73 3a 3a iphers"><b>tls::
0aa0: 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c 69 3e 3f ciphers</b> <i>?
0ab0: 70 72 6f 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f protocol? ?verbo
0ac0: 73 65 3f 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c se? ?supported?<
0ad0: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 /i></a><br>.<a h
0ae0: 72 65 66 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f ref="#tls::proto
0af0: 63 6f 6c 73 22 3e 3c 62 3e 74 6c 73 3a 3a 70 72 cols"><b>tls::pr
0b00: 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c otocols</b></a><
0b10: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0b20: 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74 s::version"><b>t
0b30: 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c ls::version</b><
0b40: 2f 61 3e 3c 62 72 3e 0a 3c 2f 70 3e 0a 3c 62 72 /a><br>.</p>.<br
0b50: 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 >..<hr>..<h3><a
0b60: 6e 61 6d 65 3d 22 44 45 53 43 52 49 50 54 49 4f name="DESCRIPTIO
0b70: 4e 22 3e 44 45 53 43 52 49 50 54 49 4f 4e 3c 2f N">DESCRIPTION</
0b80: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 a></h3>..<p>This
0b90: 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 extension provi
0ba0: 64 65 73 20 54 43 4c 20 73 63 72 69 70 74 20 61 des TCL script a
0bb0: 63 63 65 73 73 20 74 6f 20 73 65 63 75 72 65 20 ccess to secure
0bc0: 73 6f 63 6b 65 74 20 63 6f 6d 6d 75 6e 69 63 61 socket communica
0bd0: 74 69 6f 6e 73 0a 75 73 69 6e 67 20 74 68 65 20 tions.using the
0be0: 54 72 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 Transport Layer
0bf0: 53 65 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 Security (TLS) p
0c00: 72 6f 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76 rotocol. It prov
0c10: 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 0a 62 ides a generic.b
0c20: 69 6e 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65 inding to <a hre
0c30: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f f="https://www.o
0c40: 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 penssl.org/">Ope
0c50: 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a nSSL</a>, utiliz
0c60: 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e ing the.<strong>
0c70: 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c Tcl_StackChannel
0c80: 3c 2f 73 74 72 6f 6e 67 3e 20 41 50 49 20 69 6e </strong> API in
0c90: 20 54 43 4c 20 38 2e 34 20 61 6e 64 20 68 69 67 TCL 8.4 and hig
0ca0: 68 65 72 2e 0a 54 68 65 73 65 20 73 6f 63 6b 65 her..These socke
0cb0: 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74 6c ts behave exactl
0cc0: 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 63 68 y the same as ch
0cd0: 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 annels created u
0ce0: 73 69 6e 67 20 74 68 65 20 62 75 69 6c 74 2d 69 sing the built-i
0cf0: 6e 0a 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 n.<strong>socket
0d00: 3c 2f 73 74 72 6f 6e 67 3e 20 63 6f 6d 6d 61 6e </strong> comman
0d10: 64 2c 20 61 6c 6f 6e 67 20 77 69 74 68 20 61 64 d, along with ad
0d20: 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 ditional options
0d30: 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 for controlling
0d40: 0a 74 68 65 20 53 53 4c 2f 54 4c 53 20 73 65 73 .the SSL/TLS ses
0d50: 73 69 6f 6e 2e 0a 3c 2f 70 3e 0a 3c 62 72 3e 0a sion..</p>.<br>.
0d60: 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 .<hr>..<h3><a na
0d70: 6d 65 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f me="COMMANDS">CO
0d80: 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a MMANDS</a></h3>.
0d90: 0a 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e .<p>Typically on
0da0: 65 20 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 e would use the
0db0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 <strong>tls::soc
0dc0: 6b 65 74 20 3c 2f 73 74 72 6f 6e 67 3e 63 6f 6d ket </strong>com
0dd0: 6d 61 6e 64 0a 77 68 69 63 68 20 70 72 6f 76 69 mand.which provi
0de0: 64 65 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 des compatibilit
0df0: 79 20 77 69 74 68 20 74 68 65 20 6e 61 74 69 76 y with the nativ
0e00: 65 20 54 43 4c 20 3c 73 74 72 6f 6e 67 3e 73 6f e TCL <strong>so
0e10: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f cket</strong>.co
0e20: 6d 6d 61 6e 64 2e 20 49 6e 20 73 75 63 68 20 63 mmand. In such c
0e30: 61 73 65 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 ases <strong>tls
0e40: 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 ::import</strong
0e50: 3e 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 0a > should not be.
0e60: 75 73 65 64 20 64 69 72 65 63 74 6c 79 2e 3c 2f used directly.</
0e70: 70 3e 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e p>.<dl>. <dt>
0e80: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e <a name="tls::in
0e90: 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 it"><b>tls::init
0ea0: 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f 6e 73 </b><i>?options
0eb0: 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 ?</i></a></dt>.
0ec0: 20 20 20 3c 64 64 3e 4f 70 74 69 6f 6e 61 6c 20 <dd>Optional
0ed0: 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 function to set
0ee0: 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 the default opti
0ef0: 6f 6e 73 20 75 73 65 64 20 62 79 0a 09 3c 73 74 ons used by..<st
0f00: 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 rong>tls::socket
0f10: 3c 2f 73 74 72 6f 6e 67 3e 2e 20 49 66 20 79 6f </strong>. If yo
0f20: 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 u call <strong>t
0f30: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f ls::import</stro
0f40: 6e 67 3e 0a 09 64 69 72 65 63 74 6c 79 2c 20 74 ng>..directly, t
0f50: 68 69 73 20 63 6f 6d 6d 61 6e 64 20 68 61 73 20 his command has
0f60: 6e 6f 20 65 66 66 65 63 74 2e 20 54 68 69 73 20 no effect. This
0f70: 63 6f 6d 6d 61 6e 64 20 73 75 70 70 6f 72 74 73 command supports
0f80: 20 61 6c 6c 20 6f 66 20 74 68 65 0a 09 73 61 6d all of the..sam
0f90: 65 20 6f 70 74 69 6f 6e 73 20 61 73 20 74 68 65 e options as the
0fa0: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f <strong>tls::so
0fb0: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 63 6f cket</strong> co
0fc0: 6d 6d 61 6e 64 2c 20 74 68 6f 75 67 68 20 79 6f mmand, though yo
0fd0: 75 0a 09 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20 u..should limit
0fe0: 79 6f 75 72 20 6f 70 74 69 6f 6e 73 20 74 6f 20 your options to
0ff0: 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 only TLS related
1000: 20 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 ones.</dd>.
1010: 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a <dt> </dt>.
1020: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
1030: 22 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 "tls::socket"><b
1040: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 >tls::socket </b
1050: 3e 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 09 ><em>?options?..
1060: 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f host port</em></
1070: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e a></dt>. <dt>
1080: 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f <b>tls::socket</
1090: 62 3e 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72 20 b><em> ?-server
10a0: 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e command? ?option
10b0: 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74 s? port</em></dt
10c0: 3e 0a 20 20 20 20 3c 64 64 3e 54 68 69 73 20 69 >. <dd>This i
10d0: 73 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63 74 s a helper funct
10e0: 69 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a 65 ion that utilize
10f0: 73 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 s the underlying
1100: 20 63 6f 6d 6d 61 6e 64 73 0a 09 28 3c 73 74 72 commands..(<str
1110: 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f ong>socket</stro
1120: 6e 67 3e 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e ng> and <strong>
1130: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 tls::import</str
1140: 6f 6e 67 3e 29 20 74 6f 20 63 72 65 61 74 65 0a ong>) to create.
1150: 09 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e .the connection.
1160: 20 49 74 20 62 65 68 61 76 65 73 20 74 68 65 20 It behaves the
1170: 73 61 6d 65 20 61 73 20 74 68 65 20 6e 61 74 69 same as the nati
1180: 76 65 20 54 43 4c 20 3c 73 74 72 6f 6e 67 3e 73 ve TCL <strong>s
1190: 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 ocket</strong>..
11a0: 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73 command, but als
11b0: 6f 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 3c o supports the <
11c0: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6d a href="#tls::im
11d0: 70 6f 72 74 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c port"><strong>tl
11e0: 73 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 s:import</strong
11f0: 3e 3c 2f 61 3e 0a 09 63 6f 6d 6d 61 6e 64 20 6f ></a>..command o
1200: 70 74 69 6f 6e 73 20 61 6e 64 20 6f 6e 65 20 61 ptions and one a
1210: 64 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e dditional option
1220: 3a 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 6c 3e 3c :</dd>. <dl><
1230: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 64 74 blockquote>..<dt
1240: 3e 3c 73 74 72 6f 6e 67 3e 2d 61 75 74 6f 73 65 ><strong>-autose
1250: 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 rvername</strong
1260: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c > <em>bool</em><
1270: 2f 64 74 3e 0a 09 3c 64 64 3e 41 75 74 6f 6d 61 /dt>..<dd>Automa
1280: 74 69 63 61 6c 6c 79 20 73 65 74 20 74 68 65 20 tically set the
1290: 2d 73 65 72 76 65 72 6e 61 6d 65 20 61 72 67 75 -servername argu
12a0: 6d 65 6e 74 20 74 6f 20 74 68 65 20 3c 65 6d 3e ment to the <em>
12b0: 68 6f 73 74 3c 2f 65 6d 3e 0a 09 61 72 67 75 6d host</em>..argum
12c0: 65 6e 74 20 28 64 65 66 61 75 6c 74 20 69 73 20 ent (default is
12d0: 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 2e <em>false</em>).
12e0: 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 62 6c 6f 63 </dd>. </bloc
12f0: 6b 71 75 6f 74 65 3e 3c 2f 64 6c 3e 0a 0a 20 20 kquote></dl>..
1300: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
1310: 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 ls::import"><b>t
1320: 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c ls::import </b><
1330: 69 3e 63 68 61 6e 6e 65 6c 0a 09 3f 6f 70 74 69 i>channel..?opti
1340: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 ons?</i></a></dt
1350: 3e 0a 20 20 20 20 3c 64 64 3e 41 64 64 20 53 53 >. <dd>Add SS
1360: 4c 2f 54 4c 53 20 65 6e 63 72 79 70 74 69 6f 6e L/TLS encryption
1370: 20 74 6f 20 61 20 72 65 67 75 6c 61 72 20 54 43 to a regular TC
1380: 4c 20 63 68 61 6e 6e 65 6c 2e 20 49 74 20 6e 65 L channel. It ne
1390: 65 64 0a 09 6e 6f 74 20 62 65 20 61 20 73 6f 63 ed..not be a soc
13a0: 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20 70 72 ket, but must pr
13b0: 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63 74 69 ovide bi-directi
13c0: 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c 73 6f 0a onal flow. Also.
13d0: 09 73 65 74 20 73 65 73 73 69 6f 6e 20 70 61 72 .set session par
13e0: 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c 20 ameters for SSL
13f0: 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 64 64 3e 0a handshake.</dd>.
1400: 20 20 20 20 3c 64 6c 3e 3c 62 6c 6f 63 6b 71 75 <dl><blockqu
1410: 6f 74 65 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e ote>..<dt><stron
1420: 67 3e 2d 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e g>-alpn</strong>
1430: 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f <em>list</em></
1440: 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 dt>..<dd>List of
1450: 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 protocols to of
1460: 66 65 72 20 64 75 72 69 6e 67 20 41 70 70 6c 69 fer during Appli
1470: 63 61 74 69 6f 6e 2d 4c 61 79 65 72 0a 09 20 20 cation-Layer..
1480: 20 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 Protocol Negot
1490: 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 20 46 iation (ALPN). F
14a0: 6f 72 20 65 78 61 6d 70 6c 65 3a 20 3c 65 6d 3e or example: <em>
14b0: 68 32 3c 2f 65 6d 3e 20 61 6e 64 0a 09 20 20 20 h2</em> and..
14c0: 20 3c 65 6d 3e 68 74 74 70 2f 31 2e 31 3c 2f 65 <em>http/1.1</e
14d0: 6d 3e 2c 20 62 75 74 20 6e 6f 74 20 3c 65 6d 3e m>, but not <em>
14e0: 68 33 3c 2f 65 6d 3e 20 6f 72 20 3c 65 6d 3e 71 h3</em> or <em>q
14f0: 75 69 63 3c 2f 65 6d 3e 2e 3c 2f 64 64 3e 0a 09 uic</em>.</dd>..
1500: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 64 <dt><strong>-cad
1510: 69 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ir</strong> <em>
1520: 64 69 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c dir</em></dt>..<
1530: 64 64 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 dd>Specifies the
1540: 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 directory where
1550: 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 the Certificate
1560: 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 0a Authority (CA).
1570: 09 20 20 20 20 63 65 72 74 69 66 69 63 61 74 65 . certificate
1580: 73 20 61 72 65 20 73 74 6f 72 65 64 2e 20 54 68 s are stored. Th
1590: 65 20 64 65 66 61 75 6c 74 20 69 73 20 70 6c 61 e default is pla
15a0: 74 66 6f 72 6d 20 73 70 65 63 69 66 69 63 20 61 tform specific a
15b0: 6e 64 20 63 61 6e 20 62 65 0a 09 20 20 20 20 73 nd can be.. s
15c0: 65 74 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 et at compile ti
15d0: 6d 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 me. The default
15e0: 6c 6f 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 location can be
15f0: 6f 76 65 72 72 69 64 64 65 6e 20 76 69 61 20 74 overridden via t
1600: 68 65 0a 09 20 20 20 20 3c 62 3e 53 53 4c 5f 43 he.. <b>SSL_C
1610: 45 52 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 ERT_DIR</b> envi
1620: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
1630: 2e 0a 09 20 20 20 20 53 65 65 20 3c 61 20 68 72 ... See <a hr
1640: 65 66 3d 22 23 43 45 52 54 49 46 49 43 41 54 45 ef="#CERTIFICATE
1650: 20 56 41 4c 49 44 41 54 49 4f 4e 22 3e 43 45 52 VALIDATION">CER
1660: 54 49 46 49 43 41 54 45 20 56 41 4c 49 44 41 54 TIFICATE VALIDAT
1670: 49 4f 4e 3c 2f 61 3e 2e 3c 2f 64 64 3e 0a 09 3c ION</a>.</dd>..<
1680: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69 dt><strong>-cafi
1690: 6c 65 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e le </strong><em>
16a0: 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 filename</em></d
16b0: 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 65 t>..<dd>Specifie
16c0: 73 20 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 s the file with
16d0: 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 the Certificate
16e0: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 Authority (CA) c
16f0: 65 72 74 69 66 69 63 61 74 65 73 0a 09 20 20 20 ertificates..
1700: 20 74 6f 20 75 73 65 2e 20 54 68 65 20 64 65 66 to use. The def
1710: 61 75 6c 74 20 69 73 20 3c 62 3e 63 65 72 74 2e ault is <b>cert.
1720: 70 65 6d 3c 2f 62 3e 2c 20 69 6e 20 74 68 65 20 pem</b>, in the
1730: 4f 70 65 6e 53 53 4c 20 64 69 72 65 63 74 6f 72 OpenSSL director
1740: 79 2e 0a 09 20 20 20 20 54 68 65 20 64 65 66 61 y... The defa
1750: 75 6c 74 20 66 69 6c 65 20 63 61 6e 20 62 65 20 ult file can be
1760: 6f 76 65 72 72 69 64 64 65 6e 20 76 69 61 20 74 overridden via t
1770: 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 46 he <b>SSL_CERT_F
1780: 49 4c 45 3c 2f 62 3e 0a 09 20 20 20 20 65 6e 76 ILE</b>.. env
1790: 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c ironment variabl
17a0: 65 2e 0a 09 20 20 20 20 53 65 65 20 3c 61 20 68 e... See <a h
17b0: 72 65 66 3d 22 23 43 45 52 54 49 46 49 43 41 54 ref="#CERTIFICAT
17c0: 45 20 56 41 4c 49 44 41 54 49 4f 4e 22 3e 43 45 E VALIDATION">CE
17d0: 52 54 49 46 49 43 41 54 45 20 56 41 4c 49 44 41 RTIFICATE VALIDA
17e0: 54 49 4f 4e 3c 2f 61 3e 2e 3c 2f 64 64 3e 0a 09 TION</a>.</dd>..
17f0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 73 <dt><strong>-cas
1800: 74 6f 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 tore</strong> <e
1810: 6d 3e 55 52 49 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a m>URI</em></dt>.
1820: 09 3c 64 64 3e 55 52 49 20 66 6f 72 20 61 20 43 .<dd>URI for a C
1830: 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f ertificate Autho
1840: 72 69 74 79 20 28 43 41 29 20 73 74 6f 72 65 2c rity (CA) store,
1850: 20 77 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 which may be a
1860: 73 69 6e 67 6c 65 0a 09 20 20 20 20 63 6f 6e 74 single.. cont
1870: 61 69 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c ainer or a catal
1880: 6f 67 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 og of containers
1890: 2e 20 53 74 61 72 74 69 6e 67 20 77 69 74 68 20 . Starting with
18a0: 4f 70 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 0a 09 OpenSSL 3.2 on..
18b0: 20 20 20 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 Windows, set
18c0: 20 74 6f 20 22 6f 72 67 2e 6f 70 65 6e 73 73 6c to "org.openssl
18d0: 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 22 20 74 6f .winstore://" to
18e0: 20 75 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 use the built-i
18f0: 6e 0a 09 20 20 20 20 57 69 6e 64 6f 77 73 20 43 n.. Windows C
1900: 65 72 74 20 53 74 6f 72 65 2e 20 54 68 65 20 57 ert Store. The W
1910: 69 6e 64 6f 77 73 20 63 65 72 74 20 73 74 6f 72 indows cert stor
1920: 65 20 6f 6e 6c 79 20 73 75 70 70 6f 72 74 73 20 e only supports
1930: 72 6f 6f 74 0a 09 20 20 20 20 63 65 72 74 69 66 root.. certif
1940: 69 63 61 74 65 20 73 74 6f 72 65 73 2e 0a 09 20 icate stores...
1950: 20 20 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 See <a href="
1960: 23 43 45 52 54 49 46 49 43 41 54 45 20 56 41 4c #CERTIFICATE VAL
1970: 49 44 41 54 49 4f 4e 22 3e 43 45 52 54 49 46 49 IDATION">CERTIFI
1980: 43 41 54 45 20 56 41 4c 49 44 41 54 49 4f 4e 3c CATE VALIDATION<
1990: 2f 61 3e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c /a>.</dd>..<dt><
19a0: 73 74 72 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65 strong>-certfile
19b0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 </strong> <em>fi
19c0: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e lename</em></dt>
19d0: 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 65 73 20 ..<dd>Specifies
19e0: 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 the file with th
19f0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 74 6f e certificate to
1a00: 20 75 73 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d use in PEM form
1a10: 61 74 2e 0a 09 20 20 20 20 54 68 69 73 20 61 6c at... This al
1a20: 73 6f 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 so contains the
1a30: 70 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 64 64 3e public key.</dd>
1a40: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 ..<dt><strong>-c
1a50: 65 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ert</strong> <em
1a60: 3e 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f >binary_string</
1a70: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 em></dt>..<dd>Sp
1a80: 65 63 69 66 69 65 73 20 74 68 65 20 63 65 72 74 ecifies the cert
1a90: 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 20 61 ificate to use a
1aa0: 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 s a DER encoded
1ab0: 73 74 72 69 6e 67 20 28 58 2e 35 30 39 20 44 45 string (X.509 DE
1ac0: 52 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 R).</dd>..<dt><s
1ad0: 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 3c 2f 73 trong>-cipher</s
1ae0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e trong> <em>strin
1af0: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 g</em></dt>..<dd
1b00: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 6c >Specifies the l
1b10: 69 73 74 20 6f 66 20 63 69 70 68 65 72 73 20 74 ist of ciphers t
1b20: 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31 2e o use for TLS 1.
1b30: 32 20 61 6e 64 20 65 61 72 6c 69 65 72 2e 20 53 2 and earlier. S
1b40: 74 72 69 6e 67 20 69 73 20 61 0a 09 20 20 20 20 tring is a..
1b50: 63 6f 6c 6f 6e 20 28 22 3a 22 29 20 73 65 70 61 colon (":") sepa
1b60: 72 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 rated list of ci
1b70: 70 68 65 72 73 2e 20 43 69 70 68 65 72 73 20 63 phers. Ciphers c
1b80: 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 20 75 an be combined u
1b90: 73 69 6e 67 20 74 68 65 0a 09 20 20 20 20 3c 62 sing the.. <b
1ba0: 3e 2b 3c 2f 62 3e 20 63 68 61 72 61 63 74 65 72 >+</b> character
1bb0: 2e 20 50 72 65 66 69 78 65 73 20 63 61 6e 20 62 . Prefixes can b
1bc0: 65 20 75 73 65 64 20 74 6f 20 70 65 72 6d 61 6e e used to perman
1bd0: 65 6e 74 6c 79 20 72 65 6d 6f 76 65 20 28 22 21 ently remove ("!
1be0: 22 29 2c 0a 09 20 20 20 20 64 65 6c 65 74 65 20 "),.. delete
1bf0: 28 22 2d 22 29 2c 20 6f 72 20 6d 6f 76 65 20 61 ("-"), or move a
1c00: 20 63 69 70 68 65 72 20 74 6f 20 74 68 65 20 65 cipher to the e
1c10: 6e 64 20 6f 66 20 74 68 65 20 6c 69 73 74 20 28 nd of the list (
1c20: 22 2b 22 29 2e 20 4b 65 79 77 6f 72 64 73 0a 09 "+"). Keywords..
1c30: 20 20 20 20 3c 62 3e 40 53 54 52 45 4e 47 54 48 <b>@STRENGTH
1c40: 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 61 6c </b> (sort by al
1c50: 67 6f 72 69 74 68 6d 20 6b 65 79 20 6c 65 6e 67 gorithm key leng
1c60: 74 68 29 2c 20 3c 62 3e 40 53 45 43 4c 45 56 45 th), <b>@SECLEVE
1c70: 4c 3d 3c 2f 62 3e 3c 69 3e 6e 3c 2f 69 3e 0a 09 L=</b><i>n</i>..
1c80: 20 20 20 20 28 73 65 74 20 73 65 63 75 72 69 74 (set securit
1c90: 79 20 6c 65 76 65 6c 20 74 6f 20 6e 29 2c 20 61 y level to n), a
1ca0: 6e 64 20 3c 62 3e 44 45 46 41 55 4c 54 3c 2f 62 nd <b>DEFAULT</b
1cb0: 3e 20 28 75 73 65 20 64 65 66 61 75 6c 74 20 63 > (use default c
1cc0: 69 70 68 65 72 20 6c 69 73 74 2c 0a 09 20 20 20 ipher list,..
1cd0: 20 61 74 20 73 74 61 72 74 20 6f 6e 6c 79 29 20 at start only)
1ce0: 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 70 65 63 can also be spec
1cf0: 69 66 69 65 64 2e 20 53 65 65 20 4f 70 65 6e 53 ified. See OpenS
1d00: 53 4c 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e SL documentation
1d10: 20 66 6f 72 20 74 68 65 0a 09 20 20 20 20 66 75 for the.. fu
1d20: 6c 6c 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 ll list of valid
1d30: 20 76 61 6c 75 65 73 2e 3c 2f 64 64 3e 0a 09 3c values.</dd>..<
1d40: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 dt><strong>-ciph
1d50: 65 72 73 75 69 74 65 73 3c 2f 73 74 72 6f 6e 67 ersuites</strong
1d60: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
1d70: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 ></dt>..<dd>Spec
1d80: 69 66 69 65 73 20 74 68 65 20 6c 69 73 74 20 6f ifies the list o
1d90: 66 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 f cipher suites
1da0: 74 6f 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31 to use for TLS 1
1db0: 2e 33 2e 20 53 74 72 69 6e 67 20 69 73 20 61 20 .3. String is a
1dc0: 63 6f 6c 6f 6e 0a 09 20 20 20 20 28 22 3a 22 29 colon.. (":")
1dd0: 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 separated list
1de0: 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 20 of cipher suite
1df0: 6e 61 6d 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 names.</dd>..<dt
1e00: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e ><strong>-comman
1e10: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 d</strong> <em>c
1e20: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 allback</em></dt
1e30: 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 65 73 >..<dd>Specifies
1e40: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f the callback co
1e50: 6d 6d 61 6e 64 20 74 6f 20 62 65 20 69 6e 76 6f mmand to be invo
1e60: 6b 65 64 20 61 74 20 73 65 76 65 72 61 6c 20 70 ked at several p
1e70: 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 oints during the
1e80: 0a 09 20 20 20 20 68 61 6e 64 73 68 61 6b 65 20 .. handshake
1e90: 74 6f 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20 to pass errors,
1ea0: 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 tracing informat
1eb0: 69 6f 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f ion, and protoco
1ec0: 6c 20 6d 65 73 73 61 67 65 73 2e 0a 09 20 20 20 l messages...
1ed0: 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43 See <a href="#C
1ee0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 ALLBACK OPTIONS"
1ef0: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e >CALLBACK OPTION
1f00: 53 3c 2f 61 3e 20 66 6f 72 20 6d 6f 72 65 20 69 S</a> for more i
1f10: 6e 66 6f 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c nfo.</dd>..<dt><
1f20: 73 74 72 6f 6e 67 3e 2d 64 68 70 61 72 61 6d 73 strong>-dhparams
1f30: 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 </strong><em>fi
1f40: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e lename</em></dt>
1f50: 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 65 73 20 ..<dd>Specifies
1f60: 74 68 65 20 44 69 66 66 69 65 2d 48 65 6c 6c 6d the Diffie-Hellm
1f70: 61 6e 20 28 44 48 29 20 70 61 72 61 6d 65 74 65 an (DH) paramete
1f80: 72 73 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a 09 3c rs file.</dd>..<
1f90: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 66 dt><strong>-keyf
1fa0: 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ile</strong> <em
1fb0: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f >filename</em></
1fc0: 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 dt>..<dd>Specifi
1fd0: 65 73 20 74 68 65 20 70 72 69 76 61 74 65 20 6b es the private k
1fe0: 65 79 20 66 69 6c 65 2e 20 28 64 65 66 61 75 6c ey file. (defaul
1ff0: 74 20 69 73 20 76 61 6c 75 65 20 6f 66 20 2d 63 t is value of -c
2000: 65 72 74 66 69 6c 65 29 2e 3c 2f 64 64 3e 0a 09 ertfile).</dd>..
2010: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 <dt><strong>-key
2020: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 </strong> <em>fi
2030: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e lename</em></dt>
2040: 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 65 73 20 ..<dd>Specifies
2050: 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 the private key
2060: 74 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 20 to use as a DER
2070: 65 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28 encoded string (
2080: 50 4b 43 53 23 31 20 44 45 52 29 2e 3c 2f 64 64 PKCS#1 DER).</dd
2090: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
20a0: 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c model</strong> <
20b0: 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c em>channel</em><
20c0: 2f 64 74 3e 0a 09 3c 64 64 3e 46 6f 72 63 65 20 /dt>..<dd>Force
20d0: 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 this channel to
20e0: 73 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 3c share the same <
20f0: 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c 5f 43 em><strong>SSL_C
2100: 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65 6d 3e TX</strong></em>
2110: 0a 09 20 20 20 20 73 74 72 75 63 74 75 72 65 20 .. structure
2120: 61 73 20 74 68 65 20 73 70 65 63 69 66 69 65 64 as the specified
2130: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d <em>channel</em
2140: 3e 2c 20 61 6e 64 0a 09 20 20 20 20 74 68 65 72 >, and.. ther
2150: 65 66 6f 72 65 20 73 68 61 72 65 20 63 61 6c 6c efore share call
2160: 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 3e 0a backs etc.</dd>.
2170: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 .<dt><strong>-pa
2180: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 ssword</strong>
2190: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d <em>callback</em
21a0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 ></dt>..<dd>Spec
21b0: 69 66 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 ifies the callba
21c0: 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e ck command to in
21d0: 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65 6e 53 53 voke when OpenSS
21e0: 4c 20 6e 65 65 64 73 20 74 6f 0a 09 20 20 20 20 L needs to..
21f0: 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 obtain a passwor
2200: 64 2e 20 54 68 69 73 20 69 73 20 74 79 70 69 63 d. This is typic
2210: 61 6c 6c 79 20 75 73 65 64 20 74 6f 20 75 6e 6c ally used to unl
2220: 6f 63 6b 20 74 68 65 20 70 72 69 76 61 74 65 20 ock the private
2230: 6b 65 79 20 6f 66 0a 09 20 20 20 20 61 20 63 65 key of.. a ce
2240: 72 74 69 66 69 63 61 74 65 2e 20 54 68 65 20 63 rtificate. The c
2250: 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 allback should r
2260: 65 74 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64 eturn a password
2270: 20 73 74 72 69 6e 67 2e 0a 09 20 20 20 20 53 65 string... Se
2280: 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c e <a href="#CALL
2290: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 BACK OPTIONS">CA
22a0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f LLBACK OPTIONS</
22b0: 61 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f a> for more info
22c0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
22d0: 6f 6e 67 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 ong>-post_handsh
22e0: 61 6b 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ake</strong> <em
22f0: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
2300: 09 3c 64 64 3e 41 6c 6c 6f 77 20 70 6f 73 74 2d .<dd>Allow post-
2310: 68 61 6e 64 73 68 61 6b 65 20 73 65 73 73 69 6f handshake sessio
2320: 6e 20 74 69 63 6b 65 74 20 75 70 64 61 74 65 73 n ticket updates
2330: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
2340: 6f 6e 67 3e 2d 72 65 71 75 65 73 74 20 3c 2f 73 ong>-request </s
2350: 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f trong><em>bool</
2360: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 em></dt>..<dd>Re
2370: 71 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 quest a certific
2380: 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 ate from peer du
2390: 72 69 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e ring the SSL han
23a0: 64 73 68 61 6b 65 2e 20 54 68 69 73 20 69 73 0a dshake. This is.
23b0: 09 20 20 20 20 6e 65 65 64 65 64 20 74 6f 20 64 . needed to d
23c0: 6f 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 o certificate va
23d0: 6c 69 64 61 74 69 6f 6e 2e 20 28 64 65 66 61 75 lidation. (defau
23e0: 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f lt is <em>true</
23f0: 65 6d 3e 29 2e 0a 09 20 20 20 20 53 65 65 20 3c em>)... See <
2400: 61 20 68 72 65 66 3d 22 23 43 45 52 54 49 46 49 a href="#CERTIFI
2410: 43 41 54 45 20 56 41 4c 49 44 41 54 49 4f 4e 22 CATE VALIDATION"
2420: 3e 43 45 52 54 49 46 49 43 41 54 45 20 56 41 4c >CERTIFICATE VAL
2430: 49 44 41 54 49 4f 4e 3c 2f 61 3e 2e 3c 2f 64 64 IDATION</a>.</dd
2440: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
2450: 72 65 71 75 69 72 65 3c 2f 73 74 72 6f 6e 67 3e require</strong>
2460: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f <em>bool</em></
2470: 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75 69 72 65 dt>..<dd>Require
2480: 20 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 a valid certifi
2490: 63 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 cate from peer d
24a0: 75 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68 uring SSL handsh
24b0: 61 6b 65 2e 20 49 66 20 74 68 69 73 0a 09 20 20 ake. If this..
24c0: 20 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 is set to true
24d0: 2c 20 74 68 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d , then <strong>-
24e0: 72 65 71 75 65 73 74 3c 2f 73 74 72 6f 6e 67 3e request</strong>
24f0: 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65 must also be se
2500: 74 20 74 6f 0a 09 20 20 20 20 74 72 75 65 20 61 t to.. true a
2510: 6e 64 20 61 20 65 69 74 68 65 72 20 61 20 2d 63 nd a either a -c
2520: 61 64 69 72 2c 20 2d 63 61 66 69 6c 65 2c 20 2d adir, -cafile, -
2530: 63 61 73 74 6f 72 65 2c 20 6f 72 20 70 6c 61 74 castore, or plat
2540: 66 6f 72 6d 20 64 65 66 61 75 6c 74 0a 09 20 20 form default..
2550: 20 20 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64 must be provid
2560: 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 ed in order to v
2570: 61 6c 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e alidate against.
2580: 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d (default is <em
2590: 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 2e 0a 09 20 >false</em>)...
25a0: 20 20 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 See <a href="
25b0: 23 43 45 52 54 49 46 49 43 41 54 45 20 56 41 4c #CERTIFICATE VAL
25c0: 49 44 41 54 49 4f 4e 22 3e 43 45 52 54 49 46 49 IDATION">CERTIFI
25d0: 43 41 54 45 20 56 41 4c 49 44 41 54 49 4f 4e 3c CATE VALIDATION<
25e0: 2f 61 3e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c /a>.</dd>..<dt><
25f0: 73 74 72 6f 6e 67 3e 2d 73 65 63 75 72 69 74 79 strong>-security
2600: 5f 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 _level</strong>
2610: 3c 65 6d 3e 69 6e 74 65 67 65 72 3c 2f 65 6d 3e <em>integer</em>
2620: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 </dt>..<dd>Speci
2630: 66 69 65 73 20 74 68 65 20 73 65 63 75 72 69 74 fies the securit
2640: 79 20 6c 65 76 65 6c 20 28 76 61 6c 75 65 20 66 y level (value f
2650: 72 6f 6d 20 30 20 74 6f 20 35 29 2e 20 54 68 65 rom 0 to 5). The
2660: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 0a security level.
2670: 09 20 20 20 20 61 66 66 65 63 74 73 20 74 68 65 . affects the
2680: 20 63 69 70 68 65 72 20 73 75 69 74 65 20 65 6e cipher suite en
2690: 63 72 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 cryption algorit
26a0: 68 6d 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 hms, supported E
26b0: 43 43 20 63 75 72 76 65 73 2c 0a 09 20 20 20 20 CC curves,..
26c0: 73 75 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74 supported signat
26d0: 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 ure algorithms,
26e0: 44 48 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a DH parameter siz
26f0: 65 73 2c 20 63 65 72 74 69 66 69 63 61 74 65 20 es, certificate
2700: 6b 65 79 0a 09 20 20 20 20 73 69 7a 65 73 20 61 key.. sizes a
2710: 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 nd signature alg
2720: 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66 orithms. The def
2730: 61 75 6c 74 20 69 73 20 31 20 70 72 69 6f 72 20 ault is 1 prior
2740: 74 6f 20 4f 70 65 6e 53 53 4c 20 33 2e 32 0a 09 to OpenSSL 3.2..
2750: 20 20 20 20 61 6e 64 20 32 20 74 68 65 72 65 61 and 2 therea
2760: 66 74 65 72 2e 20 4c 65 76 65 6c 20 33 20 61 6e fter. Level 3 an
2770: 64 20 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 d higher disable
2780: 20 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 support for ses
2790: 73 69 6f 6e 0a 09 20 20 20 20 74 69 63 6b 65 74 sion.. ticket
27a0: 73 20 61 6e 64 20 6f 6e 6c 79 20 61 63 63 65 70 s and only accep
27b0: 74 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 t cipher suites
27c0: 74 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f 72 that provide for
27d0: 77 61 72 64 20 73 65 63 72 65 63 79 2e 3c 2f 64 ward secrecy.</d
27e0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
27f0: 2d 73 65 72 76 65 72 3c 2f 73 74 72 6f 6e 67 3e -server</strong>
2800: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f <em>bool</em></
2810: 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 dt>..<dd>Specifi
2820: 65 73 20 77 68 65 74 68 65 72 20 74 6f 20 61 63 es whether to ac
2830: 74 20 61 73 20 61 20 73 65 72 76 65 72 20 61 6e t as a server an
2840: 64 20 72 65 73 70 6f 6e 64 20 77 69 74 68 20 61 d respond with a
2850: 20 73 65 72 76 65 72 0a 09 20 20 20 20 68 61 6e server.. han
2860: 64 73 68 61 6b 65 20 77 68 65 6e 20 61 20 63 6c dshake when a cl
2870: 69 65 6e 74 20 63 6f 6e 6e 65 63 74 73 20 61 6e ient connects an
2880: 64 20 70 72 6f 76 69 64 65 73 20 61 20 63 6c 69 d provides a cli
2890: 65 6e 74 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 ent handshake...
28a0: 20 20 20 20 28 64 65 66 61 75 6c 74 20 69 73 20 (default is
28b0: 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c <em>false</em>)<
28c0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
28d0: 67 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 g>-servername</s
28e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c trong> <em>host<
28f0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 /em></dt>..<dd>S
2900: 70 65 63 69 66 79 20 73 65 72 76 65 72 27 73 20 pecify server's
2910: 68 6f 73 74 6e 61 6d 65 2e 20 54 68 69 73 20 69 hostname. This i
2920: 73 20 75 73 65 64 20 74 6f 20 73 65 74 20 74 68 s used to set th
2930: 65 20 54 4c 53 20 53 65 72 76 65 72 20 4e 61 6d e TLS Server Nam
2940: 65 0a 09 20 20 20 20 49 6e 64 69 63 61 74 69 6f e.. Indicatio
2950: 6e 20 28 53 4e 49 29 20 65 78 74 65 6e 73 69 6f n (SNI) extensio
2960: 6e 2e 20 53 65 74 20 74 68 69 73 20 74 6f 20 74 n. Set this to t
2970: 68 65 20 65 78 70 65 63 74 65 64 20 73 65 72 76 he expected serv
2980: 65 72 6e 61 6d 65 20 69 6e 20 74 68 65 0a 09 20 ername in the..
2990: 20 20 73 65 72 76 65 72 27 73 20 63 65 72 74 69 server's certi
29a0: 66 69 63 61 74 65 20 6f 72 20 6f 6e 65 20 6f 66 ficate or one of
29b0: 20 74 68 65 20 73 75 62 6a 65 63 74 41 6c 74 4e the subjectAltN
29c0: 61 6d 65 20 61 6c 74 65 72 6e 61 74 65 73 2e 3c ame alternates.<
29d0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
29e0: 67 3e 2d 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 g>-session_id</s
29f0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e trong> <em>strin
2a00: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 g</em></dt>..<dd
2a10: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 73 >Specifies the s
2a20: 65 73 73 69 6f 6e 20 69 64 20 74 6f 20 72 65 73 ession id to res
2a30: 75 6d 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 ume session.</dd
2a40: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
2a50: 73 73 6c 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ssl2</strong> <e
2a60: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e m>bool</em></dt>
2a70: 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 ..<dd>Enable use
2a80: 20 6f 66 20 53 53 4c 20 76 32 2e 20 28 64 65 66 of SSL v2. (def
2a90: 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 ault is <em>fals
2aa0: 65 3c 2f 65 6d 3e 29 2e 0a 09 4e 6f 74 65 3a 20 e</em>)...Note:
2ab0: 52 65 63 65 6e 74 20 76 65 72 73 69 6f 6e 73 20 Recent versions
2ac0: 6f 66 20 4f 70 65 6e 53 53 4c 20 64 6f 6e 27 74 of OpenSSL don't
2ad0: 20 73 75 70 70 6f 72 74 20 53 53 4c 76 32 2e 3c support SSLv2.<
2ae0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
2af0: 67 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 g>-ssl3 </strong
2b00: 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f ><em>bool</em></
2b10: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 dt>..<dd>Enable
2b20: 75 73 65 20 6f 66 20 53 53 4c 20 76 33 2e 20 28 use of SSL v3. (
2b30: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 default is <em>f
2b40: 61 6c 73 65 3c 2f 65 6d 3e 29 2e 0a 09 4e 6f 74 alse</em>)...Not
2b50: 65 3a 20 53 53 4c 20 76 33 20 6d 75 73 74 20 61 e: SSL v3 must a
2b60: 6c 73 6f 20 62 65 20 65 6e 61 62 6c 65 64 20 77 lso be enabled w
2b70: 69 74 68 20 61 20 63 6f 6d 70 69 6c 65 20 74 69 ith a compile ti
2b80: 6d 65 20 6f 70 74 69 6f 6e 2e 3c 2f 64 64 3e 0a me option.</dd>.
2b90: 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c .<dt>-<strong>tl
2ba0: 73 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e s1</strong> <em>
2bb0: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 bool</em></dt>..
2bc0: 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f <dd>Enable use o
2bd0: 66 20 54 4c 53 20 76 31 2e 20 28 64 65 66 61 75 f TLS v1. (defau
2be0: 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f lt is <em>true</
2bf0: 65 6d 3e 29 2e 0a 09 4e 6f 74 65 3a 20 54 4c 53 em>)...Note: TLS
2c00: 20 31 2e 30 20 6e 65 65 64 73 20 53 48 41 31 20 1.0 needs SHA1
2c10: 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 68 69 63 to operate, whic
2c20: 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 h is only availa
2c30: 62 6c 65 20 69 6e 0a 09 73 65 63 75 72 69 74 79 ble in..security
2c40: 20 6c 65 76 65 6c 20 30 20 66 6f 72 20 4f 70 65 level 0 for Ope
2c50: 6e 20 53 53 4c 20 33 2e 30 2b 2e 3c 2f 64 64 3e n SSL 3.0+.</dd>
2c60: 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 ..<dt>-<strong>t
2c70: 6c 73 31 2e 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c ls1.1</strong> <
2c80: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 em>bool</em></dt
2c90: 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 >..<dd>Enable us
2ca0: 65 20 6f 66 20 54 4c 53 20 76 31 2e 31 20 28 64 e of TLS v1.1 (d
2cb0: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 efault is <em>tr
2cc0: 75 65 3c 2f 65 6d 3e 29 2e 0a 09 4e 6f 74 65 3a ue</em>)...Note:
2cd0: 20 54 4c 53 20 31 2e 31 20 6e 65 65 64 73 20 53 TLS 1.1 needs S
2ce0: 48 41 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 HA1 to operate,
2cf0: 77 68 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 which is only av
2d00: 61 69 6c 61 62 6c 65 20 69 6e 0a 09 73 65 63 75 ailable in..secu
2d10: 72 69 74 79 20 6c 65 76 65 6c 20 30 20 66 6f 72 rity level 0 for
2d20: 20 4f 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 3c Open SSL 3.0+.<
2d30: 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f /dd>..<dt>-<stro
2d40: 6e 67 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e ng>tls1.2</stron
2d50: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e g> <em>bool</em>
2d60: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c </dt>..<dd>Enabl
2d70: 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e e use of TLS v1.
2d80: 32 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 2 (default is <e
2d90: 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 m>true</em>)</dd
2da0: 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e >..<dt>-<strong>
2db0: 74 6c 73 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e 20 tls1.3</strong>
2dc0: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 <em>bool</em></d
2dd0: 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 t>..<dd>Enable u
2de0: 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 20 28 se of TLS v1.3 (
2df0: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 default is <em>t
2e00: 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 rue</em>)</dd>..
2e10: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c <dt><strong>-val
2e20: 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 74 idatecommand</st
2e30: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 rong> <em>callba
2e40: 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ck</em></dt>..<d
2e50: 64 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 d>Specifies the
2e60: 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 callback command
2e70: 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 76 61 to invoke to va
2e80: 6c 69 64 61 74 65 20 70 72 6f 74 6f 63 6f 6c 0a lidate protocol.
2e90: 09 20 20 20 20 63 6f 6e 66 69 67 20 70 61 72 61 . config para
2ea0: 6d 65 74 65 72 73 20 64 75 72 69 6e 67 20 74 68 meters during th
2eb0: 65 20 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 e protocol negot
2ec0: 69 61 74 69 6f 6e 20 70 68 61 73 65 2e 20 54 68 iation phase. Th
2ed0: 69 73 20 63 61 6e 20 62 65 0a 09 20 20 20 20 75 is can be.. u
2ee0: 73 65 64 20 62 79 20 54 43 4c 20 73 63 72 69 70 sed by TCL scrip
2ef0: 74 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 ts to perform th
2f00: 65 69 72 20 6f 77 6e 20 63 65 72 74 69 66 69 63 eir own certific
2f10: 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 20 74 ate validation t
2f20: 6f 0a 09 20 20 20 20 73 75 70 70 6c 65 6d 65 6e o.. supplemen
2f30: 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 76 61 t the default va
2f40: 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 lidation provide
2f50: 64 20 62 79 20 4f 70 65 6e 53 53 4c 2e 20 54 68 d by OpenSSL. Th
2f60: 65 20 73 63 72 69 70 74 20 6d 75 73 74 0a 09 20 e script must..
2f70: 20 20 20 72 65 74 75 72 6e 20 61 20 62 6f 6f 6c return a bool
2f80: 65 61 6e 20 74 72 75 65 20 74 6f 20 63 6f 6e 74 ean true to cont
2f90: 69 6e 75 65 20 74 68 65 20 6e 65 67 6f 74 69 61 inue the negotia
2fa0: 74 69 6f 6e 2e 20 53 65 65 0a 09 20 20 20 20 3c tion. See.. <
2fb0: 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 a href="#CALLBAC
2fc0: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 K OPTIONS">CALLB
2fd0: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 20 ACK OPTIONS</a>
2fe0: 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f for more info.</
2ff0: 64 64 3e 0a 20 20 20 20 3c 2f 62 6c 6f 63 6b 71 dd>. </blockq
3000: 75 6f 74 65 3e 3c 2f 64 6c 3e 0a 20 20 20 20 3c uote></dl>. <
3010: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
3020: 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c :unimport"><b>tl
3030: 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 3e s::unimport </b>
3040: 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f <i>channel</i></
3050: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e a></dt>. <dd>
3060: 50 72 6f 76 69 64 65 64 20 66 6f 72 20 73 79 6d Provided for sym
3070: 6d 65 74 72 79 20 74 6f 20 3c 73 74 72 6f 6e 67 metry to <strong
3080: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 >tls::import</st
3090: 72 6f 6e 67 3e 2c 20 74 68 69 73 0a 09 75 6e 73 rong>, this..uns
30a0: 74 61 63 6b 73 20 74 68 65 20 65 6e 63 72 79 70 tacks the encryp
30b0: 74 69 6f 6e 20 6f 66 20 61 20 72 65 67 75 6c 61 tion of a regula
30c0: 72 20 54 43 4c 20 63 68 61 6e 6e 65 6c 2e 20 41 r TCL channel. A
30d0: 6e 20 65 72 72 6f 72 0a 09 69 73 20 74 68 72 6f n error..is thro
30e0: 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74 wn if TLS is not
30f0: 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64 the top stacked
3100: 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c 2f channel type.</
3110: 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 dd>. <dt>&nbs
3120: 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e p;</dt>. <dt>
3130: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 61 <a name="tls::ha
3140: 6e 64 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e 67 ndshake"><strong
3150: 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c >tls::handshake<
3160: 2f 73 74 72 6f 6e 67 3e 0a 09 3c 65 6d 3e 63 68 /strong>..<em>ch
3170: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f annel</em></a></
3180: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63 dt>. <dd>Forc
3190: 65 73 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 es handshake to
31a0: 74 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 20 take place, and
31b0: 72 65 74 75 72 6e 73 20 30 20 69 66 0a 09 68 61 returns 0 if..ha
31c0: 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c 6c ndshake is still
31d0: 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e 6f in progress (no
31e0: 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 n-blocking), or
31f0: 31 20 69 66 0a 09 74 68 65 20 68 61 6e 64 73 68 1 if..the handsh
3200: 61 6b 65 20 77 61 73 20 73 75 63 63 65 73 73 66 ake was successf
3210: 75 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 ul. If the hands
3220: 68 61 6b 65 20 66 61 69 6c 65 64 0a 09 74 68 69 hake failed..thi
3230: 73 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 74 s routine will t
3240: 68 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e 3c 2f hrow an error.</
3250: 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 dd>. <dt>&nbs
3260: 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e p;</dt>. <dt>
3270: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 74 <a name="tls::st
3280: 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c atus"><strong>tl
3290: 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e s::status</stron
32a0: 67 3e 0a 09 3c 65 6d 3e 3f 3c 2f 65 6d 3e 3c 62 g>..<em>?</em><b
32b0: 3e 2d 6c 6f 63 61 6c 3c 2f 62 3e 3c 65 6d 3e 3f >-local</b><em>?
32c0: 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 channel</em></a
32d0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 ></dt>. <dd>R
32e0: 65 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 eturns the curre
32f0: 6e 74 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 nt status of an
3300: 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 SSL channel. The
3310: 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 result is a lis
3320: 74 0a 09 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 t..of key-value
3330: 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 pairs describing
3340: 20 74 68 65 20 53 53 4c 2c 20 63 65 72 74 69 66 the SSL, certif
3350: 69 63 61 74 65 2c 20 61 6e 64 20 63 65 72 74 69 icate, and certi
3360: 66 69 63 61 74 65 0a 09 76 65 72 69 66 69 63 61 ficate..verifica
3370: 74 69 6f 6e 20 73 74 61 74 75 73 2e 20 49 66 20 tion status. If
3380: 74 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b the SSL handshak
3390: 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f e has not yet co
33a0: 6d 70 6c 65 74 65 64 2c 0a 09 61 6e 20 65 6d 70 mpleted,..an emp
33b0: 74 79 20 6c 69 73 74 20 69 73 20 72 65 74 75 72 ty list is retur
33c0: 6e 65 64 2e 20 49 66 20 3c 62 3e 2d 6c 6f 63 61 ned. If <b>-loca
33d0: 6c 3c 2f 62 3e 20 69 73 20 73 70 65 63 69 66 69 l</b> is specifi
33e0: 65 64 2c 20 74 68 65 6e 20 74 68 65 0a 09 6c 6f ed, then the..lo
33f0: 63 61 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 cal certificate
3400: 69 73 20 75 73 65 64 2e 3c 2f 64 64 3e 0a 20 20 is used.</dd>.
3410: 20 20 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 <blockquote>.
3420: 20 20 20 3c 62 3e 53 53 4c 20 53 74 61 74 75 73 <b>SSL Status
3430: 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c </b>. <dl>..<
3440: 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c dt><strong>alpn<
3450: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f /strong> <em>pro
3460: 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tocol</em></dt>.
3470: 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f .<dd>The protoco
3480: 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 l selected after
3490: 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 Application-Lay
34a0: 65 72 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 er Protocol..
34b0: 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c Negotiation (AL
34c0: 50 4e 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c PN).</dd>..<dt><
34d0: 73 74 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 strong>cipher</s
34e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 trong> <em>ciphe
34f0: 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 r</em></dt>..<dd
3500: 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 >The current cip
3510: 68 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 her in use for t
3520: 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e he session.</dd>
3530: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 65 ..<dt><strong>pe
3540: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 ername</strong>
3550: 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 <em>name</em></d
3560: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 65 65 72 t>..<dd>The peer
3570: 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 name from the ce
3580: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
3590: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f .<dt><strong>pro
35a0: 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c tocol</strong> <
35b0: 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c em>version</em><
35c0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 /dt>..<dd>The pr
35d0: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 otocol version u
35e0: 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e sed for the conn
35f0: 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 53 53 4c ection:.. SSL
3600: 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 2, SSL3, TLS1, T
3610: 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54 LS1.1, TLS1.2, T
3620: 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 LS1.3, or unknow
3630: 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 n.</dd>..<dt><st
3640: 72 6f 6e 67 3e 73 62 69 74 73 3c 2f 73 74 72 6f rong>sbits</stro
3650: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f ng> <em>n</em></
3660: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d dt>..<dd>The num
3670: 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 ber of bits used
3680: 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e for the session
3690: 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e key.</dd>..<dt>
36a0: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 <strong>signatur
36b0: 65 48 61 73 68 41 6c 67 6f 72 69 74 68 6d 3c 2f eHashAlgorithm</
36c0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f strong> <em>algo
36d0: 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a rithm</em></dt>.
36e0: 09 3c 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 .<dd>The signatu
36f0: 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 re hash algorith
3700: 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 m.</dd>..<dt><st
3710: 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 54 79 rong>signatureTy
3720: 70 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e pe</strong> <em>
3730: 74 79 70 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 type</em></dt>..
3740: 3c 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 <dd>The signatur
3750: 65 20 74 79 70 65 20 76 61 6c 75 65 2e 3c 2f 64 e type value.</d
3760: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3770: 76 65 72 69 66 79 44 65 70 74 68 3c 2f 73 74 72 verifyDepth</str
3780: 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c ong> <em>n</em><
3790: 2f 64 74 3e 0a 09 3c 64 64 3e 4d 61 78 69 6d 75 /dt>..<dd>Maximu
37a0: 6d 20 64 65 70 74 68 20 66 6f 72 20 74 68 65 20 m depth for the
37b0: 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 certificate chai
37c0: 6e 20 76 65 72 69 66 69 63 61 74 69 6f 6e 2e 0a n verification..
37d0: 09 20 20 20 20 44 65 66 61 75 6c 74 20 69 73 20 . Default is
37e0: 2d 31 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c -1, to check all
37f0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
3800: 6f 6e 67 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f ong>verifyMode</
3810: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 strong> <em>list
3820: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3830: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 List of certific
3840: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e ate verification
3850: 20 6d 6f 64 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 modes.</dd>..<d
3860: 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 t><strong>verify
3870: 52 65 73 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 20 Result</strong>
3880: 3c 65 6d 3e 72 65 73 75 6c 74 3c 2f 65 6d 3e 3c <em>result</em><
3890: 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 /dt>..<dd>Certif
38a0: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 icate verificati
38b0: 6f 6e 20 72 65 73 75 6c 74 2e 3c 2f 64 64 3e 0a on result.</dd>.
38c0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 61 5f .<dt><strong>ca_
38d0: 6e 61 6d 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c names</strong> <
38e0: 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 em>list</em></dt
38f0: 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 74 >..<dd>List of t
3900: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 he Certificate A
3910: 75 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 uthorities used
3920: 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 65 to create the ce
3930: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
3940: 20 20 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 62 </dl>. <b
3950: 3e 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61 >Certificate Sta
3960: 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e tus</b>. <dl>
3970: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c ..<dt><strong>al
3980: 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 l</strong> <em>s
3990: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
39a0: 09 3c 64 64 3e 44 75 6d 70 20 6f 66 20 61 6c 6c .<dd>Dump of all
39b0: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 6e 66 certificate inf
39c0: 6f 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 o.</dd>..<dt><st
39d0: 72 6f 6e 67 3e 76 65 72 73 69 6f 6e 3c 2f 73 74 rong>version</st
39e0: 72 6f 6e 67 3e 20 3c 65 6d 3e 76 61 6c 75 65 3c rong> <em>value<
39f0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
3a00: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 he certificate v
3a10: 65 72 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 ersion.</dd>..<d
3a20: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 69 61 6c t><strong>serial
3a30: 4e 75 6d 62 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 Number</strong>
3a40: 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a <em>n</em></dt>.
3a50: 09 3c 64 64 3e 54 68 65 20 73 65 72 69 61 6c 20 .<dd>The serial
3a60: 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 number of the ce
3a70: 72 74 69 66 69 63 61 74 65 20 61 73 20 61 20 68 rtificate as a h
3a80: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a ex string.</dd>.
3a90: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 .<dt><strong>sig
3aa0: 6e 61 74 75 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 nature</strong>
3ab0: 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 <em>algorithm</e
3ac0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 70 m></dt>..<dd>Cip
3ad0: 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 her algorithm us
3ae0: 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 ed for certifica
3af0: 74 65 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 te signature.</d
3b00: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3b10: 69 73 73 75 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 issuer</strong>
3b20: 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e <em>dn</em></dt>
3b30: 0a 09 3c 64 64 3e 54 68 65 20 64 69 73 74 69 6e ..<dd>The distin
3b40: 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e guished name (DN
3b50: 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 ) of the certifi
3b60: 63 61 74 65 20 69 73 73 75 65 72 2e 3c 2f 64 64 cate issuer.</dd
3b70: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e >..<dt><strong>n
3b80: 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72 6f 6e 67 otBefore</strong
3b90: 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c > <em>date</em><
3ba0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 62 65 /dt>..<dd>The be
3bb0: 67 69 6e 6e 69 6e 67 20 64 61 74 65 20 6f 66 20 ginning date of
3bc0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
3bd0: 76 61 6c 69 64 69 74 79 2e 3c 2f 64 64 3e 0a 09 validity.</dd>..
3be0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 <dt><strong>notA
3bf0: 66 74 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 fter</strong> <e
3c00: 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>date</em></dt>
3c10: 0a 09 3c 64 64 3e 54 68 65 20 65 78 70 69 72 61 ..<dd>The expira
3c20: 74 69 6f 6e 20 64 61 74 65 20 6f 66 20 74 68 65 tion date of the
3c30: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c certificate val
3c40: 69 64 69 74 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 idity.</dd>..<dt
3c50: 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 ><strong>subject
3c60: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e </strong> <em>dn
3c70: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3c80: 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 The distinguishe
3c90: 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 d name (DN) of t
3ca0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 73 he certificate s
3cb0: 75 62 6a 65 63 74 2e 0a 09 20 20 20 20 46 69 65 ubject... Fie
3cc0: 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20 43 6f 6d lds include: Com
3cd0: 6d 6f 6e 20 4e 61 6d 65 20 28 43 4e 29 2c 20 4f mon Name (CN), O
3ce0: 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c rganization (O),
3cf0: 20 4c 6f 63 61 6c 69 74 79 0a 09 20 20 20 20 6f Locality.. o
3d00: 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61 74 r City (L), Stat
3d10: 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28 53 e or Province (S
3d20: 29 2c 20 61 6e 64 20 43 6f 75 6e 74 72 79 20 4e ), and Country N
3d30: 61 6d 65 20 28 43 29 2e 3c 2f 64 64 3e 0a 09 3c ame (C).</dd>..<
3d40: 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 dt><strong>issue
3d50: 72 55 6e 69 71 75 65 49 44 3c 2f 73 74 72 6f 6e rUniqueID</stron
3d60: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
3d70: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
3d80: 20 69 73 73 75 65 72 20 75 6e 69 71 75 65 20 69 issuer unique i
3d90: 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 d.</dd>..<dt><st
3da0: 72 6f 6e 67 3e 73 75 62 6a 65 63 74 55 6e 69 71 rong>subjectUniq
3db0: 75 65 49 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ueID</strong> <e
3dc0: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 m>string</em></d
3dd0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 75 62 6a t>..<dd>The subj
3de0: 65 63 74 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f ect unique id.</
3df0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3e00: 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c >num_extensions<
3e10: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f /strong> <em>n</
3e20: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 em></dt>..<dd>Nu
3e30: 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66 69 63 mber of certific
3e40: 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73 2e 3c ate extensions.<
3e50: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3e60: 67 3e 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 74 g>extensions</st
3e70: 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f rong> <em>list</
3e80: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 em></dt>..<dd>Li
3e90: 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 st of certificat
3ea0: 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 e extension name
3eb0: 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 s.</dd>..<dt><st
3ec0: 72 6f 6e 67 3e 61 75 74 68 6f 72 69 74 79 4b 65 rong>authorityKe
3ed0: 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 yIdentifier</str
3ee0: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c ong> <em>string<
3ef0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 /em></dt>..<dd>(
3f00: 41 4b 49 29 20 4b 65 79 20 69 64 65 6e 74 69 66 AKI) Key identif
3f10: 69 65 72 20 6f 66 20 74 68 65 20 49 73 73 75 69 ier of the Issui
3f20: 6e 67 20 43 41 20 63 65 72 74 69 66 69 63 61 74 ng CA certificat
3f30: 65 20 74 68 61 74 20 73 69 67 6e 65 64 0a 09 20 e that signed..
3f40: 20 20 20 74 68 65 20 53 53 4c 20 63 65 72 74 69 the SSL certi
3f50: 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 ficate as a hex
3f60: 73 74 72 69 6e 67 2e 20 54 68 69 73 20 76 61 6c string. This val
3f70: 75 65 20 6d 61 74 63 68 65 73 20 74 68 65 20 53 ue matches the S
3f80: 4b 49 0a 09 20 20 20 20 76 61 6c 75 65 20 6f 66 KI.. value of
3f90: 20 74 68 65 20 49 6e 74 65 72 6d 65 64 69 61 74 the Intermediat
3fa0: 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 e CA certificate
3fb0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
3fc0: 6f 6e 67 3e 73 75 62 6a 65 63 74 4b 65 79 49 64 ong>subjectKeyId
3fd0: 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e 67 entifier</strong
3fe0: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
3ff0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 53 4b 49 ></dt>..<dd>(SKI
4000: 29 20 48 61 73 68 20 6f 66 20 74 68 65 20 70 75 ) Hash of the pu
4010: 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65 20 blic key inside
4020: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
4030: 61 73 20 61 20 68 65 78 0a 09 20 20 20 20 73 74 as a hex.. st
4040: 72 69 6e 67 2e 20 55 73 65 64 20 74 6f 20 69 64 ring. Used to id
4050: 65 6e 74 69 66 79 20 63 65 72 74 69 66 69 63 61 entify certifica
4060: 74 65 73 20 74 68 61 74 20 63 6f 6e 74 61 69 6e tes that contain
4070: 20 61 20 70 61 72 74 69 63 75 6c 61 72 0a 09 20 a particular..
4080: 20 20 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c 2f public key.</
4090: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
40a0: 3e 73 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65 3c >subjectAltName<
40b0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 /strong> <em>lis
40c0: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 t</em></dt>..<dd
40d0: 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66 20 >List of all of
40e0: 74 68 65 20 61 6c 74 65 72 6e 61 74 69 76 65 20 the alternative
40f0: 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 domain names, su
4100: 62 20 64 6f 6d 61 69 6e 73 2c 0a 09 20 20 20 20 b domains,..
4110: 61 6e 64 20 49 50 20 61 64 64 72 65 73 73 65 73 and IP addresses
4120: 20 74 68 61 74 20 61 72 65 20 73 65 63 75 72 65 that are secure
4130: 64 20 62 79 20 74 68 65 20 63 65 72 74 69 66 69 d by the certifi
4140: 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e cate.</dd>..<dt>
4150: 3c 73 74 72 6f 6e 67 3e 6f 63 73 70 3c 2f 73 74 <strong>ocsp</st
4160: 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f rong> <em>list</
4170: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 em></dt>..<dd>Li
4180: 73 74 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 st of all Online
4190: 20 43 65 72 74 69 66 69 63 61 74 65 20 53 74 61 Certificate Sta
41a0: 74 75 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 tus Protocol (OC
41b0: 53 50 29 20 55 52 4c 73 2e 3c 2f 64 64 3e 0a 09 SP) URLs.</dd>..
41c0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 65 72 74 <dt><strong>cert
41d0: 69 66 69 63 61 74 65 3c 2f 73 74 72 6f 6e 67 3e ificate</strong>
41e0: 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 3c 2f <em>cert</em></
41f0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 50 45 4d dt>..<dd>The PEM
4200: 20 65 6e 63 6f 64 65 64 20 63 65 72 74 69 66 69 encoded certifi
4210: 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e cate.</dd>..<dt>
4220: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 <strong>signatur
4230: 65 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f eAlgorithm</stro
4240: 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 ng> <em>algorith
4250: 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 m</em></dt>..<dd
4260: 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 >Cipher algorith
4270: 6d 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 m used for the c
4280: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
4290: 74 75 72 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e ture.</dd>..<dt>
42a0: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 <strong>signatur
42b0: 65 56 61 6c 75 65 3c 2f 73 74 72 6f 6e 67 3e 20 eValue</strong>
42c0: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c <em>string</em><
42d0: 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 /dt>..<dd>Certif
42e0: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
42f0: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e as a hex string.
4300: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
4310: 6e 67 3e 73 69 67 6e 61 74 75 72 65 44 69 67 65 ng>signatureDige
4320: 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e st</strong> <em>
4330: 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 version</em></dt
4340: 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 >..<dd>Certifica
4350: 74 65 20 73 69 67 6e 69 6e 67 20 64 69 67 65 73 te signing diges
4360: 74 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e t as a hex strin
4370: 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 g.</dd>..<dt><st
4380: 72 6f 6e 67 3e 70 75 62 6c 69 63 4b 65 79 41 6c rong>publicKeyAl
4390: 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e gorithm</strong>
43a0: 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f <em>algorithm</
43b0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 em></dt>..<dd>Ce
43c0: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 rtificate signat
43d0: 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 ure public key a
43e0: 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 lgorithm.</dd>..
43f0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c <dt><strong>publ
4400: 69 63 4b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c icKey</strong> <
4410: 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f em>string</em></
4420: 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 dt>..<dd>Certifi
4430: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 cate signature p
4440: 75 62 6c 69 63 20 6b 65 79 20 61 73 20 61 20 68 ublic key as a h
4450: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a ex string.</dd>.
4460: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74 .<dt><strong>bit
4470: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e s</strong> <em>n
4480: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
4490: 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 Number of bits u
44a0: 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 sed for certific
44b0: 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 6b 65 ate signature ke
44c0: 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 y.</dd>..<dt><st
44d0: 72 6f 6e 67 3e 73 65 6c 66 5f 73 69 67 6e 65 64 rong>self_signed
44e0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
44f0: 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a olean</em></dt>.
4500: 09 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 .<dd>Whether the
4510: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 certificate sig
4520: 6e 61 74 75 72 65 20 69 73 20 73 65 6c 66 20 73 nature is self s
4530: 69 67 6e 65 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 igned.</dd>..<dt
4540: 3e 3c 73 74 72 6f 6e 67 3e 73 68 61 31 5f 68 61 ><strong>sha1_ha
4550: 73 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e sh</strong> <em>
4560: 68 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 hash</em></dt>..
4570: 3c 64 64 3e 54 68 65 20 53 48 41 31 20 68 61 73 <dd>The SHA1 has
4580: 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 h of the certifi
4590: 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74 cate as a hex st
45a0: 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e ring.</dd>..<dt>
45b0: 3c 73 74 72 6f 6e 67 3e 73 68 61 32 35 36 5f 68 <strong>sha256_h
45c0: 61 73 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ash</strong> <em
45d0: 3e 68 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >hash</em></dt>.
45e0: 09 3c 64 64 3e 54 68 65 20 53 48 41 32 35 36 20 .<dd>The SHA256
45f0: 68 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 hash of the cert
4600: 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78 ificate as a hex
4610: 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 20 20 string.</dd>.
4620: 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 62 6c </dl>. </bl
4630: 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c ockquote>.. <
4640: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
4650: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 73 74 :connection"><st
4660: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 rong>tls::connec
4670: 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 tion</strong>.
4680: 20 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 <em>channel</e
4690: 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 m></a></dt>.
46a0: 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 <dd>Returns the
46b0: 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 current connecti
46c0: 6f 6e 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 on status of an
46d0: 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 SSL channel. The
46e0: 0a 09 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 ..result is a li
46f0: 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 st of key-value
4700: 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 pairs describing
4710: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e the connection.
4720: 3c 2f 64 64 3e 0a 20 20 20 20 3c 62 6c 6f 63 6b </dd>. <block
4730: 71 75 6f 74 65 3e 0a 20 20 20 20 3c 62 3e 53 53 quote>. <b>SS
4740: 4c 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 L Status</b>.
4750: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f <dl>..<dt><stro
4760: 6e 67 3e 73 74 61 74 65 3c 2f 73 74 72 6f 6e 67 ng>state</strong
4770: 3e 20 3c 65 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e > <em>state</em>
4780: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 74 61 74 65 </dt>..<dd>State
4790: 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 of the connecti
47a0: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 on.</dd>..<dt><s
47b0: 74 72 6f 6e 67 3e 73 65 72 76 65 72 6e 61 6d 65 trong>servername
47c0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 </strong> <em>na
47d0: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 me</em></dt>..<d
47e0: 64 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 d>The name of th
47f0: 65 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 e connected to s
4800: 65 72 76 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 erver.</dd>..<dt
4810: 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f ><strong>protoco
4820: 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 l</strong> <em>v
4830: 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e ersion</em></dt>
4840: 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 ..<dd>The protoc
4850: 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 ol version used
4860: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
4870: 6f 6e 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 on:.. SSL2, S
4880: 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e SL3, TLS1, TLS1.
4890: 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 1, TLS1.2, TLS1.
48a0: 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 3, or unknown.</
48b0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
48c0: 3e 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 >renegotiation_a
48d0: 6c 6c 6f 77 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 llowed</strong>
48e0: 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e <em>boolean</em>
48f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 </dt>..<dd>Wheth
4900: 65 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 er protocol rene
4910: 67 6f 74 69 61 74 69 6f 6e 20 69 73 20 73 75 70 gotiation is sup
4920: 70 6f 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f ported or not.</
4930: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4940: 3e 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c >security_level<
4950: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 65 76 /strong> <em>lev
4960: 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 el</em></dt>..<d
4970: 64 3e 54 68 65 20 73 65 63 75 72 69 74 79 20 6c d>The security l
4980: 65 76 65 6c 20 75 73 65 64 20 66 6f 72 20 73 65 evel used for se
4990: 6c 65 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 lection of ciphe
49a0: 72 73 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 rs, key size, et
49b0: 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 c.</dd>..<dt><st
49c0: 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 72 65 75 rong>session_reu
49d0: 73 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d sed</strong> <em
49e0: 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 >boolean</em></d
49f0: 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20 t>..<dd>Whether
4a00: 74 68 65 20 73 65 73 73 69 6f 6e 20 68 61 73 20 the session has
4a10: 62 65 65 6e 20 72 65 75 73 65 64 20 6f 72 20 6e been reused or n
4a20: 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 ot.</dd>..<dt><s
4a30: 74 72 6f 6e 67 3e 69 73 5f 73 65 72 76 65 72 3c trong>is_server<
4a40: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
4a50: 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 lean</em></dt>..
4a60: 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 20 <dd>Whether the
4a70: 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 63 6f connection is co
4a80: 6e 66 69 67 75 72 65 64 20 61 73 20 61 20 73 65 nfigured as a se
4a90: 72 76 65 72 20 28 31 29 20 6f 72 20 63 6c 69 65 rver (1) or clie
4aa0: 6e 74 20 28 30 29 2e 3c 2f 64 64 3e 0a 09 3c 64 nt (0).</dd>..<d
4ab0: 74 3e 3c 73 74 72 6f 6e 67 3e 63 6f 6d 70 72 65 t><strong>compre
4ac0: 73 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c ssion</strong> <
4ad0: 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 em>mode</em></dt
4ae0: 3e 0a 09 3c 64 64 3e 43 6f 6d 70 72 65 73 73 69 >..<dd>Compressi
4af0: 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a on method.</dd>.
4b00: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 65 78 70 .<dt><strong>exp
4b10: 61 6e 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 ansion</strong>
4b20: 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 <em>mode</em></d
4b30: 74 3e 0a 09 3c 64 64 3e 45 78 70 61 6e 73 69 6f t>..<dd>Expansio
4b40: 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 09 n method.</dd>..
4b50: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 61 4c 69 <dt><strong>caLi
4b60: 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e st</strong> <em>
4b70: 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 list</em></dt>..
4b80: 3c 64 64 3e 4c 69 73 74 20 6f 66 20 43 65 72 74 <dd>List of Cert
4b90: 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 ificate Authorit
4ba0: 69 65 73 20 28 43 41 29 20 66 6f 72 20 58 2e 35 ies (CA) for X.5
4bb0: 30 39 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 09 certificate.<
4bc0: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 20 /dd>. </dl>.
4bd0: 20 20 20 3c 62 3e 43 69 70 68 65 72 20 49 6e 66 <b>Cipher Inf
4be0: 6f 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 o</b>. <dl>..
4bf0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 <dt><strong>ciph
4c00: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e er</strong> <em>
4c10: 63 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e cipher</em></dt>
4c20: 0a 09 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e ..<dd>The curren
4c30: 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 t cipher in use
4c40: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
4c50: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 on.</dd>..<dt><s
4c60: 74 72 6f 6e 67 3e 73 74 61 6e 64 61 72 64 5f 6e trong>standard_n
4c70: 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ame</strong> <em
4c80: 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >name</em></dt>.
4c90: 09 3c 64 64 3e 54 68 65 20 73 74 61 6e 64 61 72 .<dd>The standar
4ca0: 64 20 52 46 43 20 6e 61 6d 65 20 6f 66 20 63 69 d RFC name of ci
4cb0: 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e pher.</dd>..<dt>
4cc0: 3c 73 74 72 6f 6e 67 3e 61 6c 67 6f 72 69 74 68 <strong>algorith
4cd0: 6d 5f 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 m_bits</strong>
4ce0: 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a <em>n</em></dt>.
4cf0: 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 .<dd>The number
4d00: 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 69 74 of processed bit
4d10: 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 68 65 s used for ciphe
4d20: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 r.</dd>..<dt><st
4d30: 72 6f 6e 67 3e 73 65 63 72 65 74 5f 62 69 74 73 rong>secret_bits
4d40: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c </strong> <em>n<
4d50: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
4d60: 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 he number of sec
4d70: 72 65 74 20 62 69 74 73 20 75 73 65 64 20 66 6f ret bits used fo
4d80: 72 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 r cipher.</dd>..
4d90: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6d 69 6e 5f <dt><strong>min_
4da0: 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e version</strong>
4db0: 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d <em>version</em
4dc0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
4dd0: 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c minimum protocol
4de0: 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 69 70 version for cip
4df0: 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c her.</dd>..<dt><
4e00: 73 74 72 6f 6e 67 3e 63 69 70 68 65 72 5f 69 73 strong>cipher_is
4e10: 5f 61 65 61 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c _aead</strong> <
4e20: 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c em>boolean</em><
4e30: 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 /dt>..<dd>Whethe
4e40: 72 20 74 68 65 20 63 69 70 68 65 72 20 69 73 20 r the cipher is
4e50: 41 75 74 68 65 6e 74 69 63 61 74 65 64 20 45 6e Authenticated En
4e60: 63 72 79 70 74 69 6f 6e 20 77 69 74 68 0a 09 20 cryption with..
4e70: 20 20 20 41 73 73 6f 63 69 61 74 65 64 20 44 61 Associated Da
4e80: 74 61 20 28 41 45 41 44 29 2e 3c 2f 64 64 3e 0a ta (AEAD).</dd>.
4e90: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 .<dt><strong>cip
4ea0: 68 65 72 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 her_id</strong>
4eb0: 3c 65 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f 64 74 3e <em>id</em></dt>
4ec0: 0a 09 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 ..<dd>The OpenSS
4ed0: 4c 20 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 L cipher id.</dd
4ee0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 64 >..<dt><strong>d
4ef0: 65 73 63 72 69 70 74 69 6f 6e 3c 2f 73 74 72 6f escription</stro
4f00: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ng> <em>string</
4f10: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 20 em></dt>..<dd>A
4f20: 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e text description
4f30: 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c of the cipher.<
4f40: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4f50: 67 3e 68 61 6e 64 73 68 61 6b 65 5f 64 69 67 65 g>handshake_dige
4f60: 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e st</strong> <em>
4f70: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 boolean</em></dt
4f80: 3e 0a 09 3c 64 64 3e 44 69 67 65 73 74 20 75 73 >..<dd>Digest us
4f90: 65 64 20 64 75 72 69 6e 67 20 68 61 6e 64 73 68 ed during handsh
4fa0: 61 6b 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f ake.</dd>. </
4fb0: 64 6c 3e 0a 20 20 20 20 3c 62 3e 53 65 73 73 69 dl>. <b>Sessi
4fc0: 6f 6e 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 20 on Info</b>.
4fd0: 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e <dl>..<dt><stron
4fe0: 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 g>alpn</strong>
4ff0: 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d <em>protocol</em
5000: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
5010: 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 protocol selecte
5020: 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 d after Applicat
5030: 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 ion-Layer Protoc
5040: 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 74 ol.. Negotiat
5050: 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e ion (ALPN).</dd>
5060: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 65 ..<dt><strong>re
5070: 73 75 6d 61 62 6c 65 3c 2f 73 74 72 6f 6e 67 3e sumable</strong>
5080: 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d <em>boolean</em
5090: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 ></dt>..<dd>Whet
50a0: 68 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 her the session
50b0: 63 61 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f can be resumed o
50c0: 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 r not.</dd>..<dt
50d0: 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 72 74 5f 74 ><strong>start_t
50e0: 69 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ime</strong> <em
50f0: 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 >seconds</em></d
5100: 74 3e 0a 09 3c 64 64 3e 54 69 6d 65 20 73 69 6e t>..<dd>Time sin
5110: 63 65 20 73 65 73 73 69 6f 6e 20 73 74 61 72 74 ce session start
5120: 65 64 20 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 ed in seconds si
5130: 6e 63 65 20 65 70 6f 63 68 2e 3c 2f 64 64 3e 0a nce epoch.</dd>.
5140: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 6d .<dt><strong>tim
5150: 65 6f 75 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 eout</strong> <e
5160: 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f m>seconds</em></
5170: 64 74 3e 0a 09 3c 64 64 3e 4d 61 78 20 64 75 72 dt>..<dd>Max dur
5180: 61 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e ation of session
5190: 20 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f in seconds befo
51a0: 72 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 64 64 re time-out.</dd
51b0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6c >..<dt><strong>l
51c0: 69 66 65 74 69 6d 65 3c 2f 73 74 72 6f 6e 67 3e ifetime</strong>
51d0: 20 3c 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d <em>seconds</em
51e0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 73 73 ></dt>..<dd>Sess
51f0: 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 ion ticket lifet
5200: 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f ime hint in seco
5210: 6e 64 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c nds.</dd>..<dt><
5220: 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 69 strong>session_i
5230: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 d</strong> <em>b
5240: 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d inary_string</em
5250: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 ></dt>..<dd>Uniq
5260: 75 65 20 73 65 73 73 69 6f 6e 20 69 64 20 66 6f ue session id fo
5270: 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e r use in resumin
5280: 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f g the session.</
5290: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
52a0: 3e 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c >session_ticket<
52b0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e /strong> <em>bin
52c0: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c ary_string</em><
52d0: 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 /dt>..<dd>Unique
52e0: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 session ticket
52f0: 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d for use in resum
5300: 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e ing the session.
5310: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
5320: 6e 67 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 ng>ticket_app_da
5330: 74 61 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ta</strong> <em>
5340: 62 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 binary_string</e
5350: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 m></dt>..<dd>Uni
5360: 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b que session tick
5370: 65 74 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 et application d
5380: 61 74 61 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ata.</dd>..<dt><
5390: 73 74 72 6f 6e 67 3e 6d 61 73 74 65 72 5f 6b 65 strong>master_ke
53a0: 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 y</strong> <em>b
53b0: 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d inary_string</em
53c0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 ></dt>..<dd>Uniq
53d0: 75 65 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 ue session maste
53e0: 72 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 r key.</dd>..<dt
53f0: 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e ><strong>session
5400: 5f 63 61 63 68 65 5f 6d 6f 64 65 3c 2f 73 74 72 _cache_mode</str
5410: 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 ong> <em>mode</e
5420: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 72 m></dt>..<dd>Ser
5430: 76 65 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28 ver cache mode (
5440: 63 6c 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 client, server,
5450: 6f 72 20 62 6f 74 68 29 2e 3c 2f 64 64 3e 0a 20 or both).</dd>.
5460: 20 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 62 </dl>. </b
5470: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 lockquote>..
5480: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
5490: 3a 3a 63 69 70 68 65 72 73 22 3e 3c 73 74 72 6f ::ciphers"><stro
54a0: 6e 67 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c ng>tls::ciphers<
54b0: 2f 73 74 72 6f 6e 67 3e 0a 09 3c 65 6d 3e 3f 70 /strong>..<em>?p
54c0: 72 6f 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 rotocol? ?verbos
54d0: 65 3f 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f e? ?supported?</
54e0: 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 em></a></dt>.
54f0: 20 3c 64 64 3e 57 69 74 68 6f 75 74 20 61 6e 79 <dd>Without any
5500: 20 61 72 67 73 2c 20 72 65 74 75 72 6e 73 20 61 args, returns a
5510: 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 73 79 6d list of all sym
5520: 6d 65 74 72 69 63 20 63 69 70 68 65 72 73 20 66 metric ciphers f
5530: 6f 72 20 75 73 65 0a 09 77 69 74 68 20 74 68 65 or use..with the
5540: 20 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 <strong>-cipher
5550: 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e </strong> option
5560: 2e 20 57 69 74 68 20 3c 65 6d 3e 70 72 6f 74 6f . With <em>proto
5570: 63 6f 6c 3c 2f 65 6d 3e 2c 0a 09 6f 6e 6c 79 20 col</em>,..only
5580: 74 68 65 20 63 69 70 68 65 72 73 20 73 75 70 70 the ciphers supp
5590: 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74 20 70 orted for that p
55a0: 72 6f 74 6f 63 6f 6c 20 61 72 65 20 72 65 74 75 rotocol are retu
55b0: 72 6e 65 64 2e 20 53 65 65 0a 09 3c 61 20 68 72 rned. See..<a hr
55c0: 65 66 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 ef="#tls::protoc
55d0: 6f 6c 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 ols"><strong>tls
55e0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 ::protocols</str
55f0: 6f 6e 67 3e 3c 2f 61 3e 20 63 6f 6d 6d 61 6e 64 ong></a> command
5600: 0a 09 66 6f 72 20 74 68 65 20 73 75 70 70 6f 72 ..for the suppor
5610: 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 49 ted protocols. I
5620: 66 20 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 f <em>verbose</e
5630: 6d 3e 20 69 73 20 73 70 65 63 69 66 69 65 64 20 m> is specified
5640: 61 73 20 74 72 75 65 0a 09 74 68 65 6e 20 61 20 as true..then a
5650: 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72 verbose, human r
5660: 65 61 64 61 62 6c 65 20 6c 69 73 74 20 69 73 20 eadable list is
5670: 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 61 64 returned with ad
5680: 64 69 74 69 6f 6e 61 6c 0a 09 69 6e 66 6f 72 6d ditional..inform
5690: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 ation on the cip
56a0: 68 65 72 2e 20 49 66 20 3c 65 6d 3e 73 75 70 70 her. If <em>supp
56b0: 6f 72 74 65 64 3c 2f 65 6d 3e 20 69 73 20 73 70 orted</em> is sp
56c0: 65 63 69 66 69 65 64 20 61 73 20 74 72 75 65 2c ecified as true,
56d0: 0a 09 74 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 ..then only the
56e0: 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 65 ciphers supporte
56f0: 64 20 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 20 77 d for protocol w
5700: 69 6c 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f ill be listed.</
5710: 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 dd>. <dt>&nbs
5720: 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e p;</dt>. <dt>
5730: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 70 72 <a name="tls::pr
5740: 6f 74 6f 63 6f 6c 73 22 3e 3c 73 74 72 6f 6e 67 otocols"><strong
5750: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c >tls::protocols<
5760: 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 /strong></a></dt
5770: 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e >. <dd>Return
5780: 73 20 61 20 6c 69 73 74 20 6f 66 20 74 68 65 20 s a list of the
5790: 73 75 70 70 6f 72 74 65 64 20 53 53 4c 2f 54 4c supported SSL/TL
57a0: 53 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c S protocols. Val
57b0: 69 64 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 09 id values are:..
57c0: 3c 62 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e <b>ssl2</b>, <b>
57d0: 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 ssl3</b>, <b>tls
57e0: 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 1</b>, <b>tls1.1
57f0: 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c </b>, <b>tls1.2<
5800: 2f 62 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 /b>,..and <b>tls
5810: 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 1.3</b>. Exact l
5820: 69 73 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f ist depends on O
5830: 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 penSSL version a
5840: 6e 64 0a 09 63 6f 6d 70 69 6c 65 20 74 69 6d 65 nd..compile time
5850: 20 66 6c 61 67 73 2e 3c 2f 64 64 3e 0a 20 20 20 flags.</dd>.
5860: 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e <dt> </dt>
5870: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
5880: 3d 22 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e ="tls::version">
5890: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 <strong>tls::ver
58a0: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 sion</strong></a
58b0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 ></dt>. <dd>R
58c0: 65 74 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 eturns the OpenS
58d0: 53 4c 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e SL version strin
58e0: 67 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 62 g.</dd>.</dl>.<b
58f0: 72 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 r>..<hr>..<h3><a
5900: 20 6e 61 6d 65 3d 22 43 45 52 54 49 46 49 43 41 name="CERTIFICA
5910: 54 45 20 56 41 4c 49 44 41 54 49 4f 4e 22 3e 43 TE VALIDATION">C
5920: 45 52 54 49 46 49 43 41 54 45 20 56 41 4c 49 44 ERTIFICATE VALID
5930: 41 54 49 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a ATION</a></h3>..
5940: 3c 70 3e 0a 42 79 20 64 65 66 61 75 6c 74 2c 20 <p>.By default,
5950: 61 20 63 6c 69 65 6e 74 20 54 4c 53 20 63 6f 6e a client TLS con
5960: 6e 65 63 74 69 6f 6e 20 69 73 20 73 65 74 20 74 nection is set t
5970: 6f 20 4e 4f 54 20 72 65 71 75 65 73 74 20 6e 6f o NOT request no
5980: 72 20 76 61 6c 69 64 61 74 65 20 74 68 65 0a 73 r validate the.s
5990: 65 72 76 65 72 20 63 65 72 74 69 66 69 63 61 74 erver certificat
59a0: 65 73 2e 20 54 68 69 73 20 6c 69 6d 69 74 61 74 es. This limitat
59b0: 69 6f 6e 20 69 73 20 64 75 65 20 74 6f 20 74 68 ion is due to th
59c0: 65 20 6c 61 63 6b 20 6f 66 20 61 20 63 6f 6d 6d e lack of a comm
59d0: 6f 6e 20 63 72 6f 73 73 0a 70 6c 61 74 66 6f 72 on cross.platfor
59e0: 6d 20 64 61 74 61 62 61 73 65 20 6f 66 20 43 65 m database of Ce
59f0: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 rtificate Author
5a00: 69 74 79 20 28 43 41 29 20 70 72 6f 76 69 64 65 ity (CA) provide
5a10: 64 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 d certificates t
5a20: 6f 0a 76 61 6c 69 64 61 74 65 20 61 67 61 69 6e o.validate again
5a30: 73 74 2e 20 4d 61 6e 79 20 4c 69 6e 75 78 20 73 st. Many Linux s
5a40: 79 73 74 65 6d 73 20 6e 61 74 69 76 65 6c 79 20 ystems natively
5a50: 73 75 70 70 6f 72 74 20 4f 70 65 6e 53 53 4c 20 support OpenSSL
5a60: 61 6e 64 20 74 68 75 73 20 68 61 76 65 0a 74 68 and thus have.th
5a70: 65 73 65 20 63 65 72 74 69 66 69 63 61 74 65 73 ese certificates
5a80: 20 69 6e 73 74 61 6c 6c 65 64 20 61 73 20 70 61 installed as pa
5a90: 72 74 20 6f 66 20 74 68 65 20 4f 53 2c 20 62 75 rt of the OS, bu
5aa0: 74 20 4d 61 63 4f 53 20 61 6e 64 20 57 69 6e 64 t MacOS and Wind
5ab0: 6f 77 73 20 64 6f 20 6e 6f 74 2e 0a 49 6e 20 6f ows do not..In o
5ac0: 72 64 65 72 20 74 6f 20 75 73 65 20 74 68 65 20 rder to use the
5ad0: 3c 62 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20 <b>-require</b>
5ae0: 6f 70 74 69 6f 6e 2c 20 6f 6e 65 20 6f 66 20 74 option, one of t
5af0: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 75 73 he following mus
5b00: 74 20 62 65 20 74 72 75 65 3a 3c 2f 70 3e 0a 3c t be true:</p>.<
5b10: 75 6c 3e 0a 3c 6c 69 3e 4f 6e 20 4c 69 6e 75 78 ul>.<li>On Linux
5b20: 20 61 6e 64 20 55 6e 69 78 20 73 79 73 74 65 6d and Unix system
5b30: 73 20 77 69 74 68 20 4f 70 65 6e 53 53 4c 20 61 s with OpenSSL a
5b40: 6c 72 65 61 64 79 20 69 6e 73 74 61 6c 6c 65 64 lready installed
5b50: 2c 20 69 66 20 74 68 65 20 43 41 0a 63 65 72 74 , if the CA.cert
5b60: 69 66 69 63 61 74 65 73 20 61 72 65 20 73 74 6f ificates are sto
5b70: 72 65 64 20 69 6e 20 74 68 65 20 73 74 61 6e 64 red in the stand
5b80: 61 72 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 6f ard locations, o
5b90: 72 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 r the <b>SSL_CER
5ba0: 54 5f 44 49 52 3c 2f 62 3e 0a 6f 72 20 3c 62 3e T_DIR</b>.or <b>
5bb0: 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 SSL_CERT_FILE</b
5bc0: 3e 20 65 6e 76 20 76 61 72 73 20 61 72 65 20 73 > env vars are s
5bd0: 65 74 2c 20 74 68 65 6e 20 6e 6f 20 6f 74 68 65 et, then no othe
5be0: 72 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e 65 r options are ne
5bf0: 65 64 65 64 2e 3c 2f 6c 69 3e 0a 0a 3c 6c 69 3e eded.</li>..<li>
5c00: 49 66 20 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f If OpenSSL is no
5c10: 74 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 74 t installed in t
5c20: 68 65 20 64 65 66 61 75 6c 74 20 6c 6f 63 61 74 he default locat
5c30: 69 6f 6e 2c 20 6f 72 20 77 68 65 6e 20 75 73 69 ion, or when usi
5c40: 6e 67 20 4d 61 63 20 4f 53 0a 6f 72 20 57 69 6e ng Mac OS.or Win
5c50: 64 6f 77 73 20 61 6e 64 20 4f 70 65 6e 53 53 4c dows and OpenSSL
5c60: 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 2c 20 74 is installed, t
5c70: 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 44 he <b>SSL_CERT_D
5c80: 49 52 3c 2f 62 3e 20 61 6e 64 2f 6f 72 20 0a 3c IR</b> and/or .<
5c90: 62 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c b>SSL_CERT_FILE<
5ca0: 2f 62 3e 20 65 6e 76 20 76 61 72 73 20 6f 72 20 /b> env vars or
5cb0: 74 68 65 20 3c 62 3e 2d 63 61 64 69 72 3c 2f 62 the <b>-cadir</b
5cc0: 3e 20 61 6e 64 2f 6f 72 20 3c 62 3e 2d 63 61 66 > and/or <b>-caf
5cd0: 69 6c 65 3c 2f 62 3e 0a 20 6f 70 74 69 6f 6e 73 ile</b>. options
5ce0: 20 6d 75 73 74 20 62 65 20 64 65 66 69 6e 65 64 must be defined
5cf0: 2e 3c 2f 6c 69 3e 0a 0a 3c 6c 69 3e 4f 6e 20 57 .</li>..<li>On W
5d00: 69 6e 64 6f 77 73 2c 20 73 74 61 72 74 69 6e 67 indows, starting
5d10: 20 69 6e 20 4f 70 65 6e 53 53 4c 20 33 2e 32 2c in OpenSSL 3.2,
5d20: 20 69 74 20 69 73 20 6e 6f 77 20 70 6f 73 73 69 it is now possi
5d30: 62 6c 65 20 74 6f 20 61 63 63 65 73 73 20 74 68 ble to access th
5d40: 65 0a 62 75 69 6c 74 2d 69 6e 20 57 69 6e 64 6f e.built-in Windo
5d50: 77 73 20 43 65 72 74 69 66 69 63 61 74 65 20 53 ws Certificate S
5d60: 74 6f 72 65 20 66 72 6f 6d 20 4f 70 65 6e 53 53 tore from OpenSS
5d70: 4c 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 61 L. This can be a
5d80: 63 68 69 65 76 65 64 20 62 79 0a 73 65 74 74 69 chieved by.setti
5d90: 6e 67 20 74 68 65 20 3c 62 3e 2d 63 61 73 74 6f ng the <b>-casto
5da0: 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 74 6f re</b> option to
5db0: 20 22 3c 62 3e 6f 72 67 2e 6f 70 65 6e 73 73 6c "<b>org.openssl
5dc0: 2e 77 69 6e 73 74 6f 72 65 3a 2f 2f 3c 2f 62 3e .winstore://</b>
5dd0: 22 2e 3c 2f 6c 69 3e 0a 0a 3c 6c 69 3e 49 66 20 ".</li>..<li>If
5de0: 4f 70 65 6e 53 53 4c 20 69 73 20 6e 6f 74 20 69 OpenSSL is not i
5df0: 6e 73 74 61 6c 6c 65 64 2c 20 74 68 65 20 43 41 nstalled, the CA
5e00: 20 63 65 72 74 69 66 69 63 61 74 65 73 20 6d 75 certificates mu
5e10: 73 74 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 st be downloaded
5e20: 20 61 6e 64 0a 69 6e 73 74 61 6c 6c 65 64 20 77 and.installed w
5e30: 69 74 68 20 74 68 65 20 75 73 65 72 20 73 6f 66 ith the user sof
5e40: 74 77 61 72 65 2e 20 54 68 65 20 43 55 52 4c 20 tware. The CURL
5e50: 74 65 61 6d 20 6d 61 6b 65 73 20 74 68 65 6d 20 team makes them
5e60: 61 76 61 69 6c 61 62 6c 65 20 61 74 0a 3c 61 20 available at.<a
5e70: 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 63 75 href="https://cu
5e80: 72 6c 2e 73 65 2f 64 6f 63 73 2f 63 61 65 78 74 rl.se/docs/caext
5e90: 72 61 63 74 2e 68 74 6d 6c 22 3e 43 41 20 63 65 ract.html">CA ce
5ea0: 72 74 69 66 69 63 61 74 65 73 20 65 78 74 72 61 rtificates extra
5eb0: 63 74 65 64 0a 66 72 6f 6d 20 4d 6f 7a 69 6c 6c cted.from Mozill
5ec0: 61 3c 2f 61 3e 2e 20 4c 6f 6f 6b 20 66 6f 72 20 a</a>. Look for
5ed0: 74 68 65 20 3c 62 3e 63 61 63 65 72 74 2e 70 65 the <b>cacert.pe
5ee0: 6d 3c 2f 62 3e 20 66 69 6c 65 2e 20 59 6f 75 20 m</b> file. You
5ef0: 6d 75 73 74 20 74 68 65 6e 20 65 69 74 68 65 72 must then either
5f00: 0a 73 65 74 20 74 68 65 20 3c 62 3e 53 53 4c 5f .set the <b>SSL_
5f10: 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e 64 CERT_DIR</b> and
5f20: 2f 6f 72 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f /or <b>SSL_CERT_
5f30: 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 20 76 61 72 FILE</b> env var
5f40: 73 20 6f 72 20 74 68 65 0a 3c 62 3e 2d 63 61 64 s or the.<b>-cad
5f50: 69 72 3c 2f 62 3e 20 6f 72 20 3c 62 3e 2d 63 61 ir</b> or <b>-ca
5f60: 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 73 file</b> options
5f70: 20 6d 75 73 74 20 62 65 20 73 65 74 20 74 6f 20 must be set to
5f80: 74 68 65 20 66 69 6c 65 27 73 20 69 6e 73 74 61 the file's insta
5f90: 6c 6c 0a 6c 6f 63 61 74 69 6f 6e 2e 20 49 74 20 ll.location. It
5fa0: 69 73 20 79 6f 75 72 20 72 65 73 70 6f 6e 73 69 is your responsi
5fb0: 62 69 6c 69 74 79 20 74 6f 20 6b 65 65 70 20 74 bility to keep t
5fc0: 68 69 73 20 66 69 6c 65 20 75 70 20 74 6f 20 64 his file up to d
5fd0: 61 74 65 2e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a ate.</li>.</ul>.
5fe0: 3c 62 72 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e <br>..<hr>..<h3>
5ff0: 3c 61 20 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43 <a name="CALLBAC
6000: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 K OPTIONS">CALLB
6010: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c ACK OPTIONS</a><
6020: 2f 68 33 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64 /h3>..<p>.As ind
6030: 69 63 61 74 65 64 20 61 62 6f 76 65 2c 20 69 6e icated above, in
6040: 64 69 76 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c dividual channel
6050: 73 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 s can be given t
6060: 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 heir own callbac
6070: 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 ks.to handle int
6080: 65 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 ermediate proces
6090: 73 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e sing by the Open
60a0: 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 SSL library, usi
60b0: 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 2d ng the.<strong>-
60c0: 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e command</strong>
60d0: 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 , <strong>-passw
60e0: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e ord</strong>, an
60f0: 64 0a 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 d.<strong>-valid
6100: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 ate_command</str
6110: 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 20 70 61 73 ong> options pas
6120: 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 6f 66 sed to either of
6130: 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f .<strong>tls::so
6140: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 6f 72 cket</strong> or
6150: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d <strong>tls::im
6160: 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 55 port</strong>..U
6170: 6e 6c 69 6b 65 20 70 72 65 76 69 6f 75 73 20 76 nlike previous v
6180: 65 72 73 69 6f 6e 73 20 6f 66 20 54 43 4c 20 54 ersions of TCL T
6190: 4c 53 2c 20 6f 6e 6c 79 20 69 66 20 74 68 65 20 LS, only if the
61a0: 63 61 6c 6c 62 61 63 6b 20 67 65 6e 65 72 61 74 callback generat
61b0: 65 73 20 61 6e 20 65 72 72 6f 72 2c 0a 77 69 6c es an error,.wil
61c0: 6c 20 74 68 65 20 3c 62 3e 62 67 65 72 72 6f 72 l the <b>bgerror
61d0: 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 77 69 6c </b> command wil
61e0: 6c 20 62 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 l be invoked wit
61f0: 68 20 74 68 65 20 65 72 72 6f 72 20 69 6e 66 6f h the error info
6200: 72 6d 61 74 69 6f 6e 2e 0a 3c 2f 70 3e 0a 0a 3c rmation..</p>..<
6210: 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 dl>. <dt><str
6220: 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 ong>-command</st
6230: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 rong> <em>callba
6240: 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 ck</em></dt>.
6250: 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 <dd>..Invokes t
6260: 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d he specified <em
6270: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 >callback</em> s
6280: 63 72 69 70 74 20 61 74 20 73 65 76 65 72 61 6c cript at several
6290: 20 70 6f 69 6e 74 73 0a 09 64 75 72 69 6e 67 20 points..during
62a0: 74 68 65 20 4f 70 65 6e 53 53 4c 20 68 61 6e 64 the OpenSSL hand
62b0: 73 68 61 6b 65 20 61 6e 64 20 75 73 65 2e 20 53 shake and use. S
62c0: 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 ee below for the
62d0: 20 70 6f 73 73 69 62 6c 65 0a 09 61 72 67 75 6d possible..argum
62e0: 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 ents passed to t
62f0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 he callback scri
6300: 70 74 2e 20 56 61 6c 75 65 73 20 72 65 74 75 72 pt. Values retur
6310: 6e 65 64 20 66 72 6f 6d 20 74 68 65 0a 09 63 61 ned from the..ca
6320: 6c 6c 62 61 63 6b 20 61 72 65 20 69 67 6e 6f 72 llback are ignor
6330: 65 64 2e 0a 20 20 20 20 3c 62 72 3e 0a 20 20 20 ed.. <br>.
6340: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 0a 09 3c 73 74 <dl>..<dt>..<st
6350: 72 6f 6e 67 3e 65 72 72 6f 72 3c 2f 73 74 72 6f rong>error</stro
6360: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 49 ng> <em>channelI
6370: 64 20 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 d message</em>..
6380: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 20 </dt>..<dd>..
6390: 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 This form of ca
63a0: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 llback is invoke
63b0: 64 20 77 68 65 6e 65 76 65 72 20 61 6e 20 65 72 d whenever an er
63c0: 72 6f 72 20 6f 63 63 75 72 73 20 64 75 72 69 6e ror occurs durin
63d0: 67 20 74 68 65 0a 09 20 20 20 20 69 6e 69 74 69 g the.. initi
63e0: 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 al connection, h
63f0: 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f andshake, or I/O
6400: 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 operations. The
6410: 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 6d <em>message</em
6420: 3e 0a 09 20 20 20 20 61 72 67 75 6d 65 6e 74 20 >.. argument
6430: 63 61 6e 20 62 65 20 66 72 6f 6d 20 74 68 65 20 can be from the
6440: 54 63 6c 5f 45 72 72 6e 6f 4d 73 67 2c 20 4f 70 Tcl_ErrnoMsg, Op
6450: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 enSSL function..
6460: 20 20 20 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65 <code>ERR_re
6470: 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e ason_error_strin
6480: 67 28 29 3c 2f 63 6f 64 65 3e 2c 20 6f 72 20 61 g()</code>, or a
6490: 20 63 75 73 74 6f 6d 20 6d 65 73 73 61 67 65 2e custom message.
64a0: 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e 0a 09 3c ..</dd>..<br>..<
64b0: 64 74 3e 0a 09 20 20 20 20 3c 73 74 72 6f 6e 67 dt>.. <strong
64c0: 3e 69 6e 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c >info</strong> <
64d0: 65 6d 3e 63 68 61 6e 6e 65 6c 49 64 20 6d 61 6a em>channelId maj
64e0: 6f 72 20 6d 69 6e 6f 72 20 6d 65 73 73 61 67 65 or minor message
64f0: 20 74 79 70 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 type</em>..</dt
6500: 3e 0a 09 3c 64 64 3e 0a 09 20 20 20 20 20 54 68 >..<dd>.. Th
6510: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 is form of callb
6520: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 ack is invoked b
6530: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 y the OpenSSL fu
6540: 6e 63 74 69 6f 6e 0a 09 20 20 20 20 3c 63 6f 64 nction.. <cod
6550: 65 3e 53 53 4c 5f 73 65 74 5f 69 6e 66 6f 5f 63 e>SSL_set_info_c
6560: 61 6c 6c 62 61 63 6b 28 29 3c 2f 63 6f 64 65 3e allback()</code>
6570: 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 during the init
6580: 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 0a 09 ial connection..
6590: 20 20 20 20 61 6e 64 20 68 61 6e 64 73 68 61 6b and handshak
65a0: 65 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 e operations. Th
65b0: 65 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 e <em>type</em>
65c0: 61 72 67 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 argument is new
65d0: 66 6f 72 0a 09 20 20 20 20 54 4c 53 20 31 2e 38 for.. TLS 1.8
65e0: 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 . The arguments
65f0: 61 72 65 3a 0a 09 3c 62 72 3e 0a 09 3c 75 6c 3e are:..<br>..<ul>
6600: 0a 09 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 20 76 ..<li>Possible v
6610: 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 alues for <em>ma
6620: 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 jor</em> are:..
6630: 20 20 20 3c 63 6f 64 65 3e 68 61 6e 64 73 68 61 <code>handsha
6640: 6b 65 2c 20 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 ke, alert, conne
6650: 63 74 2c 20 61 63 63 65 70 74 3c 2f 63 6f 64 65 ct, accept</code
6660: 3e 2e 3c 2f 6c 69 3e 0a 09 3c 6c 69 3e 50 6f 73 >.</li>..<li>Pos
6670: 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 sible values for
6680: 20 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 <em>minor</em>
6690: 61 72 65 3a 0a 09 20 20 20 20 3c 63 6f 64 65 3e are:.. <code>
66a0: 73 74 61 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61 start, done, rea
66b0: 64 2c 20 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 d, write, loop,
66c0: 65 78 69 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 exit</code>.</li
66d0: 3e 0a 09 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 6d >..<li>The <em>m
66e0: 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 essage</em> argu
66f0: 6d 65 6e 74 20 69 73 20 61 20 64 65 73 63 72 69 ment is a descri
6700: 70 74 69 76 65 20 73 74 72 69 6e 67 20 77 68 69 ptive string whi
6710: 63 68 20 6d 61 79 0a 09 20 20 20 20 62 65 20 67 ch may.. be g
6720: 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 20 enerated either
6730: 62 79 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 by <code>SSL_sta
6740: 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 te_string_long()
6750: 3c 2f 63 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 </code> or by..
6760: 20 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 61 6c 65 <code>SSL_ale
6770: 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c rt_desc_string_l
6780: 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e 2c 20 64 65 ong()</code>, de
6790: 70 65 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 pending on the c
67a0: 6f 6e 74 65 78 74 2e 3c 2f 6c 69 3e 0a 09 3c 6c ontext.</li>..<l
67b0: 69 3e 46 6f 72 20 61 6c 65 72 74 73 2c 20 74 68 i>For alerts, th
67c0: 65 20 70 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 e possible value
67d0: 73 20 66 6f 72 20 3c 65 6d 3e 74 79 70 65 3c 2f s for <em>type</
67e0: 65 6d 3e 20 61 72 65 3a 0a 09 20 20 20 20 3c 63 em> are:.. <c
67f0: 6f 64 65 3e 77 61 72 6e 69 6e 67 2c 20 66 61 74 ode>warning, fat
6800: 61 6c 2c 20 61 6e 64 20 75 6e 6b 6e 6f 77 6e 3c al, and unknown<
6810: 2f 63 6f 64 65 3e 2e 20 46 6f 72 20 6f 74 68 65 /code>. For othe
6820: 72 73 2c 0a 09 20 20 20 20 3c 63 6f 64 65 3e 69 rs,.. <code>i
6830: 6e 66 6f 3c 2f 63 6f 64 65 3e 20 69 73 20 75 73 nfo</code> is us
6840: 65 64 2e 3c 2f 6c 69 3e 0a 09 3c 2f 75 6c 3e 0a ed.</li>..</ul>.
6850: 09 3c 2f 64 64 3e 0a 09 3c 64 74 3e 0a 09 3c 73 .</dd>..<dt>..<s
6860: 74 72 6f 6e 67 3e 6d 65 73 73 61 67 65 3c 2f 73 trong>message</s
6870: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e trong> <em>chann
6880: 65 6c 49 64 20 64 69 72 65 63 74 69 6f 6e 20 76 elId direction v
6890: 65 72 73 69 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 ersion content_t
68a0: 79 70 65 20 6d 65 73 73 61 67 65 3c 2f 65 6d 3e ype message</em>
68b0: 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 ..</dt>..<dd>..
68c0: 20 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 This form of
68d0: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
68e0: 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 ked by the OpenS
68f0: 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 20 SL function..
6900: 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 65 74 5f 6d <code>SSL_set_m
6910: 73 67 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 63 sg_callback()</c
6920: 6f 64 65 3e 20 77 68 65 6e 65 76 65 72 20 61 20 ode> whenever a
6930: 6d 65 73 73 61 67 65 20 69 73 20 73 65 6e 74 20 message is sent
6940: 6f 72 0a 09 20 20 20 20 72 65 63 65 69 76 65 64 or.. received
6950: 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e 69 74 during the init
6960: 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 ial connection,
6970: 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f handshake, or I/
6980: 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 0a 09 20 O operations...
6990: 20 20 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 It is only av
69a0: 61 69 6c 61 62 6c 65 20 77 68 65 6e 20 4f 70 65 ailable when Ope
69b0: 6e 53 53 4c 20 69 73 20 63 6f 6d 70 6c 69 65 64 nSSL is complied
69c0: 20 77 69 74 68 20 74 68 65 0a 09 20 20 20 20 3c with the.. <
69d0: 65 6d 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 em>enable-ssl-tr
69e0: 61 63 65 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e ace</em> option.
69f0: 20 41 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 20 Arguments are:
6a00: 3c 65 6d 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 65 <em>direction</e
6a10: 6d 3e 0a 09 20 20 20 20 69 73 20 3c 62 3e 53 65 m>.. is <b>Se
6a20: 6e 74 3c 2f 62 3e 20 6f 72 20 3c 62 3e 52 65 63 nt</b> or <b>Rec
6a30: 65 69 76 65 64 3c 2f 62 3e 2c 20 3c 65 6d 3e 76 eived</b>, <em>v
6a40: 65 72 73 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20 74 ersion</em> is t
6a50: 68 65 20 70 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 he protocol..
6a60: 20 76 65 72 73 69 6f 6e 2c 20 3c 65 6d 3e 63 6f version, <em>co
6a70: 6e 74 65 6e 74 5f 74 79 70 65 3c 2f 65 6d 3e 20 ntent_type</em>
6a80: 69 73 20 74 68 65 20 6d 65 73 73 61 67 65 20 63 is the message c
6a90: 6f 6e 74 65 6e 74 20 74 79 70 65 2c 20 61 6e 64 ontent type, and
6aa0: 0a 09 20 20 20 20 3c 65 6d 3e 6d 65 73 73 61 67 .. <em>messag
6ab0: 65 3c 2f 65 6d 3e 20 69 73 20 6d 6f 72 65 20 69 e</em> is more i
6ac0: 6e 66 6f 20 66 72 6f 6d 20 74 68 65 20 3c 63 6f nfo from the <co
6ad0: 64 65 3e 53 53 4c 5f 74 72 61 63 65 3c 2f 63 6f de>SSL_trace</co
6ae0: 64 65 3e 20 41 50 49 2e 0a 09 20 20 20 20 54 68 de> API... Th
6af0: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e is callback is n
6b00: 65 77 20 66 6f 72 20 54 4c 53 20 31 2e 38 2e 0a ew for TLS 1.8..
6b10: 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e 0a 09 3c 64 .</dd>..<br>..<d
6b20: 74 3e 0a 09 3c 73 74 72 6f 6e 67 3e 73 65 73 73 t>..<strong>sess
6b30: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ion</strong> <em
6b40: 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 73 73 69 >channelId sessi
6b50: 6f 6e 5f 69 64 20 74 69 63 6b 65 74 20 6c 69 66 on_id ticket lif
6b60: 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 etime</em>..</dt
6b70: 3e 0a 09 3c 64 64 3e 0a 09 20 20 20 20 54 68 69 >..<dd>.. Thi
6b80: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
6b90: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 ck is invoked by
6ba0: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e the OpenSSL fun
6bb0: 63 74 69 6f 6e 0a 09 20 20 20 20 3c 63 6f 64 65 ction.. <code
6bc0: 3e 53 53 4c 5f 43 54 58 5f 73 65 73 73 5f 73 65 >SSL_CTX_sess_se
6bd0: 74 5f 6e 65 77 5f 63 62 28 29 3c 2f 63 6f 64 65 t_new_cb()</code
6be0: 3e 20 77 68 65 6e 65 76 65 72 20 61 20 6e 65 77 > whenever a new
6bf0: 20 73 65 73 73 69 6f 6e 20 69 64 20 69 73 0a 09 session id is..
6c00: 20 20 20 20 73 65 6e 74 20 62 79 20 74 68 65 20 sent by the
6c10: 73 65 72 76 65 72 20 64 75 72 69 6e 67 20 74 68 server during th
6c20: 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 e initial connec
6c30: 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 tion and handsha
6c40: 6b 65 2c 20 62 75 74 0a 09 20 20 20 20 63 61 6e ke, but.. can
6c50: 20 61 6c 73 6f 20 62 65 20 72 65 63 65 69 76 65 also be receive
6c60: 64 20 6c 61 74 65 72 20 69 66 20 74 68 65 20 3c d later if the <
6c70: 62 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b b>-post_handshak
6c80: 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 0a e</b> option is.
6c90: 09 20 20 20 20 75 73 65 64 2e 20 41 72 67 75 6d . used. Argum
6ca0: 65 6e 74 73 20 61 72 65 3a 20 3c 65 6d 3e 73 65 ents are: <em>se
6cb0: 73 73 69 6f 6e 5f 69 64 3c 2f 65 6d 3e 20 69 73 ssion_id</em> is
6cc0: 20 74 68 65 20 63 75 72 72 65 6e 74 0a 09 20 20 the current..
6cd0: 20 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 session identi
6ce0: 66 69 65 72 2c 20 3c 65 6d 3e 74 69 63 6b 65 74 fier, <em>ticket
6cf0: 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 73 65 73 </em> is the ses
6d00: 73 69 6f 6e 20 74 69 63 6b 65 74 20 69 6e 66 6f sion ticket info
6d10: 2c 20 61 6e 64 0a 09 20 20 20 20 3c 65 6d 3e 6c , and.. <em>l
6d20: 69 66 65 74 69 6d 65 3c 2f 65 6d 3e 20 69 73 20 ifetime</em> is
6d30: 74 68 65 20 74 68 65 20 74 69 63 6b 65 74 20 6c the the ticket l
6d40: 69 66 65 74 69 6d 65 20 69 6e 20 73 65 63 6f 6e ifetime in secon
6d50: 64 73 2e 0a 09 20 20 20 20 54 68 69 73 20 63 61 ds... This ca
6d60: 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f llback is new fo
6d70: 72 20 54 4c 53 20 31 2e 38 2e 0a 09 3c 2f 64 64 r TLS 1.8...</dd
6d80: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 >. </dl>.
6d90: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 62 72 3e </dd>.</dl>.<br>
6da0: 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 73 .<dl>. <dt><s
6db0: 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c trong>-password<
6dc0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c /strong> <em>cal
6dd0: 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a lback</em></dt>.
6de0: 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 <dd>..Invoke
6df0: 73 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 s the specified
6e00: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d <em>callback</em
6e10: 3e 20 73 63 72 69 70 74 20 77 68 65 6e 20 4f 70 > script when Op
6e20: 65 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 0a 09 enSSL needs to..
6e30: 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 obtain a passwor
6e40: 64 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 d. See below for
6e50: 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 61 72 the possible ar
6e60: 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 guments passed t
6e70: 6f 0a 09 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 o..the callback
6e80: 73 63 72 69 70 74 2e 20 53 65 65 20 62 65 6c 6f script. See belo
6e90: 77 20 66 6f 72 20 76 61 6c 69 64 20 72 65 74 75 w for valid retu
6ea0: 72 6e 20 76 61 6c 75 65 73 2e 0a 09 3c 62 72 3e rn values...<br>
6eb0: 0a 09 3c 64 6c 3e 0a 09 20 20 20 20 3c 64 74 3e ..<dl>.. <dt>
6ec0: 0a 09 20 20 20 20 3c 73 74 72 6f 6e 67 3e 70 61 .. <strong>pa
6ed0: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 ssword</strong>
6ee0: 3c 65 6d 3e 72 77 66 6c 61 67 20 73 69 7a 65 3c <em>rwflag size<
6ef0: 2f 65 6d 3e 0a 09 20 20 20 20 3c 2f 64 74 3e 0a /em>.. </dt>.
6f00: 09 20 20 20 20 3c 64 64 3e 0a 09 09 49 6e 76 6f . <dd>...Invo
6f10: 6b 65 64 20 77 68 65 6e 20 6c 6f 61 64 69 6e 67 ked when loading
6f20: 20 6f 72 20 73 74 6f 72 69 6e 67 20 61 20 50 45 or storing a PE
6f30: 4d 20 63 65 72 74 69 66 69 63 61 74 65 20 77 69 M certificate wi
6f40: 74 68 20 65 6e 63 72 79 70 74 69 6f 6e 2e 0a 09 th encryption...
6f50: 09 57 68 65 72 65 20 3c 65 6d 3e 72 77 66 6c 61 .Where <em>rwfla
6f60: 67 3c 2f 65 6d 3e 20 69 73 20 30 20 66 6f 72 20 g</em> is 0 for
6f70: 72 65 61 64 69 6e 67 2f 64 65 63 72 79 70 74 69 reading/decrypti
6f80: 6f 6e 20 6f 72 20 31 20 66 6f 72 0a 09 09 77 72 on or 1 for...wr
6f90: 69 74 69 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e iting/encryption
6fa0: 20 28 63 61 6e 20 70 72 6f 6d 70 74 20 75 73 65 (can prompt use
6fb0: 72 20 74 6f 20 63 6f 6e 66 69 72 6d 29 20 61 6e r to confirm) an
6fc0: 64 20 3c 65 6d 3e 73 69 7a 65 3c 2f 65 6d 3e 20 d <em>size</em>
6fd0: 69 73 0a 09 09 74 68 65 20 6d 61 78 20 70 61 73 is...the max pas
6fe0: 73 77 6f 72 64 20 6c 65 6e 67 74 68 20 69 6e 20 sword length in
6ff0: 62 79 74 65 73 2e 20 54 68 65 20 63 61 6c 6c 62 bytes. The callb
7000: 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 ack should retur
7010: 6e 20 74 68 65 0a 09 09 70 61 73 73 77 6f 72 64 n the...password
7020: 20 61 73 20 61 20 73 74 72 69 6e 67 2e 20 42 6f as a string. Bo
7030: 74 68 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 th arguments are
7040: 20 6e 65 77 20 66 6f 72 20 54 4c 53 20 31 2e 38 new for TLS 1.8
7050: 2e 0a 09 20 20 20 20 3c 2f 64 64 3e 0a 09 3c 2f ... </dd>..</
7060: 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 3c 2f dl>. </dd>.</
7070: 64 6c 3e 0a 3c 62 72 3e 0a 3c 64 6c 3e 0a 20 20 dl>.<br>.<dl>.
7080: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 <dt><strong>-v
7090: 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f alidatecommand</
70a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c strong> <em>call
70b0: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 back</em></dt>.
70c0: 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 <dd>..Invokes
70d0: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c the specified <
70e0: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
70f0: 20 73 63 72 69 70 74 20 64 75 72 69 6e 67 20 68 script during h
7100: 61 6e 64 73 68 61 6b 65 20 69 6e 0a 09 6f 72 64 andshake in..ord
7110: 65 72 20 74 6f 20 76 61 6c 69 64 61 74 65 20 74 er to validate t
7120: 68 65 20 70 72 6f 76 69 64 65 64 20 76 61 6c 75 he provided valu
7130: 65 28 73 29 2e 20 53 65 65 20 62 65 6c 6f 77 20 e(s). See below
7140: 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 for the possible
7150: 0a 09 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 ..arguments pass
7160: 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 ed to the callba
7170: 63 6b 20 73 63 72 69 70 74 2e 20 49 66 20 6e 6f ck script. If no
7180: 74 20 73 70 65 63 69 66 69 65 64 2c 20 4f 70 65 t specified, Ope
7190: 6e 53 53 4c 0a 09 77 69 6c 6c 20 61 63 63 65 70 nSSL..will accep
71a0: 74 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 t valid certific
71b0: 61 74 65 73 20 61 6e 64 20 65 78 74 65 6e 73 69 ates and extensi
71c0: 6f 6e 73 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 ons...To reject
71d0: 74 68 65 20 76 61 6c 75 65 20 61 6e 64 20 61 62 the value and ab
71e0: 6f 72 74 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 ort the connecti
71f0: 6f 6e 2c 20 74 68 65 20 63 61 6c 6c 62 61 63 6b on, the callback
7200: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 30 should return 0
7210: 2e 0a 09 54 6f 20 61 63 63 65 70 74 20 74 68 65 ...To accept the
7220: 20 76 61 6c 75 65 20 61 6e 64 20 63 6f 6e 74 69 value and conti
7230: 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 nue the connecti
7240: 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 on, it should re
7250: 74 75 72 6e 20 31 2e 0a 09 54 6f 20 72 65 6a 65 turn 1...To reje
7260: 63 74 20 74 68 65 20 76 61 6c 75 65 2c 20 62 75 ct the value, bu
7270: 74 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 t continue the c
7280: 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 onnection, it sh
7290: 6f 75 6c 64 20 72 65 74 75 72 6e 20 32 2e 0a 09 ould return 2...
72a0: 3c 62 72 3e 0a 09 3c 64 6c 3e 0a 09 20 20 20 20 <br>..<dl>..
72b0: 3c 64 74 3e 0a 09 09 3c 73 74 72 6f 6e 67 3e 61 <dt>...<strong>a
72c0: 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d lpn</strong> <em
72d0: 3e 63 68 61 6e 6e 65 6c 49 64 20 70 72 6f 74 6f >channelId proto
72e0: 63 6f 6c 20 6d 61 74 63 68 3c 2f 65 6d 3e 0a 09 col match</em>..
72f0: 09 3c 2f 64 74 3e 0a 09 20 20 20 20 3c 64 64 3e .</dt>.. <dd>
7300: 0a 09 09 46 6f 72 20 73 65 72 76 65 72 73 2c 20 ...For servers,
7310: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c this form of cal
7320: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
7330: 20 77 68 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 when the client
7340: 20 41 4c 50 4e 0a 09 09 65 78 74 65 6e 73 69 6f ALPN...extensio
7350: 6e 20 69 73 20 72 65 63 65 69 76 65 64 2e 20 49 n is received. I
7360: 66 20 3c 65 6d 3e 6d 61 74 63 68 3c 2f 65 6d 3e f <em>match</em>
7370: 20 69 73 20 74 72 75 65 2c 20 3c 65 6d 3e 70 72 is true, <em>pr
7380: 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 0a 09 09 69 73 otocol</em>...is
7390: 20 74 68 65 20 66 69 72 73 74 20 3c 62 3e 2d 61 the first <b>-a
73a0: 6c 70 6e 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 73 lpn</b> option s
73b0: 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f pecified protoco
73c0: 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74 68 l common to both
73d0: 0a 09 09 74 68 65 20 63 6c 69 65 6e 74 20 61 6e ...the client an
73e0: 64 20 73 65 72 76 65 72 2e 20 49 66 20 6e 6f 74 d server. If not
73f0: 2c 20 74 68 65 20 66 69 72 73 74 20 63 6c 69 65 , the first clie
7400: 6e 74 20 73 70 65 63 69 66 69 65 64 20 70 72 6f nt specified pro
7410: 74 6f 63 6f 6c 20 69 73 0a 09 09 75 73 65 64 2e tocol is...used.
7420: 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 61 66 It is called af
7430: 74 65 72 20 74 68 65 20 68 65 6c 6c 6f 20 61 6e ter the hello an
7440: 64 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73 d ALPN callbacks
7450: 2e 0a 09 09 54 68 69 73 20 63 61 6c 6c 62 61 63 ....This callbac
7460: 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54 4c 53 k is new for TLS
7470: 20 31 2e 38 2e 0a 09 20 20 20 20 3c 2f 64 64 3e 1.8... </dd>
7480: 0a 09 20 20 20 20 3c 62 72 3e 0a 09 20 20 20 20 .. <br>..
7490: 3c 64 74 3e 0a 09 09 3c 73 74 72 6f 6e 67 3e 68 <dt>...<strong>h
74a0: 65 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ello</strong> <e
74b0: 6d 3e 63 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 m>channelId serv
74c0: 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 20 20 20 ername</em>..
74d0: 20 3c 2f 64 74 3e 0a 09 20 20 20 20 3c 64 64 3e </dt>.. <dd>
74e0: 0a 09 09 46 6f 72 20 73 65 72 76 65 72 73 2c 20 ...For servers,
74f0: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c this form of cal
7500: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
7510: 20 64 75 72 69 6e 67 20 63 6c 69 65 6e 74 20 68 during client h
7520: 65 6c 6c 6f 0a 09 09 6d 65 73 73 61 67 65 20 70 ello...message p
7530: 72 6f 63 65 73 73 69 6e 67 2e 20 54 68 65 20 70 rocessing. The p
7540: 75 72 70 6f 73 65 20 69 73 20 73 6f 20 74 68 65 urpose is so the
7550: 20 73 65 72 76 65 72 20 63 61 6e 20 73 65 6c 65 server can sele
7560: 63 74 20 74 68 65 0a 09 09 61 70 70 72 6f 70 72 ct the...appropr
7570: 69 61 74 65 20 63 65 72 74 69 66 69 63 61 74 65 iate certificate
7580: 20 74 6f 20 70 72 65 73 65 6e 74 20 74 6f 20 74 to present to t
7590: 68 65 20 63 6c 69 65 6e 74 2c 20 61 6e 64 20 74 he client, and t
75a0: 6f 20 6d 61 6b 65 20 6f 74 68 65 72 0a 09 09 63 o make other...c
75b0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64 6a onfiguration adj
75c0: 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 6e ustments relevan
75d0: 74 20 74 6f 20 74 68 61 74 20 73 65 72 76 65 72 t to that server
75e0: 20 6e 61 6d 65 20 61 6e 64 20 69 74 73 0a 09 09 name and its...
75f0: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 20 49 configuration. I
7600: 74 20 69 73 20 63 61 6c 6c 65 64 20 62 65 66 6f t is called befo
7610: 72 65 20 74 68 65 20 53 4e 49 20 61 6e 64 20 41 re the SNI and A
7620: 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73 2e 0a 09 LPN callbacks...
7630: 09 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 .This callback i
7640: 73 20 6e 65 77 20 66 6f 72 20 54 4c 53 20 31 2e s new for TLS 1.
7650: 38 2e 0a 09 20 20 20 20 3c 2f 64 64 3e 0a 09 20 8... </dd>..
7660: 20 20 20 3c 62 72 3e 0a 09 20 20 20 20 3c 64 74 <br>.. <dt
7670: 3e 0a 09 09 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c >...<strong>sni<
7680: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 /strong> <em>cha
7690: 6e 6e 65 6c 49 64 20 73 65 72 76 65 72 6e 61 6d nnelId servernam
76a0: 65 3c 2f 65 6d 3e 0a 09 20 20 20 20 3c 2f 64 74 e</em>.. </dt
76b0: 3e 0a 09 20 20 20 20 3c 64 64 3e 0a 09 09 46 6f >.. <dd>...Fo
76c0: 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 r servers, this
76d0: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
76e0: 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e is invoked when
76f0: 20 74 68 65 20 53 65 72 76 65 72 20 4e 61 6d 65 the Server Name
7700: 0a 09 09 49 6e 64 69 63 61 74 69 6f 6e 20 28 53 ...Indication (S
7710: 4e 49 29 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 NI) extension is
7720: 20 72 65 63 65 69 76 65 64 2e 20 54 68 65 20 3c received. The <
7730: 65 6d 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 em>servername</e
7740: 6d 3e 0a 09 09 61 72 67 75 6d 65 6e 74 20 69 73 m>...argument is
7750: 20 74 68 65 20 63 6c 69 65 6e 74 20 70 72 6f 76 the client prov
7760: 69 64 65 64 20 73 65 72 76 65 72 20 6e 61 6d 65 ided server name
7770: 20 69 6e 20 74 68 65 20 3c 62 3e 2d 73 65 72 76 in the <b>-serv
7780: 65 72 6e 61 6d 65 3c 2f 62 3e 0a 09 09 6f 70 74 ername</b>...opt
7790: 69 6f 6e 2e 20 54 68 65 20 70 75 72 70 6f 73 65 ion. The purpose
77a0: 20 69 73 20 73 6f 20 77 68 65 6e 20 61 20 73 65 is so when a se
77b0: 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 6d 75 rver supports mu
77c0: 6c 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20 74 68 ltiple names, th
77d0: 65 0a 09 09 72 69 67 68 74 20 63 65 72 74 69 66 e...right certif
77e0: 69 63 61 74 65 20 63 61 6e 20 62 65 20 75 73 65 icate can be use
77f0: 64 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 d. It is called
7800: 61 66 74 65 72 20 74 68 65 20 68 65 6c 6c 6f 20 after the hello
7810: 63 61 6c 6c 62 61 63 6b 0a 09 09 62 75 74 20 62 callback...but b
7820: 65 66 6f 72 65 20 74 68 65 20 41 4c 50 4e 20 63 efore the ALPN c
7830: 61 6c 6c 62 61 63 6b 2e 0a 09 09 54 68 69 73 20 allback....This
7840: 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 callback is new
7850: 66 6f 72 20 54 4c 53 20 31 2e 38 2e 0a 09 20 20 for TLS 1.8...
7860: 20 20 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 62 72 </dd>.. <br
7870: 3e 0a 09 20 20 20 20 3c 64 74 3e 0a 09 09 3c 73 >.. <dt>...<s
7880: 74 72 6f 6e 67 3e 76 65 72 69 66 79 3c 2f 73 74 trong>verify</st
7890: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 rong> <em>channe
78a0: 6c 49 64 20 64 65 70 74 68 20 63 65 72 74 20 73 lId depth cert s
78b0: 74 61 74 75 73 20 65 72 72 6f 72 3c 2f 65 6d 3e tatus error</em>
78c0: 0a 09 20 20 20 20 3c 2f 64 74 3e 0a 09 20 20 20 .. </dt>..
78d0: 20 3c 64 64 3e 0a 09 09 54 68 69 73 20 66 6f 72 <dd>...This for
78e0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
78f0: 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e invoked by Open
7900: 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 63 SSL when a new c
7910: 65 72 74 69 66 69 63 61 74 65 0a 09 09 69 73 20 ertificate...is
7920: 72 65 63 65 69 76 65 64 20 66 72 6f 6d 20 74 68 received from th
7930: 65 20 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f 77 e peer. It allow
7940: 73 20 74 68 65 20 63 6c 69 65 6e 74 20 74 6f 20 s the client to
7950: 63 68 65 63 6b 20 74 68 65 0a 09 09 63 65 72 74 check the...cert
7960: 69 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 ificate verifica
7970: 74 69 6f 6e 20 72 65 73 75 6c 74 73 20 61 6e 64 tion results and
7980: 20 63 68 6f 6f 73 65 20 77 68 65 74 68 65 72 20 choose whether
7990: 74 6f 20 63 6f 6e 74 69 6e 75 65 0a 09 09 6f 72 to continue...or
79a0: 20 6e 6f 74 2e 20 49 74 20 69 73 20 63 61 6c 6c not. It is call
79b0: 65 64 20 66 6f 72 20 65 61 63 68 20 63 65 72 74 ed for each cert
79c0: 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 20 63 ificate in the c
79d0: 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e ertificate chain
79e0: 2e 0a 09 09 3c 75 6c 3e 0a 09 09 3c 6c 69 3e 54 ....<ul>...<li>T
79f0: 68 65 20 3c 65 6d 3e 64 65 70 74 68 3c 2f 65 6d he <em>depth</em
7a00: 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 > argument is th
7a10: 65 20 69 6e 74 65 67 65 72 20 64 65 70 74 68 20 e integer depth
7a20: 6f 66 20 74 68 65 0a 09 09 63 65 72 74 69 66 69 of the...certifi
7a30: 63 61 74 65 20 69 6e 20 74 68 65 20 63 65 72 74 cate in the cert
7a40: 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c 20 77 ificate chain, w
7a50: 68 65 72 65 20 30 20 69 73 20 74 68 65 20 70 65 here 0 is the pe
7a60: 65 72 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 er certificate..
7a70: 09 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75 .and higher valu
7a80: 65 73 20 67 6f 69 6e 67 20 75 70 20 74 6f 20 74 es going up to t
7a90: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 he Certificate A
7aa0: 75 74 68 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f uthority (CA).</
7ab0: 6c 69 3e 0a 09 09 3c 6c 69 3e 54 68 65 20 3c 65 li>...<li>The <e
7ac0: 6d 3e 63 65 72 74 3c 2f 65 6d 3e 20 61 72 67 75 m>cert</em> argu
7ad0: 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20 6f ment is a list o
7ae0: 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 f key-value pair
7af0: 73 20 73 69 6d 69 6c 61 72 0a 09 09 74 6f 20 74 s similar...to t
7b00: 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 79 hose returned by
7b10: 0a 09 09 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 ...<a href="#tls
7b20: 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e ::status"><stron
7b30: 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73 g>tls::status</s
7b40: 74 72 6f 6e 67 3e 3c 2f 61 3e 2e 3c 2f 6c 69 3e trong></a>.</li>
7b50: 0a 09 09 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 73 ...<li>The <em>s
7b60: 74 61 74 75 73 3c 2f 65 6d 3e 20 61 72 67 75 6d tatus</em> argum
7b70: 65 6e 74 20 69 73 20 74 68 65 20 62 6f 6f 6c 65 ent is the boole
7b80: 61 6e 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 an validity of t
7b90: 68 65 0a 09 09 63 75 72 72 65 6e 74 20 63 65 72 he...current cer
7ba0: 74 69 66 69 63 61 74 65 20 77 68 65 72 65 20 30 tificate where 0
7bb0: 20 69 73 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 is invalid and
7bc0: 31 20 69 73 20 76 61 6c 69 64 2e 3c 2f 6c 69 3e 1 is valid.</li>
7bd0: 0a 09 09 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 65 ...<li>The <em>e
7be0: 72 72 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 rror</em> argume
7bf0: 6e 74 20 69 73 20 74 68 65 20 65 72 72 6f 72 20 nt is the error
7c00: 6d 65 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c message, if any,
7c10: 20 67 65 6e 65 72 61 74 65 64 0a 09 09 62 79 20 generated...by
7c20: 3c 63 6f 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 <code>X509_STORE
7c30: 5f 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 _CTX_get_error()
7c40: 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 09 </code>.</li>...
7c50: 3c 2f 75 6c 3e 0a 09 20 20 20 20 3c 2f 64 64 3e </ul>.. </dd>
7c60: 0a 09 20 20 20 20 3c 62 72 3e 0a 09 3c 2f 64 6c .. <br>..</dl
7c70: 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 3c 2f 64 6c >. </dd>.</dl
7c80: 3e 0a 0a 3c 70 3e 0a 52 65 66 65 72 65 6e 63 65 >..<p>.Reference
7c90: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 implementations
7ca0: 20 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 of these callba
7cb0: 63 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65 64 cks are provided
7cc0: 20 69 6e 20 74 68 65 0a 64 69 73 74 72 69 62 75 in the.distribu
7cd0: 74 69 6f 6e 20 61 73 20 3c 73 74 72 6f 6e 67 3e tion as <strong>
7ce0: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 tls::callback</s
7cf0: 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e trong>, <strong>
7d00: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 tls::password</s
7d10: 74 72 6f 6e 67 3e 2c 0a 61 6e 64 20 3c 73 74 72 trong>,.and <str
7d20: 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 ong>tls::validat
7d30: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e e_command</stron
7d40: 67 3e 20 72 65 73 70 65 63 74 69 76 65 6c 79 2e g> respectively.
7d50: 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 73 65 Note that these
7d60: 20 61 72 65 0a 3c 65 6d 3e 73 61 6d 70 6c 65 3c are.<em>sample<
7d70: 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e 74 61 74 /em> implementat
7d80: 69 6f 6e 73 20 6f 6e 6c 79 2e 20 49 6e 20 61 20 ions only. In a
7d90: 6d 6f 72 65 20 72 65 61 6c 69 73 74 69 63 20 64 more realistic d
7da0: 65 70 6c 6f 79 6d 65 6e 74 0a 79 6f 75 20 77 6f eployment.you wo
7db0: 75 6c 64 20 73 70 65 63 69 66 79 20 79 6f 75 72 uld specify your
7dc0: 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 own callback sc
7dd0: 72 69 70 74 73 20 6f 6e 20 65 61 63 68 20 54 4c ripts on each TL
7de0: 53 20 63 68 61 6e 6e 65 6c 20 75 73 69 6e 67 20 S channel using
7df0: 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d the.<strong>-com
7e00: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c mand</strong>, <
7e10: 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 strong>-password
7e20: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 0a 3c </strong>, and.<
7e30: 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 strong>-validate
7e40: 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 _command</strong
7e50: 3e 20 6f 70 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a > options..</p>.
7e60: 3c 70 3e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 <p>.The default
7e70: 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 behavior when th
7e80: 65 20 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 e <strong>-comma
7e90: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 20 nd</strong> and
7ea0: 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 <strong>-validat
7eb0: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e e_command</stron
7ec0: 67 3e 0a 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e g>.options are n
7ed0: 6f 74 20 73 70 65 63 69 66 69 65 64 20 69 73 20 ot specified is
7ee0: 66 6f 72 20 54 4c 53 20 74 6f 20 70 72 6f 63 65 for TLS to proce
7ef0: 73 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 ss the associate
7f00: 64 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 d library callba
7f10: 63 6b 73 0a 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 cks.internally.
7f20: 54 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 The default beha
7f30: 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 73 vior when the <s
7f40: 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c trong>-password<
7f50: 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 20 /strong> option
7f60: 69 73 20 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 is not.specified
7f70: 20 69 73 20 66 6f 72 20 54 4c 53 20 74 6f 20 70 is for TLS to p
7f80: 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 rocess the assoc
7f90: 69 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 iated library ca
7fa0: 6c 6c 62 61 63 6b 73 20 62 79 20 61 74 74 65 6d llbacks by attem
7fb0: 70 74 69 6e 67 0a 74 6f 20 63 61 6c 6c 20 3c 73 pting.to call <s
7fc0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 trong>tls::passw
7fd0: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 54 68 ord</strong>..Th
7fe0: 65 20 64 69 66 66 65 72 65 6e 63 65 20 62 65 74 e difference bet
7ff0: 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f 20 62 ween these two b
8000: 65 68 61 76 69 6f 72 73 20 69 73 20 61 20 63 6f ehaviors is a co
8010: 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 6d 61 69 nsequence of mai
8020: 6e 74 61 69 6e 69 6e 67 0a 63 6f 6d 70 61 74 69 ntaining.compati
8030: 62 69 6c 69 74 79 20 77 69 74 68 20 65 61 72 6c bility with earl
8040: 69 65 72 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 ier implementati
8050: 6f 6e 73 2e 0a 3c 2f 70 3e 0a 3c 70 3e 0a 3c 65 ons..</p>.<p>.<e
8060: 6d 3e 0a 54 68 65 20 75 73 65 20 6f 66 20 74 68 m>.The use of th
8070: 65 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c e reference call
8080: 62 61 63 6b 73 20 3c 73 74 72 6f 6e 67 3e 74 6c backs <strong>tl
8090: 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 s::callback</str
80a0: 6f 6e 67 3e 2c 0a 3c 73 74 72 6f 6e 67 3e 74 6c ong>,.<strong>tl
80b0: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 s::password</str
80c0: 6f 6e 67 3e 2c 20 61 6e 64 20 3c 73 74 72 6f 6e ong>, and <stron
80d0: 67 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f g>tls::validate_
80e0: 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e command</strong>
80f0: 0a 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e .is not recommen
8100: 64 65 64 2e 20 54 68 65 79 20 6d 61 79 20 62 65 ded. They may be
8110: 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 removed from fu
8120: 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e 0a 3c ture releases..<
8130: 2f 65 6d 3e 0a 3c 2f 70 3e 0a 3c 62 72 3e 0a 0a /em>.</p>.<br>..
8140: 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d <hr>..<h3><a nam
8150: 65 3d 22 44 45 42 55 47 22 3e 44 45 42 55 47 3c e="DEBUG">DEBUG<
8160: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 46 6f 72 /a></h3>..<p>For
8170: 20 6d 6f 73 74 20 64 65 62 75 67 67 69 6e 67 20 most debugging
8180: 6e 65 65 64 73 2c 20 74 68 65 20 3c 62 3e 2d 63 needs, the <b>-c
8190: 61 6c 6c 62 61 63 6b 3c 2f 62 3e 20 6f 70 74 69 allback</b> opti
81a0: 6f 6e 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 on can be used t
81b0: 6f 20 70 72 6f 76 69 64 65 0a 73 75 66 66 69 63 o provide.suffic
81c0: 69 65 6e 74 20 69 6e 73 69 67 68 74 20 61 6e 64 ient insight and
81d0: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 information on
81e0: 74 68 65 20 54 4c 53 20 68 61 6e 64 73 68 61 6b the TLS handshak
81f0: 65 20 61 6e 64 20 70 72 6f 67 72 65 73 73 2e 20 e and progress.
8200: 49 66 20 66 75 72 74 68 65 72 0a 74 72 6f 75 62 If further.troub
8210: 6c 65 73 68 6f 6f 74 69 6e 67 20 69 6e 73 69 67 leshooting insig
8220: 68 74 20 69 73 20 6e 65 65 64 65 64 2c 20 74 68 ht is needed, th
8230: 65 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 6f e compile time o
8240: 70 74 69 6f 6e 20 3c 62 3e 2d 2d 65 6e 61 62 6c ption <b>--enabl
8250: 65 2d 64 65 62 75 67 3c 2f 62 3e 0a 63 61 6e 20 e-debug</b>.can
8260: 62 65 20 75 73 65 64 20 74 6f 20 67 65 74 20 64 be used to get d
8270: 65 74 61 69 6c 65 64 20 65 78 65 63 75 74 69 6f etailed executio
8280: 6e 20 66 6c 6f 77 20 73 74 61 74 75 73 2e 3c 2f n flow status.</
8290: 70 3e 0a 0a 3c 70 3e 54 4c 53 20 6b 65 79 20 6c p>..<p>TLS key l
82a0: 6f 67 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e ogging can be en
82b0: 61 62 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67 abled by setting
82c0: 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 the environment
82d0: 20 76 61 72 69 61 62 6c 65 0a 3c 62 3e 53 53 4c variable.<b>SSL
82e0: 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 KEYLOGFILE</b> t
82f0: 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 o the name of th
8300: 65 20 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f e file to log to
8310: 2e 20 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 . Then whenever
8320: 54 4c 53 0a 6b 65 79 20 6d 61 74 65 72 69 61 6c TLS.key material
8330: 20 69 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 is generated or
8340: 20 72 65 63 65 69 76 65 64 20 69 74 20 77 69 6c received it wil
8350: 6c 20 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 l be logged to t
8360: 68 65 20 66 69 6c 65 2e 20 54 68 69 73 0a 69 73 he file. This.is
8370: 20 75 73 65 66 75 6c 20 66 6f 72 20 6c 6f 67 67 useful for logg
8380: 69 6e 67 20 6b 65 79 20 64 61 74 61 20 66 6f 72 ing key data for
8390: 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 6e 67 network logging
83a0: 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 74 6f tools to use to
83b0: 0a 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74 .decrypt the dat
83c0: 61 2e 3c 2f 70 3e 0a 0a 3c 70 3e 54 68 65 20 3c a.</p>..<p>The <
83d0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 strong>tls::debu
83e0: 67 3c 2f 73 74 72 6f 6e 67 3e 20 76 61 72 69 61 g</strong> varia
83f0: 62 6c 65 20 70 72 6f 76 69 64 65 73 20 73 6f 6d ble provides som
8400: 65 20 61 64 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e e additional.con
8410: 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 73 65 20 trol over these
8420: 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 reference callba
8430: 63 6b 73 2e 20 49 74 73 20 76 61 6c 75 65 20 69 cks. Its value i
8440: 73 20 7a 65 72 6f 20 62 79 20 64 65 66 61 75 6c s zero by defaul
8450: 74 2e 0a 48 69 67 68 65 72 20 76 61 6c 75 65 73 t..Higher values
8460: 20 70 72 6f 64 75 63 65 20 6d 6f 72 65 20 64 69 produce more di
8470: 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 2c agnostic output,
8480: 20 61 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 and will also f
8490: 6f 72 63 65 20 74 68 65 0a 76 65 72 69 66 79 20 orce the.verify
84a0: 6d 65 74 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e method in <stron
84b0: 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c g>tls::callback<
84c0: 2f 73 74 72 6f 6e 67 3e 20 74 6f 20 61 63 63 65 /strong> to acce
84d0: 70 74 20 74 68 65 0a 63 65 72 74 69 66 69 63 61 pt the.certifica
84e0: 74 65 2c 20 65 76 65 6e 20 77 68 65 6e 20 69 74 te, even when it
84f0: 20 69 73 20 69 6e 76 61 6c 69 64 20 69 66 20 74 is invalid if t
8500: 68 65 20 3c 62 3e 74 6c 73 3a 3a 76 61 6c 69 64 he <b>tls::valid
8510: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a ate_command</b>.
8520: 63 61 6c 6c 62 61 63 6b 20 69 73 20 75 73 65 64 callback is used
8530: 20 66 6f 72 20 74 68 65 20 3c 62 3e 2d 76 61 6c for the <b>-val
8540: 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e idatecommand</b>
8550: 20 6f 70 74 69 6f 6e 2e 3c 2f 70 3e 0a 0a 3c 70 option.</p>..<p
8560: 3e 3c 65 6d 3e 54 68 65 20 75 73 65 20 6f 66 20 ><em>The use of
8570: 74 68 65 20 76 61 72 69 61 62 6c 65 20 3c 73 74 the variable <st
8580: 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c rong>tls::debug<
8590: 2f 73 74 72 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 /strong> is not
85a0: 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 recommended..It
85b0: 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 may be removed f
85c0: 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 rom future relea
85d0: 73 65 73 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 0a 3c ses.</em></p>..<
85e0: 68 34 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 42 55 h4><a name="DEBU
85f0: 47 5f 45 58 41 4d 50 4c 45 53 22 3e 44 65 62 75 G_EXAMPLES">Debu
8600: 67 20 45 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f g Examples</a></
8610: 68 34 3e 0a 0a 3c 70 3e 54 68 65 73 65 20 65 78 h4>..<p>These ex
8620: 61 6d 70 6c 65 73 20 75 73 65 20 74 68 65 20 64 amples use the d
8630: 65 66 61 75 6c 74 20 55 6e 69 78 20 70 6c 61 74 efault Unix plat
8640: 66 6f 72 6d 20 53 53 4c 20 63 65 72 74 69 66 69 form SSL certifi
8650: 63 61 74 65 73 2e 20 46 6f 72 20 73 74 61 6e 64 cates. For stand
8660: 61 72 64 0a 69 6e 73 74 61 6c 6c 61 74 69 6f 6e ard.installation
8670: 73 2c 20 2d 63 61 64 69 72 20 61 6e 64 20 2d 63 s, -cadir and -c
8680: 61 66 69 6c 65 20 73 68 6f 75 6c 64 20 6e 6f 74 afile should not
8690: 20 62 65 20 6e 65 65 64 65 64 2e 20 49 66 20 79 be needed. If y
86a0: 6f 75 72 20 63 65 72 74 69 66 69 63 61 74 65 73 our certificates
86b0: 0a 61 72 65 20 69 6e 20 6e 6f 6e 2d 73 74 61 6e .are in non-stan
86c0: 64 61 72 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 dard locations,
86d0: 75 70 64 61 74 65 20 2d 63 61 64 69 72 20 6f 72 update -cadir or
86e0: 20 75 73 65 20 2d 63 61 66 69 6c 65 20 61 73 20 use -cafile as
86f0: 6e 65 65 64 65 64 2e 3c 2f 70 3e 0a 3c 62 72 3e needed.</p>.<br>
8700: 0a 0a 3c 70 3e 45 78 61 6d 70 6c 65 20 23 31 3a ..<p>Example #1:
8710: 20 55 73 65 20 48 54 54 50 20 70 61 63 6b 61 67 Use HTTP packag
8720: 65 3c 2f 70 3e 0a 3c 70 72 65 3e 3c 63 6f 64 65 e</p>.<pre><code
8730: 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 >.package requir
8740: 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72 e http.package r
8750: 65 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75 equire tls.set u
8760: 72 6c 20 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e rl "https://www.
8770: 74 63 6c 2e 74 6b 2f 22 0a 0a 68 74 74 70 3a 3a tcl.tk/"..http::
8780: 72 65 67 69 73 74 65 72 20 68 74 74 70 73 20 34 register https 4
8790: 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 43 [list ::tls::
87a0: 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 socket -autoserv
87b0: 65 72 6e 61 6d 65 20 74 72 75 65 20 2d 72 65 71 ername true -req
87c0: 75 69 72 65 20 74 72 75 65 20 2d 63 61 64 69 72 uire true -cadir
87d0: 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 20 /etc/ssl/certs
87e0: 5c 0a 20 20 20 20 2d 63 6f 6d 6d 61 6e 64 20 3a \. -command :
87f0: 3a 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 20 2d :tls::callback -
8800: 70 61 73 73 77 6f 72 64 20 3a 3a 74 6c 73 3a 3a password ::tls::
8810: 70 61 73 73 77 6f 72 64 20 2d 76 61 6c 69 64 61 password -valida
8820: 74 65 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a tecommand ::tls:
8830: 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e :validate_comman
8840: 64 5d 0a 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 d]..# Check for
8850: 65 72 72 6f 72 0a 73 65 74 20 74 6f 6b 65 6e 20 error.set token
8860: 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 [http::geturl $u
8870: 72 6c 5d 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 rl].if {[http::s
8880: 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 tatus $token] ne
8890: 20 22 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 "ok"} {. put
88a0: 73 20 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 s [format "Error
88b0: 20 25 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 %s" [http::stat
88c0: 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 us $token]].}..#
88d0: 20 47 65 74 20 77 65 62 20 70 61 67 65 0a 73 65 Get web page.se
88e0: 74 20 64 61 74 61 20 5b 68 74 74 70 3a 3a 64 61 t data [http::da
88f0: 74 61 20 24 74 6f 6b 65 6e 5d 0a 70 75 74 73 20 ta $token].puts
8900: 5b 73 74 72 69 6e 67 20 6c 65 6e 67 74 68 20 24 [string length $
8910: 64 61 74 61 5d 0a 0a 23 20 43 6c 65 61 6e 75 70 data]..# Cleanup
8920: 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 .::http::cleanup
8930: 20 24 74 6f 6b 65 6e 0a 3c 2f 63 6f 64 65 3e 3c $token.</code><
8940: 2f 70 72 65 3e 0a 0a 3c 70 3e 45 78 61 6d 70 6c /pre>..<p>Exampl
8950: 65 20 23 32 3a 20 55 73 65 20 72 61 77 20 73 6f e #2: Use raw so
8960: 63 6b 65 74 3c 2f 70 3e 0a 3c 70 72 65 3e 3c 63 cket</p>.<pre><c
8970: 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 ode>.package req
8980: 75 69 72 65 20 74 6c 73 0a 0a 73 65 74 20 75 72 uire tls..set ur
8990: 6c 20 22 77 77 77 2e 74 63 6c 2d 6c 61 6e 67 2e l "www.tcl-lang.
89a0: 6f 72 67 22 0a 73 65 74 20 70 6f 72 74 20 34 34 org".set port 44
89b0: 33 0a 0a 73 65 74 20 63 68 20 5b 74 6c 73 3a 3a 3..set ch [tls::
89c0: 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 socket -autoserv
89d0: 65 72 6e 61 6d 65 20 31 20 2d 73 65 72 76 65 72 ername 1 -server
89e0: 6e 61 6d 65 20 24 75 72 6c 20 2d 72 65 71 75 65 name $url -reque
89f0: 73 74 20 31 20 2d 72 65 71 75 69 72 65 20 31 20 st 1 -require 1
8a00: 5c 0a 20 20 20 20 2d 61 6c 70 6e 20 7b 68 74 74 \. -alpn {htt
8a10: 70 2f 31 2e 31 7d 20 2d 63 61 64 69 72 20 2f 65 p/1.1} -cadir /e
8a20: 74 63 2f 73 73 6c 2f 63 65 72 74 73 20 2d 63 6f tc/ssl/certs -co
8a30: 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a 3a 63 61 6c mmand ::tls::cal
8a40: 6c 62 61 63 6b 20 5c 0a 20 20 20 20 2d 70 61 73 lback \. -pas
8a50: 73 77 6f 72 64 20 3a 3a 74 6c 73 3a 3a 70 61 73 sword ::tls::pas
8a60: 73 77 6f 72 64 20 2d 76 61 6c 69 64 61 74 65 63 sword -validatec
8a70: 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a 3a 76 61 ommand ::tls::va
8a80: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 20 24 lidate_command $
8a90: 75 72 6c 20 24 70 6f 72 74 5d 0a 63 68 61 6e 20 url $port].chan
8aa0: 63 6f 6e 66 69 67 75 72 65 20 24 63 68 20 2d 62 configure $ch -b
8ab0: 75 66 66 65 72 73 69 7a 65 20 36 35 35 33 36 0a uffersize 65536.
8ac0: 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 20 24 tls::handshake $
8ad0: 63 68 0a 0a 70 75 74 73 20 24 63 68 20 22 47 45 ch..puts $ch "GE
8ae0: 54 20 2f 20 48 54 54 50 2f 31 2e 31 22 0a 66 6c T / HTTP/1.1".fl
8af0: 75 73 68 20 24 63 68 0a 61 66 74 65 72 20 35 30 ush $ch.after 50
8b00: 30 0a 73 65 74 20 64 61 74 61 20 5b 72 65 61 64 0.set data [read
8b10: 20 24 63 68 5d 0a 0a 61 72 72 61 79 20 73 65 74 $ch]..array set
8b20: 20 73 74 61 74 75 73 20 5b 74 6c 73 3a 3a 73 74 status [tls::st
8b30: 61 74 75 73 20 24 63 68 5d 0a 61 72 72 61 79 20 atus $ch].array
8b40: 73 65 74 20 63 6f 6e 6e 20 5b 74 6c 73 3a 3a 63 set conn [tls::c
8b50: 6f 6e 6e 65 63 74 69 6f 6e 20 24 63 68 5d 0a 61 onnection $ch].a
8b60: 72 72 61 79 20 73 65 74 20 63 68 61 6e 20 5b 63 rray set chan [c
8b70: 68 61 6e 20 63 6f 6e 66 69 67 75 72 65 20 24 63 han configure $c
8b80: 68 5d 0a 63 6c 6f 73 65 20 24 63 68 0a 70 61 72 h].close $ch.par
8b90: 72 61 79 20 73 74 61 74 75 73 0a 70 61 72 72 61 ray status.parra
8ba0: 79 20 63 6f 6e 6e 0a 70 61 72 72 61 79 20 63 68 y conn.parray ch
8bb0: 61 6e 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e an.</code></pre>
8bc0: 0a 3c 62 72 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 .<br>..<hr>..<h3
8bd0: 3e 3c 61 20 6e 61 6d 65 3d 22 48 54 54 50 53 20 ><a name="HTTPS
8be0: 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45 EXAMPLE">HTTPS E
8bf0: 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 68 33 3e 0a XAMPLE</a></h3>.
8c00: 0a 3c 70 3e 54 68 65 73 65 20 65 78 61 6d 70 6c .<p>These exampl
8c10: 65 73 20 75 73 65 20 74 68 65 20 64 65 66 61 75 es use the defau
8c20: 6c 74 20 55 6e 69 78 20 70 6c 61 74 66 6f 72 6d lt Unix platform
8c30: 20 53 53 4c 20 63 65 72 74 69 66 69 63 61 74 65 SSL certificate
8c40: 73 2e 20 46 6f 72 20 73 74 61 6e 64 61 72 64 0a s. For standard.
8c50: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 73 2c 20 2d installations, -
8c60: 63 61 64 69 72 20 61 6e 64 20 2d 63 61 66 69 6c cadir and -cafil
8c70: 65 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 e should not be
8c80: 6e 65 65 64 65 64 2e 20 49 66 20 79 6f 75 72 20 needed. If your
8c90: 63 65 72 74 69 66 69 63 61 74 65 73 0a 61 72 65 certificates.are
8ca0: 20 69 6e 20 6e 6f 6e 2d 73 74 61 6e 64 61 72 64 in non-standard
8cb0: 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 75 70 64 61 locations, upda
8cc0: 74 65 20 2d 63 61 64 69 72 20 6f 72 20 75 73 65 te -cadir or use
8cd0: 20 2d 63 61 66 69 6c 65 20 61 73 20 6e 65 65 64 -cafile as need
8ce0: 65 64 2e 3c 2f 70 3e 0a 0a 3c 70 3e 45 78 61 6d ed.</p>..<p>Exam
8cf0: 70 6c 65 20 23 31 3a 20 47 65 74 20 77 65 62 20 ple #1: Get web
8d00: 70 61 67 65 3c 2f 70 3e 0a 3c 70 72 65 3e 3c 63 page</p>.<pre><c
8d10: 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 ode>.package req
8d20: 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 uire http.packag
8d30: 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 73 65 e require tls.se
8d40: 74 20 75 72 6c 20 22 68 74 74 70 73 3a 2f 2f 77 t url "https://w
8d50: 77 77 2e 74 63 6c 2e 74 6b 2f 22 0a 0a 68 74 74 ww.tcl.tk/"..htt
8d60: 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 p::register http
8d70: 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c s 443 [list ::tl
8d80: 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 s::socket -autos
8d90: 65 72 76 65 72 6e 61 6d 65 20 74 72 75 65 20 2d ervername true -
8da0: 72 65 71 75 69 72 65 20 74 72 75 65 20 2d 63 61 require true -ca
8db0: 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72 dir /etc/ssl/cer
8dc0: 74 73 5d 0a 0a 23 20 43 68 65 63 6b 20 66 6f 72 ts]..# Check for
8dd0: 20 65 72 72 6f 72 0a 73 65 74 20 74 6f 6b 65 6e error.set token
8de0: 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 [http::geturl $
8df0: 75 72 6c 5d 0a 69 66 20 7b 5b 68 74 74 70 3a 3a url].if {[http::
8e00: 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e status $token] n
8e10: 65 20 22 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 e "ok"} {. pu
8e20: 74 73 20 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f ts [format "Erro
8e30: 72 20 25 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 r %s" [http::sta
8e40: 74 75 73 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a tus $token]].}..
8e50: 23 20 47 65 74 20 77 65 62 20 70 61 67 65 0a 73 # Get web page.s
8e60: 65 74 20 64 61 74 61 20 5b 68 74 74 70 3a 3a 64 et data [http::d
8e70: 61 74 61 20 24 74 6f 6b 65 6e 5d 0a 70 75 74 73 ata $token].puts
8e80: 20 24 64 61 74 61 0a 0a 23 20 43 6c 65 61 6e 75 $data..# Cleanu
8e90: 70 0a 3a 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 p.::http::cleanu
8ea0: 70 20 24 74 6f 6b 65 6e 0a 3c 2f 63 6f 64 65 3e p $token.</code>
8eb0: 3c 2f 70 72 65 3e 0a 0a 3c 70 3e 45 78 61 6d 70 </pre>..<p>Examp
8ec0: 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 20 le #2: Download
8ed0: 66 69 6c 65 3c 2f 70 3e 0a 3c 70 72 65 3e 3c 63 file</p>.<pre><c
8ee0: 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 ode>.package req
8ef0: 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 uire http.packag
8f00: 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a 73 e require tls..s
8f10: 65 74 20 75 72 6c 20 22 68 74 74 70 73 3a 2f 2f et url "https://
8f20: 77 69 6b 69 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 wiki.tcl-lang.or
8f30: 67 2f 73 69 74 65 6d 61 70 2e 78 6d 6c 22 0a 73 g/sitemap.xml".s
8f40: 65 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c et filename [fil
8f50: 65 20 74 61 69 6c 20 24 75 72 6c 5d 0a 0a 68 74 e tail $url]..ht
8f60: 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 tp::register htt
8f70: 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 ps 443 [list ::t
8f80: 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f ls::socket -auto
8f90: 73 65 72 76 65 72 6e 61 6d 65 20 74 72 75 65 20 servername true
8fa0: 2d 72 65 71 75 69 72 65 20 74 72 75 65 20 2d 63 -require true -c
8fb0: 61 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f 63 65 adir /etc/ssl/ce
8fc0: 72 74 73 5d 0a 0a 23 20 47 65 74 20 66 69 6c 65 rts]..# Get file
8fd0: 0a 73 65 74 20 63 68 20 5b 6f 70 65 6e 20 24 66 .set ch [open $f
8fe0: 69 6c 65 6e 61 6d 65 20 77 62 5d 0a 73 65 74 20 ilename wb].set
8ff0: 74 6f 6b 65 6e 20 5b 3a 3a 68 74 74 70 3a 3a 67 token [::http::g
9000: 65 74 75 72 6c 20 24 75 72 6c 20 2d 62 6c 6f 63 eturl $url -bloc
9010: 6b 73 69 7a 65 20 36 35 35 33 36 20 2d 63 68 61 ksize 65536 -cha
9020: 6e 6e 65 6c 20 24 63 68 5d 0a 0a 23 20 43 6c 65 nnel $ch]..# Cle
9030: 61 6e 75 70 0a 63 6c 6f 73 65 20 24 63 68 0a 3a anup.close $ch.:
9040: 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 :http::cleanup $
9050: 74 6f 6b 65 6e 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 token.</code></p
9060: 72 65 3e 0a 3c 62 72 3e 0a 0a 3c 68 72 3e 0a 0a re>.<br>..<hr>..
9070: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 50 45 <h3><a name="SPE
9080: 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 CIAL CONSIDERATI
9090: 4f 4e 53 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e ONS">SPECIAL CON
90a0: 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c SIDERATIONS</a><
90b0: 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 20 63 61 70 /h3>..<p>The cap
90c0: 61 62 69 6c 69 74 69 65 73 20 6f 66 20 74 68 69 abilities of thi
90d0: 73 20 70 61 63 6b 61 67 65 20 63 61 6e 20 76 61 s package can va
90e0: 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 62 61 ry enormously ba
90f0: 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 74 68 65 sed upon how the
9100: 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f 70 65 6e 53 .linked to OpenS
9110: 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 20 63 SL library was c
9120: 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 62 75 onfigured and bu
9130: 69 6c 74 2e 20 4e 65 77 20 76 65 72 73 69 6f 6e ilt. New version
9140: 73 20 6d 61 79 20 6f 62 73 6f 6c 65 74 65 0a 6f s may obsolete.o
9150: 6c 64 65 72 20 70 72 6f 74 6f 63 6f 6c 20 76 65 lder protocol ve
9160: 72 73 69 6f 6e 73 2c 20 61 64 64 20 6f 72 20 72 rsions, add or r
9170: 65 6d 6f 76 65 20 63 69 70 68 65 72 73 2c 20 63 emove ciphers, c
9180: 68 61 6e 67 65 20 64 65 66 61 75 6c 74 20 76 61 hange default va
9190: 6c 75 65 73 2c 20 65 74 63 2e 0a 55 73 65 20 74 lues, etc..Use t
91a0: 68 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a he <strong>tls::
91b0: 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e protocols</stron
91c0: 67 3e 20 63 6f 6d 6d 61 6e 64 73 20 74 6f 20 6f g> commands to o
91d0: 62 74 61 69 6e 20 74 68 65 20 73 75 70 70 6f 72 btain the suppor
91e0: 74 65 64 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 72 ted.protocol ver
91f0: 73 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a 3c 68 72 3e sions.</p>..<hr>
9200: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 ..<h3><a name="S
9210: 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 EE ALSO">SEE ALS
9220: 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c O</a></h3>..<p><
9230: 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 strong>socket</s
9240: 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e trong>, <strong>
9250: 66 69 6c 65 65 76 65 6e 74 3c 2f 73 74 72 6f 6e fileevent</stron
9260: 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 68 74 74 70 g>, <strong>http
9270: 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 3c 61 20 68 72 </strong>,.<a hr
9280: 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e ef="https://www.
9290: 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 3c 73 openssl.org/"><s
92a0: 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 trong>OpenSSL</s
92b0: 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a 0a trong></a></p>..
92c0: 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a 43 6f 70 79 <hr>..<pre>.Copy
92d0: 72 69 67 68 74 20 26 63 6f 70 79 3b 20 31 39 39 right © 199
92e0: 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 2e 0a 43 9 Matt Newman..C
92f0: 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 opyright ©
9300: 32 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 2004 Starfish Sy
9310: 73 74 65 6d 73 2e 0a 43 6f 70 79 72 69 67 68 74 stems..Copyright
9320: 20 26 63 6f 70 79 3b 20 32 30 32 33 20 42 72 69 © 2023 Bri
9330: 61 6e 20 4f 27 48 61 67 61 6e 2e 0a 3c 2f 70 72 an O'Hagan..</pr
9340: 65 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d e>.</body>.</htm
9350: 6c 3e 0a l>.