0000: 3c 21 64 6f 63 74 79 70 65 20 68 74 6d 6c 20 70 <!doctype html p
0010: 75 62 6c 69 63 20 22 2d 2f 2f 57 33 43 2f 2f 44 ublic "-//W3C//D
0020: 54 44 20 48 54 4d 4c 20 34 2e 30 20 54 72 61 6e TD HTML 4.0 Tran
0030: 73 69 74 69 6f 6e 61 6c 2f 2f 45 4e 22 3e 0a 0a sitional//EN">..
0040: 3c 68 74 6d 6c 3e 0a 0a 3c 68 65 61 64 3e 0a 3c <html>..<head>.<
0050: 6d 65 74 61 20 68 74 74 70 2d 65 71 75 69 76 3d meta http-equiv=
0060: 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 0a 63 "Content-Type".c
0070: 6f 6e 74 65 6e 74 3d 22 74 65 78 74 2f 68 74 6d ontent="text/htm
0080: 6c 3b 20 63 68 61 72 73 65 74 3d 69 73 6f 2d 38 l; charset=iso-8
0090: 38 35 39 2d 31 22 3e 0a 3c 6d 65 74 61 20 6e 61 859-1">.<meta na
00a0: 6d 65 3d 22 43 6f 70 79 72 69 67 68 74 22 20 63 me="Copyright" c
00b0: 6f 6e 74 65 6e 74 3d 22 31 39 39 39 20 4d 61 74 ontent="1999 Mat
00c0: 74 20 4e 65 77 6d 61 6e 20 2f 20 32 30 30 34 20 t Newman / 2004
00d0: 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 Starfish Systems
00e0: 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c 53 20 28 53 ">.<title>TLS (S
00f0: 53 4c 29 20 54 63 6c 20 43 6f 6d 6d 61 6e 64 73 SL) Tcl Commands
0100: 3c 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64 3e </title>.</head>
0110: 0a 0a 3c 62 6f 64 79 20 62 67 63 6f 6c 6f 72 3d ..<body bgcolor=
0120: 22 23 46 46 46 46 46 46 22 3e 0a 0a 3c 64 6c 3e "#FFFFFF">..<dl>
0130: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 . <dd><a href
0140: 3d 22 23 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 ="#NAME">NAME</a
0150: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 64 3e >. <dl>..<dd>
0160: 3c 62 3e 74 6c 73 3c 2f 62 3e 20 2d 20 62 69 6e <b>tls</b> - bin
0170: 64 69 6e 67 20 74 6f 20 3c 62 3e 4f 70 65 6e 53 ding to <b>OpenS
0180: 53 4c 3c 2f 62 3e 20 74 6f 6f 6c 6b 69 74 2e 3c SL</b> toolkit.<
0190: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 20 /dd>. </dl>.
01a0: 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 </dd>. <dd
01b0: 3e 3c 61 20 68 72 65 66 3d 22 23 53 59 4e 4f 50 ><a href="#SYNOP
01c0: 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 SIS">SYNOPSIS</a
01d0: 3e 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e > </dd>. <dd>
01e0: 3c 64 6c 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 <dl>.. <dd><b
01f0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 >package require
0200: 20 54 63 6c 3c 2f 62 3e 20 3c 65 6d 3e 3f 38 2e Tcl</b> <em>?8.
0210: 34 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 4?</em></dd>..
0220: 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 <dd><b>package
0230: 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e require tls</b>
0240: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74 3e 26 </dd>.. <dt>&
0250: 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20 20 20 nbsp;</dt>..
0260: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 <dd><b>tls::init
0270: 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e </b> <em>?option
0280: 73 3f 3c 2f 65 6d 3e 20 3c 2f 64 64 3e 0a 09 20 s?</em> </dd>..
0290: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 <dd><b>tls::s
02a0: 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f ocket</b> <em>?o
02b0: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 ptions? host por
02c0: 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 t</em></dd>..
02d0: 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 <dd><b>tls::soc
02e0: 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 20 3f 2d 73 ket</b> <em> ?-s
02f0: 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f erver command? ?
0300: 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 options? port</e
0310: 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 m></dd>.. <dd
0320: 3e 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 ><b>tls::handsha
0330: 6b 65 3c 2f 62 3e 20 3c 65 6d 3e 20 63 68 61 6e ke</b> <em> chan
0340: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 nel</em></dd>..
0350: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 <dd><b>tls::s
0360: 74 61 74 75 73 20 3c 2f 62 3e 20 3c 65 6d 3e 3f tatus </b> <em>?
0370: 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c -local? channel<
0380: 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c /em></dd>.. <
0390: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 dd><b>tls::conne
03a0: 63 74 69 6f 6e 20 3c 2f 62 3e 20 3c 65 6d 3e 63 ction </b> <em>c
03b0: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e hannel</em></dd>
03c0: 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 .. <dd><b>tls
03d0: 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d ::import</b> <em
03e0: 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e >channel ?option
03f0: 73 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 s?</em></dd>..
0400: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 75 6e <dd><b>tls::un
0410: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 import</b> <em>c
0420: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e hannel</em></dd>
0430: 0a 09 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b .. <dt>
0440: 3c 2f 64 74 3e 0a 09 20 20 20 20 3c 64 64 3e 3c </dt>.. <dd><
0450: 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f b>tls::ciphers</
0460: 62 3e 20 3c 65 6d 3e 3f 70 72 6f 74 6f 63 6f 6c b> <em>?protocol
0470: 3f 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 ? ?verbose? ?sup
0480: 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 64 ported?</em></dd
0490: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c >.. <dd><b>tl
04a0: 73 3a 3a 64 69 67 65 73 74 73 3c 2f 62 3e 3c 2f s::digests</b></
04b0: 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e dd>.. <dd><b>
04c0: 74 6c 73 3a 3a 6d 61 63 73 3c 2f 62 3e 3c 2f 64 tls::macs</b></d
04d0: 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 d>.. <dd><b>t
04e0: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 ls::protocols</b
04f0: 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e ></dd>.. <dd>
0500: 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c <b>tls::version<
0510: 2f 62 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 /b></dd>.. <d
0520: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 t> </dt>..
0530: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 64 <dd><b>tls::d
0540: 69 67 65 73 74 3c 2f 62 3e 20 3c 65 6d 3e 74 79 igest</b> <em>ty
0550: 70 65 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 65 6d pe ?options?</em
0560: 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e ></dd>.. <dd>
0570: 3c 62 3e 74 6c 73 3a 3a 63 6d 61 63 3c 2f 62 3e <b>tls::cmac</b>
0580: 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 3c <em>type</em> <
0590: 62 3e 2d 63 69 70 68 65 72 3c 2f 62 3e 20 3c 65 b>-cipher</b> <e
05a0: 6d 3e 6e 61 6d 65 20 3f 6f 70 74 69 6f 6e 73 3f m>name ?options?
05b0: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 </em></dd>..
05c0: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 68 6d 61 63 <dd><b>tls::hmac
05d0: 3c 2f 62 3e 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 </b> <em>type</e
05e0: 6d 3e 20 3c 62 3e 2d 6b 65 79 3c 2f 62 3e 20 3c m> <b>-key</b> <
05f0: 65 6d 3e 6b 65 79 20 3f 6f 70 74 69 6f 6e 73 3f em>key ?options?
0600: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 </em></dd>..
0610: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 34 3c <dd><b>tls::md4<
0620: 2f 62 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d /b> <em>data</em
0630: 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e ></dd>.. <dd>
0640: 3c 62 3e 74 6c 73 3a 3a 6d 64 35 3c 2f 62 3e 20 <b>tls::md5</b>
0650: 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 <em>data</em></d
0660: 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 d>.. <dd><b>t
0670: 6c 73 3a 3a 73 68 61 31 3c 2f 62 3e 20 3c 65 6d ls::sha1</b> <em
0680: 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a >data</em></dd>.
0690: 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a . <dd><b>tls:
06a0: 3a 73 68 61 32 35 36 3c 2f 62 3e 20 3c 65 6d 3e :sha256</b> <em>
06b0: 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 data</em></dd>..
06c0: 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a <dd><b>tls::
06d0: 73 68 61 35 31 32 3c 2f 62 3e 20 3c 65 6d 3e 64 sha512</b> <em>d
06e0: 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c ata</em></dd>..<
06f0: 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 /dl>. </dd>.
0700: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 <dd><a href="
0710: 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 #COMMANDS">COMMA
0720: 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 NDS</a></dd>.
0730: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 <dd><a href="#C
0740: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 ALLBACK OPTIONS"
0750: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e >CALLBACK OPTION
0760: 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c S</a></dd>. <
0770: 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 54 dd><a href="#HTT
0780: 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 PS EXAMPLE">HTTP
0790: 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 S EXAMPLE</a></d
07a0: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 d>. <dd><a hr
07b0: 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 ef="#SEE ALSO">S
07c0: 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 PECIAL CONSIDERA
07d0: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 TIONS</a></dd>.
07e0: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 <dd><a href="
07f0: 23 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 #SEE ALSO">SEE A
0800: 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 LSO</a></dd>.</d
0810: 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 l>..<hr>..<h3><a
0820: 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d name="NAME">NAM
0830: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c E</a></h3>..<p><
0840: 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f strong>tls</stro
0850: 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f ng> - binding to
0860: 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c <strong>OpenSSL
0870: 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 </strong>.toolki
0880: 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e t.</p>..<h3><a n
0890: 61 6d 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53 ame="SYNOPSIS">S
08a0: 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e YNOPSIS</a></h3>
08b0: 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20 ..<p><b>package
08c0: 72 65 71 75 69 72 65 20 54 63 6c 20 38 2e 35 3c require Tcl 8.5<
08d0: 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 /b><br>.<b>packa
08e0: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f ge require tls</
08f0: 62 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 b><br>.<br>.<a h
0900: 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6e 69 74 22 ref="#tls::init"
0910: 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 ><b>tls::init</b
0920: 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f > <i>?options?</
0930: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
0940: 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 ef="#tls::socket
0950: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 "><b>tls::socket
0960: 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 </b> <i>?options
0970: 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f 69 3e 3c ? host port</i><
0980: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0990: 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c s::socket"><b>tl
09a0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 s::socket</b> <i
09b0: 3e 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e >?-server comman
09c0: 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 d? ?options? por
09d0: 74 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 t</i></a><br>.<a
09e0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 href="#tls::sta
09f0: 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 tus"><b>tls::sta
0a00: 74 75 73 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63 tus</b> <i>?-loc
0a10: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c al? channel</i><
0a20: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
0a30: 22 23 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f "#tls::connectio
0a40: 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 n"><b>tls::conne
0a50: 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61 ction</b> <i>cha
0a60: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e nnel</i></a><br>
0a70: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
0a80: 68 61 6e 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c handshake"><b>tl
0a90: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e s::handshake</b>
0aa0: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c <i>channel</i><
0ab0: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
0ac0: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c "#tls::import"><
0ad0: 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 b>tls::import</b
0ae0: 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 > <i>channel ?op
0af0: 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 tions?</i></a><b
0b00: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 r>.<a href="#tls
0b10: 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 ::unimport"><b>t
0b20: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e ls::unimport</b>
0b30: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c <i>channel</i><
0b40: 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 /a><br>.<br>.<a
0b50: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 href="#tls::ciph
0b60: 65 72 73 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 ers"><b>tls::cip
0b70: 68 65 72 73 3c 2f 62 3e 20 3c 69 3e 3f 70 72 6f hers</b> <i>?pro
0b80: 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f tocol? ?verbose?
0b90: 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f 69 3e ?supported?</i>
0ba0: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 </a><br>.<a href
0bb0: 3d 22 23 74 6c 73 3a 3a 64 69 67 65 73 74 73 22 ="#tls::digests"
0bc0: 3e 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 73 ><b>tls::digests
0bd0: 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 </b></a><br>.<a
0be0: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 6d 61 63 73 href="#tls::macs
0bf0: 22 3e 3c 62 3e 74 6c 73 3a 3a 6d 61 63 73 3c 2f "><b>tls::macs</
0c00: 62 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 b></a><br>.<a hr
0c10: 65 66 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 ef="#tls::protoc
0c20: 6f 6c 73 22 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f ols"><b>tls::pro
0c30: 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 tocols</b></a><b
0c40: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 r>.<a href="#tls
0c50: 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74 6c ::version"><b>tl
0c60: 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f s::version</b></
0c70: 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 a><br>.<br>.<a h
0c80: 72 65 66 3d 22 23 74 6c 73 3a 3a 64 69 67 65 73 ref="#tls::diges
0c90: 74 22 3e 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 t"><b>tls::diges
0ca0: 74 3c 2f 62 3e 20 3c 69 3e 74 79 70 65 20 3f 6f t</b> <i>type ?o
0cb0: 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c ptions?</i></a><
0cc0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0cd0: 73 3a 3a 63 6d 61 63 22 3e 3c 62 3e 74 6c 73 3a s::cmac"><b>tls:
0ce0: 3a 63 6d 61 63 3c 2f 62 3e 20 3c 69 3e 74 79 70 :cmac</b> <i>typ
0cf0: 65 3c 2f 69 3e 20 3c 62 3e 2d 63 69 70 68 65 72 e</i> <b>-cipher
0d00: 3c 2f 62 3e 20 3c 69 3e 6e 61 6d 65 20 3f 6f 70 </b> <i>name ?op
0d10: 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 tions?</i></a><b
0d20: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 r>.<a href="#tls
0d30: 3a 3a 68 6d 61 63 22 3e 3c 62 3e 74 6c 73 3a 3a ::hmac"><b>tls::
0d40: 68 6d 61 63 3c 2f 62 3e 20 3c 69 3e 74 79 70 65 hmac</b> <i>type
0d50: 3c 2f 69 3e 20 3c 62 3e 2d 6b 65 79 3c 2f 62 3e </i> <b>-key</b>
0d60: 20 3c 69 3e 6b 65 79 20 3f 6f 70 74 69 6f 6e 73 <i>key ?options
0d70: 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 ?</i></a><br>.<a
0d80: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 6d 64 34 href="#tls::md4
0d90: 22 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 62 "><b>tls::md4</b
0da0: 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 > <i>data</i></a
0db0: 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 ><br>.<a href="#
0dc0: 74 6c 73 3a 3a 6d 64 35 22 3e 3c 62 3e 74 6c 73 tls::md5"><b>tls
0dd0: 3a 3a 6d 64 35 3c 2f 62 3e 20 3c 69 3e 64 61 74 ::md5</b> <i>dat
0de0: 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 a</i></a><br>.<a
0df0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 68 61 href="#tls::sha
0e00: 31 22 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61 31 3c 1"><b>tls::sha1<
0e10: 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c /b> <i>data</i><
0e20: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
0e30: 22 23 74 6c 73 3a 3a 73 68 61 32 35 36 22 3e 3c "#tls::sha256"><
0e40: 62 3e 74 6c 73 3a 3a 73 68 61 32 35 36 3c 2f 62 b>tls::sha256</b
0e50: 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 > <i>data</i></a
0e60: 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 ><br>.<a href="#
0e70: 74 6c 73 3a 3a 73 68 61 35 31 32 22 3e 3c 62 3e tls::sha512"><b>
0e80: 74 6c 73 3a 3a 73 68 61 35 31 32 3c 2f 62 3e 20 tls::sha512</b>
0e90: 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c <i>data</i></a><
0ea0: 62 72 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 br>.</p>..<h3><a
0eb0: 20 6e 61 6d 65 3d 22 44 45 53 43 52 49 50 54 49 name="DESCRIPTI
0ec0: 4f 4e 22 3e 44 45 53 43 52 49 50 54 49 4f 4e 3c ON">DESCRIPTION<
0ed0: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 /a></h3>..<p>Thi
0ee0: 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 s extension prov
0ef0: 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 20 62 ides a generic b
0f00: 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a 68 72 65 inding to <a.hre
0f10: 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 f="http://www.op
0f20: 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e enssl.org/">Open
0f30: 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 SSL</a>, utilizi
0f40: 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 54 ng the.<strong>T
0f50: 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 3c cl_StackChannel<
0f60: 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20 66 6f 72 /strong>.API for
0f70: 20 54 63 6c 20 38 2e 34 20 61 6e 64 20 68 69 67 Tcl 8.4 and hig
0f80: 68 65 72 2e 20 54 68 65 20 73 6f 63 6b 65 74 73 her. The sockets
0f90: 20 62 65 68 61 76 65 20 65 78 61 63 74 6c 79 20 behave exactly
0fa0: 74 68 65 20 73 61 6d 65 0a 61 73 20 63 68 61 6e the same.as chan
0fb0: 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 73 69 nels created usi
0fc0: 6e 67 20 54 63 6c 27 73 20 62 75 69 6c 74 2d 69 ng Tcl's built-i
0fd0: 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 n <strong>socket
0fe0: 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e </strong>.comman
0ff0: 64 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e 61 d with additiona
1000: 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f l options for co
1010: 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 53 ntrolling the SS
1020: 4c 20 73 65 73 73 69 6f 6e 2e 0a 3c 2f 70 3e 0a L session..</p>.
1030: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f .<h3><a name="CO
1040: 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 MMANDS">COMMANDS
1050: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 </a></h3>..<p>Ty
1060: 70 69 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c pically one woul
1070: 64 20 75 73 65 20 74 68 65 20 3c 73 74 72 6f 6e d use the <stron
1080: 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f g>tls::socket </
1090: 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 strong>command.w
10a0: 68 69 63 68 20 70 72 6f 76 69 64 65 73 20 63 6f hich provides co
10b0: 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 mpatibility with
10c0: 20 74 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 the native Tcl
10d0: 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f <strong>socket</
10e0: 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e strong>.command.
10f0: 20 49 6e 20 73 75 63 68 20 63 61 73 65 73 20 3c In such cases <
1100: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f strong>tls::impo
1110: 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f 75 rt</strong> shou
1120: 6c 64 20 6e 6f 74 20 62 65 0a 75 73 65 64 20 64 ld not be.used d
1130: 69 72 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 irectly.</p>..<d
1140: 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 l>. <dt><a na
1150: 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c me="tls::init"><
1160: 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e b>tls::init </b>
1170: 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e <i>?options?</i>
1180: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
1190: 64 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e 63 74 d>Optional funct
11a0: 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 20 64 ion to set the d
11b0: 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20 75 efault options u
11c0: 73 65 64 20 62 79 0a 09 3c 73 74 72 6f 6e 67 3e sed by..<strong>
11d0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 tls::socket</str
11e0: 6f 6e 67 3e 2e 20 49 66 20 79 6f 75 20 63 61 6c ong>. If you cal
11f0: 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 l <strong>tls::i
1200: 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 mport</strong>..
1210: 64 69 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f directly this ro
1220: 75 74 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 utine has no eff
1230: 65 63 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 ect. Any of the
1240: 6f 70 74 69 6f 6e 73 0a 09 74 68 61 74 20 3c 73 options..that <s
1250: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 trong>tls::socke
1260: 74 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63 65 70 t</strong> accep
1270: 74 73 20 63 61 6e 20 62 65 20 73 65 74 0a 09 75 ts can be set..u
1280: 73 69 6e 67 20 74 68 69 73 20 63 6f 6d 6d 61 6e sing this comman
1290: 64 2c 20 74 68 6f 75 67 68 20 79 6f 75 20 73 68 d, though you sh
12a0: 6f 75 6c 64 20 6c 69 6d 69 74 20 79 6f 75 72 20 ould limit your
12b0: 6f 70 74 69 6f 6e 73 0a 09 74 6f 20 6f 6e 6c 79 options..to only
12c0: 20 54 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e 65 TLS related one
12d0: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e s.</dd>. <dt>
12e0: 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 </dt>.
12f0: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
1300: 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 ::socket"><b>tls
1310: 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d ::socket </b><em
1320: 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 09 68 6f 73 74 >?options?..host
1330: 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f port</em></a></
1340: 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 62 3e 74 dt>. <dt><b>t
1350: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 ls::socket</b><e
1360: 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d m> ?-server comm
1370: 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 and? ?options? p
1380: 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ort</em></dt>.
1390: 20 20 3c 64 64 3e 54 68 69 73 20 69 73 20 61 20 <dd>This is a
13a0: 68 65 6c 70 65 72 20 66 75 6e 63 74 69 6f 6e 20 helper function
13b0: 74 68 61 74 20 75 74 69 6c 69 7a 65 73 20 74 68 that utilizes th
13c0: 65 20 75 6e 64 65 72 6c 79 69 6e 67 0a 09 63 6f e underlying..co
13d0: 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 3e mmands (<strong>
13e0: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 tls::import</str
13f0: 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76 65 ong>). It behave
1400: 73 0a 09 65 78 61 63 74 6c 79 20 74 68 65 20 73 s..exactly the s
1410: 61 6d 65 20 61 73 20 74 68 65 20 6e 61 74 69 76 ame as the nativ
1420: 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f e Tcl <strong>so
1430: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 63 cket</strong>..c
1440: 6f 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 ommand except th
1450: 61 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 at the options c
1460: 61 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f an include any o
1470: 66 20 74 68 65 0a 09 61 70 70 6c 69 63 61 62 6c f the..applicabl
1480: 65 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a e <a href="#tls:
1490: 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72 6f 6e 67 :import"><strong
14a0: 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 >tls:import</str
14b0: 6f 6e 67 3e 3c 2f 61 3e 0a 09 6f 70 74 69 6f 6e ong></a>..option
14c0: 73 20 77 69 74 68 20 6f 6e 65 20 61 64 64 69 74 s with one addit
14d0: 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 3a 0a 3c 62 ional option:.<b
14e0: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c lockquote>. <
14f0: 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dl>..<dt><strong
1500: 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 >-autoservername
1510: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
1520: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ol</em></dt>..<d
1530: 64 3e 41 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 d>Automatically
1540: 73 65 6e 64 20 74 68 65 20 2d 73 65 72 76 65 72 send the -server
1550: 6e 61 6d 65 20 61 73 20 74 68 65 20 3c 65 6d 3e name as the <em>
1560: 68 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 host</em> argume
1570: 6e 74 0a 09 20 20 20 20 28 64 65 66 61 75 6c 74 nt.. (default
1580: 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 is <em>false</e
1590: 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 m>)</dd>. </d
15a0: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e l>.</blockquote>
15b0: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d .. <dt><a nam
15c0: 65 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e e="tls::import">
15d0: 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c <b>tls::import <
15e0: 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a 09 3f /b><i>channel..?
15f0: 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e options?</i></a>
1600: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 53 53 </dt>. <dd>SS
1610: 4c 2d 65 6e 61 62 6c 65 20 61 20 72 65 67 75 6c L-enable a regul
1620: 61 72 20 54 63 6c 20 63 68 61 6e 6e 65 6c 20 2d ar Tcl channel -
1630: 20 69 74 20 6e 65 65 64 20 6e 6f 74 20 62 65 20 it need not be
1640: 61 0a 09 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d a..socket, but m
1650: 75 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64 ust provide bi-d
1660: 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e irectional flow.
1670: 20 41 6c 73 6f 0a 09 73 65 74 74 69 6e 67 20 73 Also..setting s
1680: 65 73 73 69 6f 6e 20 70 61 72 61 6d 65 74 65 72 ession parameter
1690: 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 68 s for SSL handsh
16a0: 61 6b 65 2e 3c 2f 64 64 3e 0a 0a 3c 62 6c 6f 63 ake.</dd>..<bloc
16b0: 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e kquote>. <dl>
16c0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 ..<dt><strong>-a
16d0: 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d lpn</strong> <em
16e0: 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >list</em></dt>.
16f0: 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 70 72 6f .<dd>List of pro
1700: 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20 tocols to offer
1710: 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 69 during Applicati
1720: 6f 6e 2d 4c 61 79 65 72 0a 09 20 20 20 20 50 72 on-Layer.. Pr
1730: 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 otocol Negotiati
1740: 6f 6e 20 28 41 4c 50 4e 29 2e 20 46 6f 72 20 65 on (ALPN). For e
1750: 78 61 6d 70 6c 65 3a 20 3c 65 6d 3e 68 32 3c 2f xample: <em>h2</
1760: 65 6d 3e 20 61 6e 64 0a 09 20 20 20 20 3c 65 6d em> and.. <em
1770: 3e 68 74 74 70 2f 31 2e 31 3c 2f 65 6d 3e 2c 20 >http/1.1</em>,
1780: 62 75 74 20 6e 6f 74 20 3c 65 6d 3e 68 33 3c 2f but not <em>h3</
1790: 65 6d 3e 20 6f 72 20 3c 65 6d 3e 71 75 69 63 3c em> or <em>quic<
17a0: 2f 65 6d 3e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e /em>.</dd>..<dt>
17b0: 3c 73 74 72 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f <strong>-cadir</
17c0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c strong> <em>dir<
17d0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 /em></dt>..<dd>S
17e0: 65 74 20 74 68 65 20 43 41 20 63 65 72 74 69 66 et the CA certif
17f0: 69 63 61 74 65 73 20 70 61 74 68 2e 20 54 68 65 icates path. The
1800: 20 64 65 66 61 75 6c 74 20 64 69 72 65 63 74 6f default directo
1810: 72 79 20 69 73 20 70 6c 61 74 66 6f 72 6d 0a 09 ry is platform..
1820: 20 20 20 20 73 70 65 63 69 66 69 63 20 61 6e 64 specific and
1830: 20 63 61 6e 20 62 65 20 73 65 74 20 61 74 20 63 can be set at c
1840: 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20 54 68 69 ompile time. Thi
1850: 73 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 s can be overrid
1860: 64 65 6e 0a 09 20 20 20 20 76 69 61 20 74 68 65 den.. via the
1870: 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 <b>SSL_CERT_DIR
1880: 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 </b> environment
1890: 20 76 61 72 69 61 62 6c 65 2e 3c 2f 64 64 3e 0a variable.</dd>.
18a0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 .<dt><strong>-ca
18b0: 66 69 6c 65 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 file </strong><e
18c0: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c m>filename</em><
18d0: 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 20 74 68 /dt>..<dd>Set th
18e0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 75 e certificate au
18f0: 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 thority (CA) cer
1900: 74 69 66 69 63 61 74 65 73 20 66 69 6c 65 2e 20 tificates file.
1910: 54 68 65 20 64 65 66 61 75 6c 74 0a 09 20 20 20 The default..
1920: 20 69 73 20 74 68 65 20 63 65 72 74 2e 70 65 6d is the cert.pem
1930: 20 66 69 6c 65 20 69 6e 20 74 68 65 20 4f 70 73 file in the Ops
1940: 6e 53 53 4c 20 64 69 72 65 63 74 6f 72 79 2e 20 nSSL directory.
1950: 54 68 69 73 20 63 61 6e 20 61 6c 73 6f 20 62 65 This can also be
1960: 0a 09 20 20 20 20 6f 76 65 72 72 69 64 64 65 6e .. overridden
1970: 20 76 69 61 20 74 68 65 20 3c 62 3e 53 53 4c 5f via the <b>SSL_
1980: 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e CERT_FILE</b> en
1990: 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 vironment variab
19a0: 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 le.</dd>..<dt><s
19b0: 74 72 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65 3c trong>-certfile<
19c0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c /strong> <em>fil
19d0: 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a ename</em></dt>.
19e0: 09 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 .<dd>Specify the
19f0: 20 66 69 6c 65 6e 61 6d 65 20 77 69 74 68 20 74 filename with t
1a00: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 74 he certificate t
1a10: 6f 20 75 73 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 o use.</dd>..<dt
1a20: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74 3c 2f ><strong>-cert</
1a30: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 strong> <em>file
1a40: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 name</em></dt>..
1a50: 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 <dd>Specify the
1a60: 63 6f 6e 74 65 6e 74 73 20 6f 66 20 61 20 63 65 contents of a ce
1a70: 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 rtificate to use
1a80: 2c 20 61 73 20 61 20 44 45 52 0a 09 20 20 20 20 , as a DER..
1a90: 65 6e 63 6f 64 65 64 20 62 69 6e 61 72 79 20 76 encoded binary v
1aa0: 61 6c 75 65 20 28 58 2e 35 30 39 20 44 45 52 29 alue (X.509 DER)
1ab0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
1ac0: 6f 6e 67 3e 2d 63 69 70 68 65 72 3c 2f 73 74 72 ong>-cipher</str
1ad0: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c ong> <em>string<
1ae0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c /em></dt>..<dd>L
1af0: 69 73 74 20 6f 66 20 63 69 70 68 65 72 73 20 74 ist of ciphers t
1b00: 6f 20 75 73 65 2e 20 53 74 72 69 6e 67 20 69 73 o use. String is
1b10: 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22 29 20 73 a colon (":") s
1b20: 65 70 61 72 61 74 65 64 20 6c 69 73 74 0a 09 20 eparated list..
1b30: 20 20 20 6f 66 20 63 69 70 68 65 72 73 20 6f 72 of ciphers or
1b40: 20 63 69 70 68 65 72 20 73 75 69 74 65 73 2e 20 cipher suites.
1b50: 43 69 70 68 65 72 20 73 75 69 74 65 73 20 63 61 Cipher suites ca
1b60: 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 0a 09 20 n be combined..
1b70: 20 20 20 75 73 69 6e 67 20 74 68 65 20 3c 62 3e using the <b>
1b80: 2b 3c 2f 62 3e 20 63 68 61 72 61 63 74 65 72 2e +</b> character.
1b90: 20 50 72 65 66 69 78 65 73 20 63 61 6e 20 62 65 Prefixes can be
1ba0: 20 75 73 65 64 20 74 6f 20 70 65 72 6d 61 6e 65 used to permane
1bb0: 6e 74 6c 79 0a 09 20 20 20 20 72 65 6d 6f 76 65 ntly.. remove
1bc0: 20 28 22 21 22 29 2c 20 64 65 6c 65 74 65 20 28 ("!"), delete (
1bd0: 22 2d 22 29 2c 20 6f 72 20 6d 6f 76 65 20 61 20 "-"), or move a
1be0: 63 79 70 68 65 72 20 74 6f 20 74 68 65 20 65 6e cypher to the en
1bf0: 64 20 6f 66 0a 09 20 20 20 20 74 68 65 20 6c 69 d of.. the li
1c00: 73 74 20 28 22 2b 22 29 2e 20 4b 65 79 77 6f 72 st ("+"). Keywor
1c10: 64 73 20 3c 62 3e 40 53 54 52 45 4e 47 54 48 3c ds <b>@STRENGTH<
1c20: 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 61 6c 67 /b> (sort by alg
1c30: 6f 72 69 74 68 6d 0a 09 20 20 20 20 6b 65 79 20 orithm.. key
1c40: 6c 65 6e 67 74 68 29 2c 20 3c 62 3e 40 53 45 43 length), <b>@SEC
1c50: 4c 45 56 45 4c 3d 3c 2f 62 3e 3c 69 3e 6e 3c 2f LEVEL=</b><i>n</
1c60: 69 3e 20 28 73 65 74 20 73 65 63 75 72 69 74 79 i> (set security
1c70: 20 6c 65 76 65 6c 20 74 6f 0a 09 20 20 20 20 6e level to.. n
1c80: 29 2c 20 61 6e 64 20 3c 62 3e 44 45 46 41 55 4c ), and <b>DEFAUL
1c90: 54 3c 2f 62 3e 20 28 75 73 65 20 64 65 66 61 75 T</b> (use defau
1ca0: 6c 74 20 63 69 70 68 65 72 20 6c 69 73 74 2c 20 lt cipher list,
1cb0: 61 74 20 73 74 61 72 74 20 6f 6e 6c 79 29 0a 09 at start only)..
1cc0: 20 20 20 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 can also be
1cd0: 73 70 65 63 69 66 69 65 64 2e 20 53 65 65 20 4f specified. See O
1ce0: 70 65 6e 53 53 4c 20 64 6f 63 75 6d 65 6e 74 61 penSSL documenta
1cf0: 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c tion for the ful
1d00: 6c 0a 09 20 20 20 20 6c 69 73 74 20 6f 66 20 76 l.. list of v
1d10: 61 6c 69 64 20 76 61 6c 75 65 73 2e 20 28 54 4c alid values. (TL
1d20: 53 20 31 2e 32 20 61 6e 64 20 65 61 72 6c 69 65 S 1.2 and earlie
1d30: 72 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a 09 3c 64 r only)</dd>..<d
1d40: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 t><strong>-ciphe
1d50: 72 73 75 69 74 65 73 3c 2f 73 74 72 6f 6e 67 3e rsuites</strong>
1d60: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e <em>string</em>
1d70: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 </dt>..<dd>List
1d80: 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 73 of cipher suites
1d90: 20 74 6f 20 75 73 65 2e 20 53 74 72 69 6e 67 20 to use. String
1da0: 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22 29 is a colon (":")
1db0: 0a 09 20 20 20 20 73 65 70 61 72 61 74 65 64 20 .. separated
1dc0: 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 list of cipher s
1dd0: 75 69 74 65 20 6e 61 6d 65 73 2e 20 28 54 4c 53 uite names. (TLS
1de0: 20 31 2e 33 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a 1.3 only)</dd>.
1df0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f .<dt><strong>-co
1e00: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c mmand</strong> <
1e10: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
1e20: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6c 6c 62 </dt>..<dd>Callb
1e30: 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 61 74 ack to invoke at
1e40: 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 several points
1e50: 64 75 72 69 6e 67 20 74 68 65 20 68 61 6e 64 73 during the hands
1e60: 68 61 6b 65 2e 0a 09 20 20 20 20 54 68 69 73 20 hake... This
1e70: 69 73 20 75 73 65 64 20 74 6f 20 70 61 73 73 20 is used to pass
1e80: 65 72 72 6f 72 73 20 61 6e 64 20 74 72 61 63 69 errors and traci
1e90: 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 ng information,
1ea0: 61 6e 64 0a 09 20 20 20 20 69 74 20 63 61 6e 20 and.. it can
1eb0: 61 6c 6c 6f 77 20 54 63 6c 20 73 63 72 69 70 74 allow Tcl script
1ec0: 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 s to perform the
1ed0: 69 72 20 6f 77 6e 20 63 65 72 74 69 66 69 63 61 ir own certifica
1ee0: 74 65 0a 09 20 20 20 20 76 61 6c 69 64 61 74 69 te.. validati
1ef0: 6f 6e 20 69 6e 20 70 6c 61 63 65 20 6f 66 20 74 on in place of t
1f00: 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 69 64 he default valid
1f10: 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 62 ation provided b
1f20: 79 0a 09 20 20 20 20 4f 70 65 6e 53 53 4c 2e 20 y.. OpenSSL.
1f30: 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 See <a href="#CA
1f40: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e LLBACK OPTIONS">
1f50: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
1f60: 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 </a>.. for fu
1f70: 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e rther discussion
1f80: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
1f90: 6f 6e 67 3e 2d 64 68 70 61 72 61 6d 73 20 3c 2f ong>-dhparams </
1fa0: 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e strong><em>filen
1fb0: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ame</em></dt>..<
1fc0: 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 44 dd>Specify the D
1fd0: 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 iffie-Hellman pa
1fe0: 72 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f rameters file.</
1ff0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
2000: 3e 2d 6b 65 79 66 69 6c 65 3c 2f 73 74 72 6f 6e >-keyfile</stron
2010: 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c g> <em>filename<
2020: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 /em></dt>..<dd>S
2030: 70 65 63 69 66 79 20 74 68 65 20 70 72 69 76 61 pecify the priva
2040: 74 65 20 6b 65 79 20 66 69 6c 65 2e 20 28 64 65 te key file. (de
2050: 66 61 75 6c 74 20 69 73 0a 09 20 20 20 20 76 61 fault is.. va
2060: 6c 75 65 20 6f 66 20 2d 63 65 72 74 66 69 6c 65 lue of -certfile
2070: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 )</dd>..<dt><str
2080: 6f 6e 67 3e 2d 6b 65 79 3c 2f 73 74 72 6f 6e 67 ong>-key</strong
2090: 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f > <em>filename</
20a0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 em></dt>..<dd>Sp
20b0: 65 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74 ecify the privat
20c0: 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73 20 e key to use as
20d0: 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 76 61 a DER encoded va
20e0: 6c 75 65 20 28 50 4b 43 53 23 31 20 44 45 52 29 lue (PKCS#1 DER)
20f0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
2100: 6e 67 3e 2d 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e ng>-model</stron
2110: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f g> <em>channel</
2120: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 46 6f em></dt>..<dd>Fo
2130: 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c rce this channel
2140: 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 to share the sa
2150: 6d 65 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53 me <em><strong>S
2160: 53 4c 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c SL_CTX</strong><
2170: 2f 65 6d 3e 0a 09 20 20 20 20 73 74 72 75 63 74 /em>.. struct
2180: 75 72 65 20 61 73 20 74 68 65 20 73 70 65 63 69 ure as the speci
2190: 66 69 65 64 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c fied <em>channel
21a0: 3c 2f 65 6d 3e 2c 20 61 6e 64 0a 09 20 20 20 20 </em>, and..
21b0: 74 68 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 therefore share
21c0: 63 61 6c 6c 62 61 63 6b 73 20 65 74 63 2e 3c 2f callbacks etc.</
21d0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
21e0: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f >-password</stro
21f0: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ng> <em>callback
2200: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
2210: 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f Callback to invo
2220: 6b 65 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 ke when OpenSSL
2230: 6e 65 65 64 73 20 74 6f 20 6f 62 74 61 69 6e 20 needs to obtain
2240: 61 20 70 61 73 73 77 6f 72 64 2c 0a 09 20 20 20 a password,..
2250: 20 74 79 70 69 63 61 6c 6c 79 20 74 6f 20 75 6e typically to un
2260: 6c 6f 63 6b 20 74 68 65 20 70 72 69 76 61 74 65 lock the private
2270: 20 6b 65 79 20 6f 66 20 61 20 63 65 72 74 69 66 key of a certif
2280: 69 63 61 74 65 2e 20 54 68 65 0a 09 20 20 20 20 icate. The..
2290: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 callback should
22a0: 72 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20 return a string
22b0: 77 68 69 63 68 20 72 65 70 72 65 73 65 6e 74 73 which represents
22c0: 20 74 68 65 20 70 61 73 73 77 6f 72 64 0a 09 20 the password..
22d0: 20 20 20 74 6f 20 62 65 20 75 73 65 64 2e 20 53 to be used. S
22e0: 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c ee <a href="#CAL
22f0: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 LBACK OPTIONS">C
2300: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c ALLBACK OPTIONS<
2310: 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 72 /a>.. for fur
2320: 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e ther discussion.
2330: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
2340: 6e 67 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 ng>-post_handsha
2350: 6b 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ke</strong> <em>
2360: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 bool</em></dt>..
2370: 3c 64 64 3e 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 <dd>Allow post-h
2380: 61 6e 64 73 68 61 6b 65 20 74 69 63 6b 65 74 20 andshake ticket
2390: 75 70 64 61 74 65 73 2e 3c 2f 64 64 3e 0a 09 3c updates.</dd>..<
23a0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 dt><strong>-requ
23b0: 65 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d est </strong><em
23c0: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
23d0: 09 3c 64 64 3e 52 65 71 75 65 73 74 20 61 20 63 .<dd>Request a c
23e0: 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 ertificate from
23f0: 70 65 65 72 20 64 75 72 69 6e 67 20 53 53 4c 20 peer during SSL
2400: 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 handshake...
2410: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
2420: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a true</em>)</dd>.
2430: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 .<dt><strong>-re
2440: 71 75 69 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c quire</strong> <
2450: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 em>bool</em></dt
2460: 3e 0a 09 3c 64 64 3e 52 65 71 75 69 72 65 20 61 >..<dd>Require a
2470: 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 valid certifica
2480: 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 te from peer dur
2490: 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b ing SSL handshak
24a0: 65 2e 0a 09 20 20 20 20 49 66 20 74 68 69 73 20 e... If this
24b0: 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 2c 20 is set to true,
24c0: 74 68 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d 72 65 then <strong>-re
24d0: 71 75 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 6d quest</strong> m
24e0: 75 73 74 0a 09 20 20 20 20 61 6c 73 6f 20 62 65 ust.. also be
24f0: 20 73 65 74 20 74 6f 20 74 72 75 65 2e 20 28 64 set to true. (d
2500: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 efault is <em>fa
2510: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 lse</em>)</dd>..
2520: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 63 <dt><strong>-sec
2530: 75 72 69 74 79 6c 65 76 65 6c 3c 2f 73 74 72 6f uritylevel</stro
2540: 6e 67 3e 20 3c 65 6d 3e 69 6e 74 65 67 65 72 3c ng> <em>integer<
2550: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 /em></dt>..<dd>S
2560: 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 et security leve
2570: 6c 2e 20 4d 75 73 74 20 62 65 20 30 20 74 6f 20 l. Must be 0 to
2580: 35 2e 20 54 68 65 20 73 65 63 75 72 69 74 79 20 5. The security
2590: 6c 65 76 65 6c 20 61 66 66 65 63 74 73 0a 09 20 level affects..
25a0: 20 20 20 63 69 70 68 65 72 20 73 75 69 74 65 20 cipher suite
25b0: 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c 67 6f 72 encryption algor
25c0: 69 74 68 6d 73 2c 20 73 75 70 70 6f 72 74 65 64 ithms, supported
25d0: 20 45 43 43 20 63 75 72 76 65 73 2c 0a 09 20 20 ECC curves,..
25e0: 20 20 73 75 70 70 6f 72 74 65 64 20 73 69 67 6e supported sign
25f0: 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 ature algorithms
2600: 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72 20 73 , DH parameter s
2610: 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63 61 74 izes, certificat
2620: 65 0a 09 20 20 20 20 6b 65 79 20 73 69 7a 65 73 e.. key sizes
2630: 20 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61 and signature a
2640: 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64 lgorithms. The d
2650: 65 66 61 75 6c 74 20 69 73 20 31 2e 0a 09 20 20 efault is 1...
2660: 20 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 69 Level 3 and hi
2670: 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75 70 gher disable sup
2680: 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f 6e port for session
2690: 20 74 69 63 6b 65 74 73 20 61 6e 64 20 6f 6e 6c tickets and onl
26a0: 79 0a 09 20 20 20 20 61 63 63 65 70 74 20 63 69 y.. accept ci
26b0: 70 68 65 72 20 73 75 69 74 65 73 20 74 68 61 74 pher suites that
26c0: 20 70 72 6f 76 69 64 65 20 66 6f 72 77 61 72 64 provide forward
26d0: 20 73 65 63 72 65 63 79 2e 3c 2f 64 64 3e 0a 09 secrecy.</dd>..
26e0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 <dt><strong>-ser
26f0: 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ver</strong> <em
2700: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
2710: 09 3c 64 64 3e 48 61 6e 64 73 68 61 6b 65 20 61 .<dd>Handshake a
2720: 73 20 73 65 72 76 65 72 20 69 66 20 74 72 75 65 s server if true
2730: 2c 20 65 6c 73 65 20 68 61 6e 64 73 68 61 6b 65 , else handshake
2740: 20 61 73 0a 09 20 20 20 20 63 6c 69 65 6e 74 2e as.. client.
2750: 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d (default is <em
2760: 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 >false</em>)</dd
2770: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
2780: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f servername</stro
2790: 6e 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d ng> <em>host</em
27a0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 ></dt>..<dd>Spec
27b0: 69 66 79 20 73 65 72 76 65 72 20 68 6f 73 74 6e ify server hostn
27c0: 61 6d 65 2e 20 4f 6e 6c 79 20 61 76 61 69 6c 61 ame. Only availa
27d0: 62 6c 65 20 69 66 20 74 68 65 20 4f 70 65 6e 53 ble if the OpenS
27e0: 53 4c 20 6c 69 62 72 61 72 79 0a 09 20 20 20 20 SL library..
27f0: 74 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 6c the package is l
2800: 69 6e 6b 65 64 20 61 67 61 69 6e 73 74 20 73 75 inked against su
2810: 70 70 6f 72 74 73 20 74 68 65 20 54 4c 53 20 68 pports the TLS h
2820: 6f 73 74 6e 61 6d 65 20 65 78 74 65 6e 73 69 6f ostname extensio
2830: 6e 0a 09 20 20 20 20 66 6f 72 20 27 53 65 72 76 n.. for 'Serv
2840: 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 69 er Name Indicati
2850: 6f 6e 27 20 28 53 4e 49 29 2e 20 55 73 65 20 74 on' (SNI). Use t
2860: 6f 20 6e 61 6d 65 20 74 68 65 20 6c 6f 67 69 63 o name the logic
2870: 61 6c 20 68 6f 73 74 0a 09 20 20 20 20 77 65 20 al host.. we
2880: 61 72 65 20 74 61 6c 6b 69 6e 67 20 74 6f 20 61 are talking to a
2890: 6e 64 20 65 78 70 65 63 74 69 6e 67 20 61 20 63 nd expecting a c
28a0: 65 72 74 69 66 69 63 61 74 65 20 66 6f 72 2e 3c ertificate for.<
28b0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
28c0: 67 3e 2d 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 g>-session_id</s
28d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e trong> <em>strin
28e0: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 g</em></dt>..<dd
28f0: 3e 53 65 73 73 69 6f 6e 20 69 64 20 74 6f 20 72 >Session id to r
2900: 65 73 75 6d 65 20 73 65 73 73 69 6f 6e 2e 3c 2f esume session.</
2910: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
2920: 3e 2d 73 73 6c 32 3c 2f 73 74 72 6f 6e 67 3e 20 >-ssl2</strong>
2930: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 <em>bool</em></d
2940: 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 t>..<dd>Enable u
2950: 73 65 20 6f 66 20 53 53 4c 20 76 32 2e 20 28 64 se of SSL v2. (d
2960: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 efault is <em>fa
2970: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 lse</em>)</dd>..
2980: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c <dt><strong>-ssl
2990: 33 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 3 </strong><em>b
29a0: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ool</em></dt>..<
29b0: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 dd>Enable use of
29c0: 20 53 53 4c 20 76 33 2e 20 28 64 65 66 61 75 6c SSL v3. (defaul
29d0: 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f t is <em>false</
29e0: 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d em>)</dd>..<dt>-
29f0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 3c 2f 73 74 <strong>tls1</st
2a00: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f rong> <em>bool</
2a10: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e em></dt>..<dd>En
2a20: 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 able use of TLS
2a30: 76 31 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 v1. (default is
2a40: 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f <em>true</em>)</
2a50: 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e dd>..<dt>-<stron
2a60: 67 3e 74 6c 73 31 2e 31 3c 2f 73 74 72 6f 6e 67 g>tls1.1</strong
2a70: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c > <em>bool</em><
2a80: 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 /dt>..<dd>Enable
2a90: 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 31 use of TLS v1.1
2aa0: 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d (default is <em
2ab0: 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e >true</em>)</dd>
2ac0: 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 ..<dt>-<strong>t
2ad0: 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c ls1.2</strong> <
2ae0: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 em>bool</em></dt
2af0: 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 >..<dd>Enable us
2b00: 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 20 28 64 e of TLS v1.2 (d
2b10: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 efault is <em>tr
2b20: 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c ue</em>)</dd>..<
2b30: 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 dt>-<strong>tls1
2b40: 2e 33 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e .3</strong> <em>
2b50: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 bool</em></dt>..
2b60: 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f <dd>Enable use o
2b70: 66 20 54 4c 53 20 76 31 2e 33 20 28 64 65 66 61 f TLS v1.3 (defa
2b80: 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c ult is <em>true<
2b90: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e /em>)</dd>..<dt>
2ba0: 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 <strong>-validat
2bb0: 65 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 ecommand</strong
2bc0: 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f > <em>callback</
2bd0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 em></dt>..<dd>Ca
2be0: 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 llback to invoke
2bf0: 20 74 6f 20 76 65 72 69 66 79 20 6f 72 20 76 61 to verify or va
2c00: 6c 69 64 61 74 65 20 70 72 6f 74 6f 63 6f 6c 20 lidate protocol
2c10: 63 6f 6e 66 69 67 0a 09 20 20 20 20 70 61 72 61 config.. para
2c20: 6d 65 74 65 72 73 20 64 75 72 69 6e 67 20 74 68 meters during th
2c30: 65 20 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 e protocol negot
2c40: 69 61 74 69 6f 6e 20 70 68 61 73 65 2e 20 53 65 iation phase. Se
2c50: 65 0a 09 20 20 20 20 3c 61 20 68 72 65 66 3d 22 e.. <a href="
2c60: 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e #CALLBACK OPTION
2c70: 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 S">CALLBACK OPTI
2c80: 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 ONS</a>.. for
2c90: 20 66 75 72 74 68 65 72 20 64 69 73 63 75 73 73 further discuss
2ca0: 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f ion.</dd>. </
2cb0: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 dl>.</blockquote
2cc0: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 >.. <dt><a na
2cd0: 6d 65 3d 22 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 me="tls::unimpor
2ce0: 74 22 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 t"><b>tls::unimp
2cf0: 6f 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e ort </b><i>chann
2d00: 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a el</i></a></dt>.
2d10: 20 20 20 20 3c 64 64 3e 50 72 6f 76 69 64 65 64 <dd>Provided
2d20: 20 66 6f 72 20 73 79 6d 6d 65 74 72 79 20 74 6f for symmetry to
2d30: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d <strong>tls::im
2d40: 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 74 port</strong>, t
2d50: 68 69 73 0a 20 20 20 20 20 20 75 6e 73 74 61 63 his. unstac
2d60: 6b 73 20 74 68 65 20 53 53 4c 2d 65 6e 61 62 6c ks the SSL-enabl
2d70: 69 6e 67 20 6f 66 20 61 20 72 65 67 75 6c 61 72 ing of a regular
2d80: 20 54 63 6c 20 63 68 61 6e 6e 65 6c 2e 20 20 41 Tcl channel. A
2d90: 6e 20 65 72 72 6f 72 0a 20 20 20 20 20 20 69 73 n error. is
2da0: 20 74 68 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 thrown if TLS i
2db0: 73 20 6e 6f 74 20 74 68 65 20 74 6f 70 20 73 74 s not the top st
2dc0: 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 acked channel ty
2dd0: 70 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 pe.</dd>. <dt
2de0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 > </dt>.
2df0: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
2e00: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 22 3e 3c 73 s::handshake"><s
2e10: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 68 61 6e 64 73 trong>tls::hands
2e20: 68 61 6b 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 hake</strong> <e
2e30: 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f m>channel</em></
2e40: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e a></dt>. <dd>
2e50: 46 6f 72 63 65 73 20 68 61 6e 64 73 68 61 6b 65 Forces handshake
2e60: 20 74 6f 20 74 61 6b 65 20 70 6c 61 63 65 2c 20 to take place,
2e70: 61 6e 64 20 72 65 74 75 72 6e 73 20 30 20 69 66 and returns 0 if
2e80: 0a 09 68 61 6e 64 73 68 61 6b 65 20 69 73 20 73 ..handshake is s
2e90: 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 till in progress
2ea0: 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c (non-blocking),
2eb0: 20 6f 72 20 31 20 69 66 0a 09 74 68 65 20 68 61 or 1 if..the ha
2ec0: 6e 64 73 68 61 6b 65 20 77 61 73 20 73 75 63 63 ndshake was succ
2ed0: 65 73 73 66 75 6c 2e 20 49 66 20 74 68 65 20 68 essful. If the h
2ee0: 61 6e 64 73 68 61 6b 65 20 66 61 69 6c 65 64 0a andshake failed.
2ef0: 09 74 68 69 73 20 72 6f 75 74 69 6e 65 20 77 69 .this routine wi
2f00: 6c 6c 20 74 68 72 6f 77 20 61 6e 20 65 72 72 6f ll throw an erro
2f10: 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e r.</dd>. <dt>
2f20: 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 </dt>.
2f30: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
2f40: 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e ::status"><stron
2f50: 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73 g>tls::status</s
2f60: 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 3f trong>. <em>?
2f70: 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c -local? channel<
2f80: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 /em></a></dt>.
2f90: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 <dd>Returns th
2fa0: 65 20 63 75 72 72 65 6e 74 20 73 74 61 74 75 73 e current status
2fb0: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 of the certific
2fc0: 61 74 65 20 66 6f 72 20 61 6e 20 53 53 4c 0a 09 ate for an SSL..
2fd0: 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72 65 73 channel. The res
2fe0: 75 6c 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 ult is a list of
2ff0: 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 key-value pairs
3000: 20 64 65 73 63 72 69 62 69 6e 67 0a 09 74 68 65 describing..the
3010: 20 63 65 72 74 69 66 69 63 61 74 65 2e 20 49 66 certificate. If
3020: 20 74 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 the result is a
3030: 6e 20 65 6d 70 74 79 20 6c 69 73 74 20 74 68 65 n empty list the
3040: 6e 20 74 68 65 0a 09 53 53 4c 20 68 61 6e 64 73 n the..SSL hands
3050: 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 hake has not yet
3060: 20 63 6f 6d 70 6c 65 74 65 64 2e 20 49 66 20 3c completed. If <
3070: 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f 65 6d 3e 20 69 em>-local</em> i
3080: 73 0a 09 73 70 65 63 69 66 69 65 64 2c 20 74 68 s..specified, th
3090: 65 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63 65 72 en the local cer
30a0: 74 69 66 69 63 61 74 65 20 69 73 20 75 73 65 64 tificate is used
30b0: 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71 75 6f .</dd>.<blockquo
30c0: 74 65 3e 0a 09 3c 62 3e 53 53 4c 20 53 74 61 74 te>..<b>SSL Stat
30d0: 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a us</b>. <dl>.
30e0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 .<dt><strong>alp
30f0: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 n</strong> <em>p
3100: 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 rotocol</em></dt
3110: 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f >..<dd>The proto
3120: 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 col selected aft
3130: 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c er Application-L
3140: 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 ayer Protocol..
3150: 20 20 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 Negotiation (
3160: 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 ALPN).</dd>..<dt
3170: 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65 72 3c ><strong>cipher<
3180: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 /strong> <em>cip
3190: 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c her</em></dt>..<
31a0: 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 dd>The current c
31b0: 69 70 68 65 72 20 69 6e 20 75 73 65 20 62 65 74 ipher in use bet
31c0: 77 65 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 ween the client
31d0: 61 6e 64 0a 09 20 20 20 20 73 65 72 76 65 72 20 and.. server
31e0: 63 68 61 6e 6e 65 6c 73 2e 3c 2f 64 64 3e 0a 09 channels.</dd>..
31f0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 65 65 72 <dt><strong>peer
3200: 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 name</strong> <e
3210: 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>name</em></dt>
3220: 0a 09 3c 64 64 3e 54 68 65 20 70 65 65 72 6e 61 ..<dd>The peerna
3230: 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 72 74 me from the cert
3240: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c ificate.</dd>..<
3250: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f dt><strong>proto
3260: 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d col</strong> <em
3270: 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 >version</em></d
3280: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 t>..<dd>The prot
3290: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 ocol version use
32a0: 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 d for the connec
32b0: 74 69 6f 6e 3a 0a 09 20 20 20 20 53 53 4c 32 2c tion:.. SSL2,
32c0: 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 SSL3, TLS1, TLS
32d0: 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 1.1, TLS1.2, TLS
32e0: 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 1.3, or unknown.
32f0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3300: 6e 67 3e 73 62 69 74 73 3c 2f 73 74 72 6f 6e 67 ng>sbits</strong
3310: 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 > <em>n</em></dt
3320: 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 >..<dd>The numbe
3330: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 r of bits used f
3340: 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b or the session k
3350: 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 ey.</dd>..<dt><s
3360: 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 48 trong>signatureH
3370: 61 73 68 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 ashAlgorithm</st
3380: 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 rong> <em>algori
3390: 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c thm</em></dt>..<
33a0: 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 dd>The signature
33b0: 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 2e hash algorithm.
33c0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
33d0: 6e 67 3e 73 69 67 6e 61 74 75 72 65 54 79 70 65 ng>signatureType
33e0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79 </strong> <em>ty
33f0: 70 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 pe</em></dt>..<d
3400: 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 d>The signature
3410: 74 79 70 65 20 76 61 6c 75 65 2e 3c 2f 64 64 3e type value.</dd>
3420: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 ..<dt><strong>ve
3430: 72 69 66 79 44 65 70 74 68 3c 2f 73 74 72 6f 6e rifyDepth</stron
3440: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 g> <em>n</em></d
3450: 74 3e 0a 09 3c 64 64 3e 4d 61 78 69 6d 75 6d 20 t>..<dd>Maximum
3460: 64 65 70 74 68 20 66 6f 72 20 74 68 65 20 63 65 depth for the ce
3470: 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 20 rtificate chain
3480: 76 65 72 69 66 69 63 61 74 69 6f 6e 2e 0a 09 20 verification...
3490: 20 20 20 44 65 66 61 75 6c 74 20 69 73 20 2d 31 Default is -1
34a0: 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 3c , to check all.<
34b0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
34c0: 67 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f 73 74 g>verifyMode</st
34d0: 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f rong> <em>list</
34e0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 em></dt>..<dd>Li
34f0: 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 st of certificat
3500: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 6d e verification m
3510: 6f 64 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e odes.</dd>..<dt>
3520: 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 52 65 <strong>verifyRe
3530: 73 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 sult</strong> <e
3540: 6d 3e 72 65 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64 m>result</em></d
3550: 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 t>..<dd>Certific
3560: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e ate verification
3570: 20 72 65 73 75 6c 74 2e 3c 2f 64 64 3e 0a 09 3c result.</dd>..<
3580: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 61 5f 6e 61 dt><strong>ca_na
3590: 6d 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d mes</strong> <em
35a0: 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >list</em></dt>.
35b0: 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 74 68 65 .<dd>List of the
35c0: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 Certificate Aut
35d0: 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 74 6f horities used to
35e0: 20 63 72 65 61 74 65 20 74 68 65 20 63 65 72 74 create the cert
35f0: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 ificate.</dd>.
3600: 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 </dl>.</blockq
3610: 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 uote>.<blockquot
3620: 65 3e 0a 09 3c 62 3e 43 65 72 74 69 66 69 63 61 e>..<b>Certifica
3630: 74 65 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 te Status</b>.
3640: 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 <dl>..<dt><str
3650: 6f 6e 67 3e 61 6c 6c 3c 2f 73 74 72 6f 6e 67 3e ong>all</strong>
3660: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e <em>string</em>
3670: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 44 75 6d 70 20 </dt>..<dd>Dump
3680: 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 69 63 61 of all certifica
3690: 74 65 20 69 6e 66 6f 2e 3c 2f 64 64 3e 0a 0a 09 te info.</dd>...
36a0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 73 <dt><strong>vers
36b0: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ion</strong> <em
36c0: 3e 76 61 6c 75 65 3c 2f 65 6d 3e 3c 2f 64 74 3e >value</em></dt>
36d0: 0a 09 3c 64 64 3e 54 68 65 20 63 65 72 74 69 66 ..<dd>The certif
36e0: 69 63 61 74 65 20 76 65 72 73 69 6f 6e 2e 3c 2f icate version.</
36f0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3700: 3e 73 65 72 69 61 6c 4e 75 6d 62 65 72 3c 2f 73 >serialNumber</s
3710: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d trong> <em>n</em
3720: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
3730: 73 65 72 69 61 6c 20 6e 75 6d 62 65 72 20 6f 66 serial number of
3740: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
3750: 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c as hex string.<
3760: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3770: 67 3e 73 69 67 6e 61 74 75 72 65 3c 2f 73 74 72 g>signature</str
3780: 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 ong> <em>algorit
3790: 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 hm</em></dt>..<d
37a0: 64 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 d>Cipher algorit
37b0: 68 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 hm used for cert
37c0: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 ificate signatur
37d0: 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 e.</dd>..<dt><st
37e0: 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73 74 72 rong>issuer</str
37f0: 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e ong> <em>dn</em>
3800: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 64 </dt>..<dd>The d
3810: 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d istinguished nam
3820: 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 e (DN) of the ce
3830: 72 74 69 66 69 63 61 74 65 20 69 73 73 75 65 72 rtificate issuer
3840: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
3850: 6f 6e 67 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 ong>notBefore</s
3860: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c trong> <em>date<
3870: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
3880: 68 65 20 62 65 67 69 6e 20 64 61 74 65 20 66 6f he begin date fo
3890: 72 20 74 68 65 20 76 61 6c 69 64 69 74 79 20 6f r the validity o
38a0: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 f the certificat
38b0: 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 e.</dd>..<dt><st
38c0: 72 6f 6e 67 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 rong>notAfter</s
38d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c trong> <em>date<
38e0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
38f0: 68 65 20 65 78 70 69 72 61 74 69 6f 6e 20 64 61 he expiration da
3900: 74 65 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 te for the certi
3910: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 ficate.</dd>..<d
3920: 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 t><strong>subjec
3930: 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 t</strong> <em>d
3940: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 n</em></dt>..<dd
3950: 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 >The distinguish
3960: 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 ed name (DN) of
3970: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
3980: 73 75 62 6a 65 63 74 2e 0a 09 20 20 20 20 46 69 subject... Fi
3990: 65 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20 43 6f elds include: Co
39a0: 6d 6d 6f 6e 20 4e 61 6d 65 20 28 43 4e 29 2c 20 mmon Name (CN),
39b0: 4f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 Organization (O)
39c0: 2c 20 4c 6f 63 61 6c 69 74 79 0a 09 20 20 20 20 , Locality..
39d0: 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61 or City (L), Sta
39e0: 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28 te or Province (
39f0: 53 29 2c 20 61 6e 64 20 43 6f 75 6e 74 72 79 20 S), and Country
3a00: 4e 61 6d 65 20 28 43 29 2e 3c 2f 64 64 3e 0a 09 Name (C).</dd>..
3a10: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 73 75 <dt><strong>issu
3a20: 65 72 55 6e 69 71 75 65 49 44 3c 2f 73 74 72 6f erUniqueID</stro
3a30: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ng> <em>string</
3a40: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
3a50: 65 20 69 73 73 75 65 72 20 75 6e 69 71 75 65 20 e issuer unique
3a60: 69 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 id.</dd>..<dt><s
3a70: 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 55 6e 69 trong>subjectUni
3a80: 71 75 65 49 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c queID</strong> <
3a90: 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f em>string</em></
3aa0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 75 62 dt>..<dd>The sub
3ab0: 6a 65 63 74 20 75 6e 69 71 75 65 20 69 64 2e 3c ject unique id.<
3ac0: 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f /dd>...<dt><stro
3ad0: 6e 67 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 6f 6e ng>num_extension
3ae0: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e s</strong> <em>n
3af0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3b00: 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66 Number of certif
3b10: 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73 icate extensions
3b20: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
3b30: 6f 6e 67 3e 65 78 74 65 6e 73 69 6f 6e 73 3c 2f ong>extensions</
3b40: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 strong> <em>list
3b50: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3b60: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 List of certific
3b70: 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61 ate extension na
3b80: 6d 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c mes.</dd>..<dt><
3b90: 73 74 72 6f 6e 67 3e 61 75 74 68 6f 72 69 74 79 strong>authority
3ba0: 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 73 KeyIdentifier</s
3bb0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e trong> <em>strin
3bc0: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 g</em></dt>..<dd
3bd0: 3e 28 41 4b 49 29 20 4b 65 79 20 69 64 65 6e 74 >(AKI) Key ident
3be0: 69 66 69 65 72 20 6f 66 20 74 68 65 20 49 73 73 ifier of the Iss
3bf0: 75 69 6e 67 20 43 41 20 63 65 72 74 69 66 69 63 uing CA certific
3c00: 61 74 65 20 74 68 61 74 20 73 69 67 6e 65 64 0a ate that signed.
3c10: 09 20 20 20 20 74 68 65 20 53 53 4c 20 63 65 72 . the SSL cer
3c20: 74 69 66 69 63 61 74 65 20 61 73 20 68 65 78 20 tificate as hex
3c30: 73 74 72 69 6e 67 2e 20 54 68 69 73 20 76 61 6c string. This val
3c40: 75 65 20 6d 61 74 63 68 65 73 20 74 68 65 20 53 ue matches the S
3c50: 4b 49 0a 09 20 20 20 20 76 61 6c 75 65 20 6f 66 KI.. value of
3c60: 20 74 68 65 20 49 6e 74 65 72 6d 65 64 69 61 74 the Intermediat
3c70: 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 e CA certificate
3c80: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
3c90: 6f 6e 67 3e 73 75 62 6a 65 63 74 4b 65 79 49 64 ong>subjectKeyId
3ca0: 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e 67 entifier</strong
3cb0: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
3cc0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 53 4b 49 ></dt>..<dd>(SKI
3cd0: 29 20 48 61 73 68 20 6f 66 20 74 68 65 20 70 75 ) Hash of the pu
3ce0: 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65 20 blic key inside
3cf0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
3d00: 61 73 20 68 65 78 0a 09 20 20 20 73 74 72 69 6e as hex.. strin
3d10: 67 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e 74 g. Used to ident
3d20: 69 66 79 20 63 65 72 74 69 66 69 63 61 74 65 73 ify certificates
3d30: 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20 that contain a
3d40: 70 61 72 74 69 63 75 6c 61 72 0a 09 20 20 20 70 particular.. p
3d50: 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 64 64 3e 0a ublic key.</dd>.
3d60: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 .<dt><strong>sub
3d70: 6a 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 jectAltName</str
3d80: 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 ong> <em>list</e
3d90: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 m></dt>..<dd>Lis
3da0: 74 20 6f 66 20 61 6c 6c 20 6f 66 20 74 68 65 20 t of all of the
3db0: 61 6c 74 65 72 6e 61 74 69 76 65 20 64 6f 6d 61 alternative doma
3dc0: 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62 20 64 6f in names, sub do
3dd0: 6d 61 69 6e 73 2c 0a 09 20 20 20 20 61 6e 64 20 mains,.. and
3de0: 49 50 20 61 64 64 72 65 73 73 65 73 20 74 68 61 IP addresses tha
3df0: 74 20 61 72 65 20 73 65 63 75 72 65 64 20 62 79 t are secured by
3e00: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
3e10: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
3e20: 6f 6e 67 3e 6f 63 73 70 3c 2f 73 74 72 6f 6e 67 ong>ocsp</strong
3e30: 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c > <em>list</em><
3e40: 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f /dt>..<dd>List o
3e50: 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 f all Online Cer
3e60: 74 69 66 69 63 61 74 65 20 53 74 61 74 75 73 20 tificate Status
3e70: 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 53 50 29 20 Protocol (OCSP)
3e80: 55 52 4c 73 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 URLs.</dd>...<dt
3e90: 3e 3c 73 74 72 6f 6e 67 3e 63 65 72 74 69 66 69 ><strong>certifi
3ea0: 63 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 cate</strong> <e
3eb0: 6d 3e 63 65 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e m>cert</em></dt>
3ec0: 0a 09 3c 64 64 3e 54 68 65 20 50 45 4d 20 65 6e ..<dd>The PEM en
3ed0: 63 6f 64 65 64 20 63 65 72 74 69 66 69 63 61 74 coded certificat
3ee0: 65 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 e.</dd>...<dt><s
3ef0: 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 41 trong>signatureA
3f00: 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 lgorithm</strong
3f10: 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c > <em>algorithm<
3f20: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 /em></dt>..<dd>C
3f30: 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 ipher algorithm
3f40: 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 used for certifi
3f50: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e 3c cate signature.<
3f60: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3f70: 67 3e 73 69 67 6e 61 74 75 72 65 56 61 6c 75 65 g>signatureValue
3f80: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 </strong> <em>st
3f90: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 ring</em></dt>..
3fa0: 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 <dd>Certificate
3fb0: 73 69 67 6e 61 74 75 72 65 20 61 73 20 68 65 78 signature as hex
3fc0: 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c string.</dd>..<
3fd0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 dt><strong>signa
3fe0: 74 75 72 65 44 69 67 65 73 74 3c 2f 73 74 72 6f tureDigest</stro
3ff0: 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c ng> <em>version<
4000: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 /em></dt>..<dd>C
4010: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 69 ertificate signi
4020: 6e 67 20 64 69 67 65 73 74 2e 3c 2f 64 64 3e 0a ng digest.</dd>.
4030: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 .<dt><strong>pub
4040: 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74 68 6d 3c licKeyAlgorithm<
4050: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 /strong> <em>alg
4060: 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e orithm</em></dt>
4070: 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 ..<dd>Certificat
4080: 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c e signature publ
4090: 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d ic key algorithm
40a0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
40b0: 6f 6e 67 3e 70 75 62 6c 69 63 4b 65 79 3c 2f 73 ong>publicKey</s
40c0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e trong> <em>strin
40d0: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 g</em></dt>..<dd
40e0: 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 >Certificate sig
40f0: 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 nature public ke
4100: 79 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e y as hex string.
4110: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
4120: 6e 67 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e ng>bits</strong>
4130: 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e <em>n</em></dt>
4140: 0a 09 3c 64 64 3e 4e 75 6d 62 65 72 20 6f 66 20 ..<dd>Number of
4150: 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 65 bits used for ce
4160: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 rtificate signat
4170: 75 72 65 20 6b 65 79 3c 2f 64 64 3e 0a 09 3c 64 ure key</dd>..<d
4180: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 6c 66 5f 73 t><strong>self_s
4190: 69 67 6e 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c igned</strong> <
41a0: 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c em>boolean</em><
41b0: 2f 64 74 3e 0a 09 3c 64 64 3e 49 73 20 63 65 72 /dt>..<dd>Is cer
41c0: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
41d0: 72 65 20 73 65 6c 66 20 73 69 67 6e 65 64 2e 3c re self signed.<
41e0: 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f /dd>...<dt><stro
41f0: 6e 67 3e 73 68 61 31 5f 68 61 73 68 3c 2f 73 74 ng>sha1_hash</st
4200: 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f rong> <em>hash</
4210: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
4220: 65 20 53 48 41 31 20 68 61 73 68 20 6f 66 20 74 e SHA1 hash of t
4230: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 he certificate a
4240: 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 s hex string.</d
4250: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
4260: 73 68 61 32 35 36 5f 68 61 73 68 3c 2f 73 74 72 sha256_hash</str
4270: 6f 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 ong> <em>hash</e
4280: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
4290: 20 53 48 41 32 35 36 20 68 61 73 68 20 6f 66 20 SHA256 hash of
42a0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
42b0: 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f as hex string.</
42c0: 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f dd>. </dl>.</
42d0: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 blockquote>..
42e0: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
42f0: 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c s::connection"><
4300: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 6f 6e 6e strong>tls::conn
4310: 65 63 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 0a ection</strong>.
4320: 20 20 20 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c <em>channel<
4330: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 /em></a></dt>.
4340: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 <dd>Returns th
4350: 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65 63 e current connec
4360: 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66 20 61 tion status of a
4370: 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 n SSL channel. T
4380: 68 65 0a 09 72 65 73 75 6c 74 20 69 73 20 61 20 he..result is a
4390: 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 list of key-valu
43a0: 65 20 70 61 69 72 73 20 64 65 73 63 72 69 62 69 e pairs describi
43b0: 6e 67 20 74 68 65 0a 09 63 6f 6e 6e 65 63 74 65 ng the..connecte
43c0: 64 20 70 65 65 72 2e 3c 2f 64 64 3e 0a 3c 62 6c d peer.</dd>.<bl
43d0: 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 ockquote>..<b>SS
43e0: 4c 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 L Status</b>.
43f0: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f <dl>..<dt><stro
4400: 6e 67 3e 73 74 61 74 65 3c 2f 73 74 72 6f 6e 67 ng>state</strong
4410: 3e 20 3c 65 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e > <em>state</em>
4420: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 74 61 74 65 </dt>..<dd>State
4430: 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 of the connecti
4440: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 on.</dd>..<dt><s
4450: 74 72 6f 6e 67 3e 73 65 72 76 65 72 6e 61 6d 65 trong>servername
4460: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 </strong> <em>na
4470: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 me</em></dt>..<d
4480: 64 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 d>The name of th
4490: 65 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 e connected to s
44a0: 65 72 76 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 erver.</dd>..<dt
44b0: 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f ><strong>protoco
44c0: 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 l</strong> <em>v
44d0: 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e ersion</em></dt>
44e0: 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 ..<dd>The protoc
44f0: 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 ol version used
4500: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
4510: 6f 6e 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 on:.. SSL2, S
4520: 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e SL3, TLS1, TLS1.
4530: 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 1, TLS1.2, TLS1.
4540: 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 3, or unknown.</
4550: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4560: 3e 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 3c 2f >renegotiation</
4570: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c strong> <em>bool
4580: 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ean</em></dt>..<
4590: 64 64 3e 57 68 65 74 68 65 72 20 70 72 6f 74 6f dd>Whether proto
45a0: 63 6f 6c 20 72 65 6e 65 67 6f 74 69 61 74 69 6f col renegotiatio
45b0: 6e 20 69 73 20 73 75 70 70 6f 72 74 65 64 20 6f n is supported o
45c0: 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 r not.</dd>..<dt
45d0: 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 75 72 69 74 ><strong>securit
45e0: 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 ylevel</strong>
45f0: 3c 65 6d 3e 6c 65 76 65 6c 3c 2f 65 6d 3e 3c 2f <em>level</em></
4600: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 65 63 dt>..<dd>The sec
4610: 75 72 69 74 79 20 6c 65 76 65 6c 20 75 73 65 64 urity level used
4620: 20 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20 6f for selection o
4630: 66 20 63 69 70 68 65 72 73 2c 20 6b 65 79 20 73 f ciphers, key s
4640: 69 7a 65 2c 20 65 74 63 2e 3c 2f 64 64 3e 0a 09 ize, etc.</dd>..
4650: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 <dt><strong>sess
4660: 69 6f 6e 5f 72 65 75 73 65 64 3c 2f 73 74 72 6f ion_reused</stro
4670: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c ng> <em>boolean<
4680: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 /em></dt>..<dd>W
4690: 68 65 74 68 65 72 20 74 68 65 20 73 65 73 73 69 hether the sessi
46a0: 6f 6e 20 68 61 73 20 62 65 65 6e 20 72 65 75 73 on has been reus
46b0: 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a ed or not.</dd>.
46c0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 5f .<dt><strong>is_
46d0: 73 65 72 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 server</strong>
46e0: 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e <em>boolean</em>
46f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 </dt>..<dd>Wheth
4700: 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f er the connectio
4710: 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 65 64 20 n is configured
4720: 61 73 20 61 20 73 65 72 76 65 72 20 28 31 29 20 as a server (1)
4730: 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 2e 3c 2f or client (0).</
4740: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4750: 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f 73 74 >compression</st
4760: 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f rong> <em>mode</
4770: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 6f em></dt>..<dd>Co
4780: 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64 mpression method
4790: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
47a0: 6f 6e 67 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f 73 ong>expansion</s
47b0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c trong> <em>mode<
47c0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 /em></dt>..<dd>E
47d0: 78 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 2e xpansion method.
47e0: 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a </dd>. </dl>.
47f0: 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 </blockquote>.<b
4800: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 lockquote>..<b>C
4810: 69 70 68 65 72 20 49 6e 66 6f 3c 2f 62 3e 0a 20 ipher Info</b>.
4820: 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 <dl>..<dt><st
4830: 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 rong>cipher</str
4840: 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c ong> <em>cipher<
4850: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
4860: 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 65 he current ciphe
4870: 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68 65 r in use for the
4880: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 connection.</dd
4890: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
48a0: 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f 73 74 tandard_name</st
48b0: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f rong> <em>name</
48c0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
48d0: 65 20 73 74 61 6e 64 61 72 64 20 52 46 43 20 6e e standard RFC n
48e0: 61 6d 65 20 6f 66 20 63 69 70 68 65 72 2e 3c 2f ame of cipher.</
48f0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4900: 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c >bits</strong> <
4910: 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 em>n</em></dt>..
4920: 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f <dd>The number o
4930: 66 20 70 72 6f 63 65 73 73 65 64 20 62 69 74 73 f processed bits
4940: 20 75 73 65 64 20 66 6f 72 20 63 69 70 68 65 72 used for cipher
4950: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
4960: 6f 6e 67 3e 73 65 63 72 65 74 5f 62 69 74 73 3c ong>secret_bits<
4970: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f /strong> <em>n</
4980: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
4990: 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 72 e number of secr
49a0: 65 74 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 et bits used for
49b0: 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c cipher.</dd>..<
49c0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 6d 69 6e 5f 76 dt><strong>min_v
49d0: 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 ersion</strong>
49e0: 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e <em>version</em>
49f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6d </dt>..<dd>The m
4a00: 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 inimum protocol
4a10: 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 69 70 68 version for ciph
4a20: 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 er.</dd>..<dt><s
4a30: 74 72 6f 6e 67 3e 69 64 3c 2f 73 74 72 6f 6e 67 trong>id</strong
4a40: 3e 20 3c 65 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f 64 > <em>id</em></d
4a50: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 4f 70 65 6e t>..<dd>The Open
4a60: 53 53 4c 20 63 69 70 68 65 72 20 69 64 2e 3c 2f SSL cipher id.</
4a70: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4a80: 3e 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f 73 74 >description</st
4a90: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 rong> <em>string
4aa0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
4ab0: 41 20 74 65 78 74 20 64 65 73 63 72 69 70 74 69 A text descripti
4ac0: 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 on of the cipher
4ad0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e .</dd>. </dl>
4ae0: 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c .</blockquote>.<
4af0: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e blockquote>..<b>
4b00: 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f 62 3e Session Info</b>
4b10: 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c . <dl>..<dt><
4b20: 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 strong>alpn</str
4b30: 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f ong> <em>protoco
4b40: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 l</em></dt>..<dd
4b50: 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 >The protocol se
4b60: 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 70 70 lected after App
4b70: 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 lication-Layer P
4b80: 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 4e 65 67 rotocol.. Neg
4b90: 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e otiation (ALPN).
4ba0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
4bb0: 6e 67 3e 72 65 73 75 6d 61 62 6c 65 3c 2f 73 74 ng>resumable</st
4bc0: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 rong> <em>boolea
4bd0: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 n</em></dt>..<dd
4be0: 3e 43 61 6e 20 74 68 65 20 73 65 73 73 69 6f 6e >Can the session
4bf0: 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72 20 6e be resumed or n
4c00: 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 ot.</dd>..<dt><s
4c10: 74 72 6f 6e 67 3e 73 74 61 72 74 5f 74 69 6d 65 trong>start_time
4c20: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 </strong> <em>se
4c30: 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a conds</em></dt>.
4c40: 09 3c 64 64 3e 54 69 6d 65 20 73 69 6e 63 65 20 .<dd>Time since
4c50: 73 65 73 73 69 6f 6e 20 73 74 61 72 74 65 64 20 session started
4c60: 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 6e 63 65 in seconds since
4c70: 20 65 70 6f 63 68 2e 3c 2f 64 64 3e 0a 09 3c 64 epoch.</dd>..<d
4c80: 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 6d 65 6f 75 t><strong>timeou
4c90: 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 t</strong> <em>s
4ca0: 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e econds</em></dt>
4cb0: 0a 09 3c 64 64 3e 4d 61 78 20 64 75 72 61 74 69 ..<dd>Max durati
4cc0: 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e on of session in
4cd0: 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 seconds before
4ce0: 74 69 6d 65 2d 6f 75 74 2e 3c 2f 64 64 3e 0a 09 time-out.</dd>..
4cf0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6c 69 66 65 <dt><strong>life
4d00: 74 69 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 time</strong> <e
4d10: 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f m>seconds</em></
4d20: 64 74 3e 0a 09 3c 64 64 3e 53 65 73 73 69 6f 6e dt>..<dd>Session
4d30: 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 ticket lifetime
4d40: 20 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64 73 hint in seconds
4d50: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
4d60: 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f ong>session_id</
4d70: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 strong> <em>bina
4d80: 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f ry_string</em></
4d90: 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 dt>..<dd>Unique
4da0: 73 65 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 session id for u
4db0: 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 se in resuming t
4dc0: 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e he session.</dd>
4dd0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 ..<dt><strong>se
4de0: 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 ssion_ticket</st
4df0: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 rong> <em>binary
4e00: 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 _string</em></dt
4e10: 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 >..<dd>Unique se
4e20: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72 ssion ticket for
4e30: 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 use in resuming
4e40: 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 the session.</d
4e50: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
4e60: 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 3c ticket_app_data<
4e70: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e /strong> <em>bin
4e80: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c ary_string</em><
4e90: 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 /dt>..<dd>Unique
4ea0: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 session ticket
4eb0: 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 61 74 61 application data
4ec0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
4ed0: 6f 6e 67 3e 6d 61 73 74 65 72 5f 6b 65 79 3c 2f ong>master_key</
4ee0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 strong> <em>bina
4ef0: 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f ry_string</em></
4f00: 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 dt>..<dd>Unique
4f10: 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b session master k
4f20: 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 ey.</dd>..<dt><s
4f30: 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 63 61 trong>session_ca
4f40: 63 68 65 5f 6d 6f 64 65 3c 2f 73 74 72 6f 6e 67 che_mode</strong
4f50: 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c > <em>mode</em><
4f60: 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 72 76 65 72 /dt>..<dd>Server
4f70: 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c 69 cache mode (cli
4f80: 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 20 ent, server, or
4f90: 62 6f 74 68 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 both).</dd>.
4fa0: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f </dl>.</blockquo
4fb0: 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 te>.. <dt><a
4fc0: 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63 69 70 68 65 name="tls::ciphe
4fd0: 72 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a rs"><strong>tls:
4fe0: 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 :ciphers</strong
4ff0: 3e 0a 20 20 20 20 3c 65 6d 3e 3f 70 72 6f 74 6f >. <em>?proto
5000: 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f 20 3f col? ?verbose? ?
5010: 73 75 70 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c supported?</em><
5020: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
5030: 3e 57 69 74 68 6f 75 74 20 61 6e 79 20 61 72 67 >Without any arg
5040: 73 2c 20 72 65 74 75 72 6e 73 20 61 20 6c 69 73 s, returns a lis
5050: 74 20 6f 66 20 61 6c 6c 20 63 69 70 68 65 72 73 t of all ciphers
5060: 2e 20 57 69 74 68 0a 09 3c 65 6d 3e 70 72 6f 74 . With..<em>prot
5070: 6f 63 6f 6c 3c 2f 65 6d 3e 2c 20 6f 6e 6c 79 20 ocol</em>, only
5080: 74 68 65 20 63 69 70 68 65 72 73 20 73 75 70 70 the ciphers supp
5090: 6f 72 74 65 64 20 66 6f 72 20 74 68 61 74 20 70 orted for that p
50a0: 72 6f 74 6f 63 6f 6c 0a 09 61 72 65 20 72 65 74 rotocol..are ret
50b0: 75 72 6e 65 64 20 77 68 65 72 65 20 3c 65 6d 3e urned where <em>
50c0: 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 20 6d 75 protocol</em> mu
50d0: 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 3c 62 3e st be one of <b>
50e0: 73 73 6c 32 2c 20 73 73 6c 33 2c 0a 09 74 6c 73 ssl2, ssl3,..tls
50f0: 31 2c 20 74 6c 73 31 2e 31 2c 20 74 6c 73 31 2e 1, tls1.1, tls1.
5100: 32 2c 3c 2f 62 3e 20 6f 72 20 3c 62 3e 74 6c 73 2,</b> or <b>tls
5110: 31 2e 33 3c 2f 62 3e 2e 20 49 66 20 3c 65 6d 3e 1.3</b>. If <em>
5120: 76 65 72 62 6f 73 65 3c 2f 65 6d 3e 20 69 73 0a verbose</em> is.
5130: 09 73 70 65 63 69 66 69 65 64 20 61 73 20 74 72 .specified as tr
5140: 75 65 20 74 68 65 6e 20 61 20 76 65 72 62 6f 73 ue then a verbos
5150: 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61 62 6c e, human readabl
5160: 65 20 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e e list is return
5170: 65 64 0a 09 77 69 74 68 20 61 64 64 69 74 69 6f ed..with additio
5180: 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 nal information
5190: 6f 6e 20 74 68 65 20 63 69 70 68 65 72 2e 20 49 on the cipher. I
51a0: 66 20 3c 65 6d 3e 73 75 70 70 6f 72 74 65 64 3c f <em>supported<
51b0: 2f 65 6d 3e 0a 09 69 73 20 73 70 65 63 69 66 69 /em>..is specifi
51c0: 65 64 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e ed as true, then
51d0: 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 only the cipher
51e0: 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 s supported for
51f0: 70 72 6f 74 6f 63 6f 6c 0a 09 77 69 6c 6c 20 62 protocol..will b
5200: 65 20 6c 69 73 74 65 64 2e 3c 2f 64 64 3e 0a 0a e listed.</dd>..
5210: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
5220: 22 74 6c 73 3a 3a 64 69 67 65 73 74 73 22 3e 3c "tls::digests"><
5230: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 69 67 65 strong>tls::dige
5240: 73 74 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e sts</strong></a>
5250: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 </dt>. <dd>Re
5260: 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 turns a list of
5270: 74 68 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 the hash algorit
5280: 68 6d 73 20 66 6f 72 20 3c 62 3e 74 6c 73 3a 3a hms for <b>tls::
5290: 64 69 67 65 73 74 3c 2f 62 3e 20 63 6f 6d 6d 61 digest</b> comma
52a0: 6e 64 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 nd.</dd>.. <d
52b0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
52c0: 6d 61 63 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c macs"><strong>tl
52d0: 73 3a 3a 6d 61 63 73 3c 2f 73 74 72 6f 6e 67 3e s::macs</strong>
52e0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
52f0: 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 d>Returns a list
5300: 20 6f 66 20 74 68 65 20 61 76 61 69 6c 61 62 6c of the availabl
5310: 65 20 4d 65 73 73 61 67 65 20 41 75 74 68 65 6e e Message Authen
5320: 74 69 63 61 74 69 6f 6e 20 43 6f 64 65 73 20 28 tication Codes (
5330: 4d 41 43 29 20 66 6f 72 0a 09 74 68 65 20 3c 62 MAC) for..the <b
5340: 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c 2f 62 3e >tls::digest</b>
5350: 20 63 6f 6d 6d 61 6e 64 2e 3c 2f 64 64 3e 0a 0a command.</dd>..
5360: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
5370: 22 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 "tls::protocols"
5380: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 ><strong>tls::pr
5390: 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e otocols</strong>
53a0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
53b0: 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 d>Returns a list
53c0: 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20 70 72 of supported pr
53d0: 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69 64 20 76 otocols. Valid v
53e0: 61 6c 75 65 73 20 61 72 65 3a 0a 09 3c 62 3e 73 alues are:..<b>s
53f0: 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e 73 73 6c 33 sl2</b>, <b>ssl3
5400: 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 3c 2f 62 </b>, <b>tls1</b
5410: 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 3c 2f 62 3e >, <b>tls1.1</b>
5420: 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c , <b>tls1.2</b>,
5430: 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 31 2e 33 3c ..and <b>tls1.3<
5440: 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69 73 74 20 /b>. Exact list
5450: 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 depends on OpenS
5460: 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64 0a 09 SL version and..
5470: 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66 6c 61 compile time fla
5480: 67 73 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 gs.</dd>.. <d
5490: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
54a0: 76 65 72 73 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 version"><strong
54b0: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 73 >tls::version</s
54c0: 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a trong></a></dt>.
54d0: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 <dd>Returns
54e0: 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 the OpenSSL vers
54f0: 69 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e ion string.</dd>
5500: 0a 0a 20 20 20 20 3c 62 72 3e 0a 20 20 20 20 3c .. <br>. <
5510: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
5520: 3a 64 69 67 65 73 74 22 3e 3c 73 74 72 6f 6e 67 :digest"><strong
5530: 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c 2f 73 74 >tls::digest</st
5540: 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69 67 65 73 74 rong> <em>digest
5550: 20 3f 2d 62 69 6e 7c 2d 68 65 78 3f 0a 09 5b 2d ?-bin|-hex?..[-
5560: 66 69 6c 65 20 66 69 6c 65 6e 61 6d 65 20 7c 20 file filename |
5570: 2d 63 6f 6d 6d 61 6e 64 20 63 6d 64 4e 61 6d 65 -command cmdName
5580: 20 7c 20 2d 63 68 61 6e 20 63 68 61 6e 6e 65 6c | -chan channel
5590: 49 64 20 7c 20 3f 2d 64 61 74 61 3f 20 64 61 74 Id | ?-data? dat
55a0: 61 5d 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e a]</em></a></dt>
55b0: 0a 20 20 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61 . <dd>Calcula
55c0: 74 65 20 74 68 65 20 6d 65 73 73 61 67 65 20 64 te the message d
55d0: 69 67 65 73 74 20 66 6f 72 20 64 61 74 61 20 75 igest for data u
55e0: 73 69 6e 67 20 3c 65 6d 3e 64 69 67 65 73 74 3c sing <em>digest<
55f0: 2f 65 6d 3e 20 68 61 73 68 0a 09 66 75 6e 63 74 /em> hash..funct
5600: 69 6f 6e 2e 20 52 65 74 75 72 6e 73 20 76 61 6c ion. Returns val
5610: 75 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 ue as a hex stri
5620: 6e 67 20 28 64 65 66 61 75 6c 74 29 20 6f 72 20 ng (default) or
5630: 61 73 20 61 20 62 69 6e 61 72 79 20 76 61 6c 75 as a binary valu
5640: 65 0a 09 77 69 74 68 20 3c 62 3e 2d 62 69 6e 3c e..with <b>-bin<
5650: 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 41 72 67 75 /b> option. Argu
5660: 6d 65 6e 74 20 3c 65 6d 3e 64 69 67 65 73 74 3c ment <em>digest<
5670: 2f 65 6d 3e 20 63 61 6e 20 62 65 20 61 6e 79 20 /em> can be any
5680: 4f 70 65 6e 53 53 4c 0a 09 73 75 70 70 6f 72 74 OpenSSL..support
5690: 65 64 20 68 61 73 68 20 66 75 6e 63 74 69 6f 6e ed hash function
56a0: 20 69 6e 63 6c 75 64 69 6e 67 3a 20 3c 62 3e 6d including: <b>m
56b0: 64 34 3c 2f 62 3e 2c 20 3c 62 3e 6d 64 35 3c 2f d4</b>, <b>md5</
56c0: 62 3e 2c 20 3c 62 3e 73 68 61 31 3c 2f 62 3e 2c b>, <b>sha1</b>,
56d0: 0a 09 3c 62 3e 73 68 61 32 35 36 3c 2f 62 3e 2c ..<b>sha256</b>,
56e0: 20 3c 62 3e 73 68 61 35 31 32 3c 2f 62 3e 2c 20 <b>sha512</b>,
56f0: 3c 62 3e 73 68 61 33 2d 32 35 36 3c 2f 62 3e 2c <b>sha3-256</b>,
5700: 20 65 74 63 2e 20 53 65 65 0a 09 3c 62 3e 74 6c etc. See..<b>tl
5710: 73 3a 3a 64 69 67 65 73 74 73 3c 2f 62 3e 20 63 s::digests</b> c
5720: 6f 6d 6d 61 6e 64 20 66 6f 72 20 61 20 66 75 6c ommand for a ful
5730: 6c 20 6c 69 73 74 2e 0a 09 3c 62 72 3e 0a 09 55 l list...<br>..U
5740: 73 69 6e 67 20 74 68 65 20 3c 62 3e 2d 64 61 74 sing the <b>-dat
5750: 61 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 77 69 6c a</b> option wil
5760: 6c 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 72 65 l immediately re
5770: 74 75 72 6e 20 74 68 65 20 6d 65 73 73 61 67 65 turn the message
5780: 0a 09 64 69 67 65 73 74 20 66 6f 72 20 3c 65 6d ..digest for <em
5790: 3e 64 61 74 61 3c 2f 65 6d 3e 20 69 6e 20 74 68 >data</em> in th
57a0: 65 20 73 70 65 63 69 66 69 65 64 20 66 6f 72 6d e specified form
57b0: 61 74 2e 0a 09 3c 62 72 3e 0a 09 55 73 69 6e 67 at...<br>..Using
57c0: 20 74 68 65 20 3c 62 3e 2d 66 69 6c 65 3c 2f 62 the <b>-file</b
57d0: 3e 20 6f 70 74 69 6f 6e 20 77 69 6c 6c 20 6f 70 > option will op
57e0: 65 6e 20 66 69 6c 65 20 3c 65 6d 3e 66 69 6c 65 en file <em>file
57f0: 6e 61 6d 65 3c 2f 65 6d 3e 2c 20 72 65 61 64 0a name</em>, read.
5800: 09 74 68 65 20 66 69 6c 65 20 64 61 74 61 2c 20 .the file data,
5810: 63 6c 6f 73 65 20 74 68 65 20 66 69 6c 65 2c 20 close the file,
5820: 61 6e 64 20 72 65 74 75 72 6e 20 74 68 65 20 6d and return the m
5830: 65 73 73 61 67 65 20 64 69 67 65 73 74 20 69 6e essage digest in
5840: 20 74 68 65 0a 09 73 70 65 63 69 66 69 65 64 20 the..specified
5850: 66 6f 72 6d 61 74 2e 20 54 68 69 73 20 75 73 65 format. This use
5860: 73 20 74 68 65 20 54 43 4c 20 41 50 49 73 2c 20 s the TCL APIs,
5870: 73 6f 20 56 46 53 20 66 69 6c 65 73 20 61 72 65 so VFS files are
5880: 20 73 75 70 70 6f 72 74 65 64 2e 0a 09 3c 62 72 supported...<br
5890: 3e 0a 09 55 73 69 6e 67 20 74 68 65 20 3c 62 3e >..Using the <b>
58a0: 2d 63 68 61 6e 3c 2f 62 3e 20 6f 70 74 69 6f 6e -chan</b> option
58b0: 2c 20 61 20 73 74 61 63 6b 65 64 20 63 68 61 6e , a stacked chan
58c0: 6e 65 6c 20 69 73 20 63 72 65 61 74 65 64 20 66 nel is created f
58d0: 6f 72 0a 09 3c 65 6d 3e 63 68 61 6e 6e 65 6c 49 or..<em>channelI
58e0: 64 3c 2f 65 6d 3e 20 61 6e 64 20 64 61 74 61 20 d</em> and data
58f0: 72 65 61 64 20 66 72 6f 6d 20 74 68 65 20 63 68 read from the ch
5900: 61 6e 6e 65 6c 20 69 73 20 75 73 65 64 20 74 6f annel is used to
5910: 20 63 61 6c 63 75 6c 61 74 65 0a 09 61 20 6d 65 calculate..a me
5920: 73 73 61 67 65 20 64 69 67 65 73 74 20 77 69 74 ssage digest wit
5930: 68 20 74 68 65 20 72 65 73 75 6c 74 20 72 65 74 h the result ret
5940: 75 72 6e 65 64 20 77 69 74 68 20 74 68 65 20 6c urned with the l
5950: 61 73 74 20 72 65 61 64 20 6f 70 65 72 61 74 69 ast read operati
5960: 6f 6e 0a 09 62 65 66 6f 72 65 20 45 4f 46 2e 20 on..before EOF.
5970: 43 68 61 6e 6e 65 6c 20 69 73 20 61 75 74 6f 6d Channel is autom
5980: 61 74 69 63 61 6c 6c 79 20 73 65 74 20 74 6f 20 atically set to
5990: 62 69 6e 61 72 79 20 6d 6f 64 65 2e 0a 09 3c 62 binary mode...<b
59a0: 72 3e 0a 09 55 73 69 6e 67 20 74 68 65 20 3c 62 r>..Using the <b
59b0: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 >-command</b> op
59c0: 74 69 6f 6e 2c 20 61 20 6e 65 77 20 63 6f 6d 6d tion, a new comm
59d0: 61 6e 64 20 3c 65 6d 3e 63 6d 64 4e 61 6d 65 3c and <em>cmdName<
59e0: 2f 65 6d 3e 20 69 73 0a 09 63 72 65 61 74 65 64 /em> is..created
59f0: 20 61 6e 64 20 72 65 74 75 72 6e 65 64 2e 20 54 and returned. T
5a00: 6f 20 61 64 64 20 64 61 74 61 20 74 6f 20 74 68 o add data to th
5a10: 65 20 68 61 73 68 20 66 75 6e 63 74 69 6f 6e 2c e hash function,
5a20: 20 63 61 6c 6c 0a 09 26 71 75 6f 74 3b 3c 65 6d call.."<em
5a30: 3e 63 6d 64 4e 61 6d 65 3c 2f 65 6d 3e 20 3c 62 >cmdName</em> <b
5a40: 3e 75 70 64 61 74 65 3c 2f 62 3e 20 3c 65 6d 3e >update</b> <em>
5a50: 64 61 74 61 3c 2f 65 6d 3e 26 71 75 6f 74 3b 2c data</em>",
5a60: 20 77 68 65 72 65 20 64 61 74 61 20 69 73 0a 09 where data is..
5a70: 74 68 65 20 64 61 74 61 20 74 6f 20 61 64 64 2e the data to add.
5a80: 20 57 68 65 6e 20 64 6f 6e 65 2c 20 63 61 6c 6c When done, call
5a90: 20 26 71 75 6f 74 3b 3c 65 6d 3e 63 6d 64 4e 61 "<em>cmdNa
5aa0: 6d 65 3c 2f 65 6d 3e 20 3c 62 3e 66 69 6e 61 6c me</em> <b>final
5ab0: 69 7a 65 3c 2f 62 3e 26 71 75 6f 74 3b 0a 09 74 ize</b>"..t
5ac0: 6f 20 72 65 74 75 72 6e 20 74 68 65 20 6d 65 73 o return the mes
5ad0: 73 61 67 65 20 64 69 67 65 73 74 2e 0a 09 3c 2f sage digest...</
5ae0: 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 dd>.. <dt><a
5af0: 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63 6d 61 63 22 name="tls::cmac"
5b00: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 6d ><strong>tls::cm
5b10: 61 63 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ac</strong> <em>
5b20: 64 69 67 65 73 74 3c 2f 65 6d 3e 0a 09 3c 73 74 digest</em>..<st
5b30: 72 6f 6e 67 3e 2d 63 69 70 68 65 72 3c 2f 73 74 rong>-cipher</st
5b40: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f rong> <em>name</
5b50: 65 6d 3e 20 3f 2d 62 69 6e 7c 2d 68 65 78 3f 20 em> ?-bin|-hex?
5b60: 5b 2d 66 69 6c 65 20 66 69 6c 65 6e 61 6d 65 20 [-file filename
5b70: 7c 0a 09 2d 63 6f 6d 6d 61 6e 64 20 63 6d 64 4e |..-command cmdN
5b80: 61 6d 65 20 7c 20 2d 63 68 61 6e 20 63 68 61 6e ame | -chan chan
5b90: 6e 65 6c 49 64 20 7c 20 3f 2d 64 61 74 61 3f 20 nelId | ?-data?
5ba0: 64 61 74 61 5d 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f data]</em></a></
5bb0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 43 61 6c 63 dt>. <dd>Calc
5bc0: 75 6c 61 74 65 20 74 68 65 20 43 69 70 68 65 72 ulate the Cipher
5bd0: 2d 62 61 73 65 64 20 4d 65 73 73 61 67 65 20 41 -based Message A
5be0: 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 20 43 6f uthentication Co
5bf0: 64 65 20 28 43 4d 41 43 29 2e 20 53 61 6d 65 20 de (CMAC). Same
5c00: 61 72 67 75 6d 65 6e 74 73 0a 09 61 73 20 3c 62 arguments..as <b
5c10: 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c 2f 62 3e >tls::digest</b>
5c20: 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e 61 6c with additional
5c30: 20 6f 70 74 69 6f 6e 20 3c 62 3e 2d 63 69 70 68 option <b>-ciph
5c40: 65 72 3c 2f 62 3e 20 74 6f 20 73 70 65 63 69 66 er</b> to specif
5c50: 79 20 74 68 65 0a 09 63 69 70 68 65 72 20 74 6f y the..cipher to
5c60: 20 75 73 65 20 61 6e 64 20 66 6f 72 20 63 65 72 use and for cer
5c70: 74 61 69 6e 20 63 69 70 68 65 72 73 2c 20 3c 62 tain ciphers, <b
5c80: 3e 2d 6b 65 79 3c 2f 62 3e 20 74 6f 20 73 70 65 >-key</b> to spe
5c90: 63 69 66 79 20 74 68 65 20 6b 65 79 2e 3c 2f 64 cify the key.</d
5ca0: 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e d>.. <dt><a n
5cb0: 61 6d 65 3d 22 74 6c 73 3a 3a 68 6d 61 63 22 3e ame="tls::hmac">
5cc0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 68 6d 61 <strong>tls::hma
5cd0: 63 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 c</strong> <em>d
5ce0: 69 67 65 73 74 3c 2f 65 6d 3e 0a 09 3c 73 74 72 igest</em>..<str
5cf0: 6f 6e 67 3e 2d 6b 65 79 3c 2f 73 74 72 6f 6e 67 ong>-key</strong
5d00: 3e 20 3c 65 6d 3e 6b 65 79 3c 2f 65 6d 3e 20 3f > <em>key</em> ?
5d10: 2d 62 69 6e 7c 2d 68 65 78 3f 20 5b 2d 66 69 6c -bin|-hex? [-fil
5d20: 65 20 66 69 6c 65 6e 61 6d 65 20 7c 0a 09 2d 63 e filename |..-c
5d30: 6f 6d 6d 61 6e 64 20 63 6d 64 4e 61 6d 65 20 7c ommand cmdName |
5d40: 20 2d 63 68 61 6e 20 63 68 61 6e 6e 65 6c 49 64 -chan channelId
5d50: 20 7c 20 3f 2d 64 61 74 61 3f 20 64 61 74 61 5d | ?-data? data]
5d60: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
5d70: 20 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61 74 65 <dd>Calculate
5d80: 20 74 68 65 20 48 61 73 68 65 64 20 4d 65 73 73 the Hashed Mess
5d90: 61 67 65 20 41 75 74 68 65 6e 74 69 63 61 74 69 age Authenticati
5da0: 6f 6e 20 43 6f 64 65 20 28 48 4d 41 43 29 2e 20 on Code (HMAC).
5db0: 53 61 6d 65 20 61 72 67 75 6d 65 6e 74 73 0a 09 Same arguments..
5dc0: 61 73 20 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 as <b>tls::diges
5dd0: 74 3c 2f 62 3e 20 77 69 74 68 20 61 64 64 69 74 t</b> with addit
5de0: 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 20 3c 62 3e ional option <b>
5df0: 2d 6b 65 79 3c 2f 62 3e 20 74 6f 20 73 70 65 63 -key</b> to spec
5e00: 69 66 79 20 74 68 65 0a 09 6b 65 79 20 74 6f 20 ify the..key to
5e10: 75 73 65 2e 20 54 6f 20 73 61 6c 74 20 61 20 70 use. To salt a p
5e20: 61 73 73 77 6f 72 64 2c 20 61 70 70 65 6e 64 20 assword, append
5e30: 6f 72 20 70 72 65 70 65 6e 64 20 74 68 65 20 73 or prepend the s
5e40: 61 6c 74 0a 09 64 61 74 61 20 74 6f 20 74 68 65 alt..data to the
5e50: 20 70 61 73 73 77 6f 72 64 2e 20 3c 2f 64 64 3e password. </dd>
5e60: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d .. <dt><a nam
5e70: 65 3d 22 74 6c 73 3a 3a 6d 64 34 22 3e 3c 73 74 e="tls::md4"><st
5e80: 72 6f 6e 67 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 73 rong>tls::md4</s
5e90: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c trong> <em>data<
5ea0: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 /em></a></dt>.
5eb0: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 <dd>Returns th
5ec0: 65 20 4d 44 34 20 6d 65 73 73 61 67 65 2d 64 69 e MD4 message-di
5ed0: 67 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64 61 74 gest for <em>dat
5ee0: 61 3c 2f 65 6d 3e 20 61 73 20 61 20 68 65 78 20 a</em> as a hex
5ef0: 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20 string.</dd>..
5f00: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
5f10: 6c 73 3a 3a 6d 64 35 22 3e 3c 73 74 72 6f 6e 67 ls::md5"><strong
5f20: 3e 74 6c 73 3a 3a 6d 64 35 3c 2f 73 74 72 6f 6e >tls::md5</stron
5f30: 67 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e g> <em>data</em>
5f40: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
5f50: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 4d 44 d>Returns the MD
5f60: 35 20 6d 65 73 73 61 67 65 2d 64 69 67 65 73 74 5 message-digest
5f70: 20 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 for <em>data</e
5f80: 6d 3e 20 61 73 20 61 20 68 65 78 20 73 74 72 69 m> as a hex stri
5f90: 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 ng.</dd>.. <d
5fa0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
5fb0: 73 68 61 31 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c sha1"><strong>tl
5fc0: 73 3a 3a 73 68 61 31 3c 2f 73 74 72 6f 6e 67 3e s::sha1</strong>
5fd0: 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f <em>data</em></
5fe0: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e a></dt>. <dd>
5ff0: 52 65 74 75 72 6e 73 20 74 68 65 20 53 48 41 31 Returns the SHA1
6000: 20 73 65 63 75 72 65 20 68 61 73 68 20 61 6c 67 secure hash alg
6010: 6f 72 69 74 68 6d 20 64 69 67 65 73 74 20 66 6f orithm digest fo
6020: 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 r <em>data</em>
6030: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e as a hex string.
6040: 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c </dd>.. <dt><
6050: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 68 61 a name="tls::sha
6060: 32 35 36 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 256"><strong>tls
6070: 3a 3a 73 68 61 32 35 36 3c 2f 73 74 72 6f 6e 67 ::sha256</strong
6080: 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c > <em>data</em><
6090: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
60a0: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 53 48 41 >Returns the SHA
60b0: 2d 32 20 53 48 41 32 35 36 20 73 65 63 75 72 65 -2 SHA256 secure
60c0: 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 20 hash algorithm
60d0: 64 69 67 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64 digest for <em>d
60e0: 61 74 61 3c 2f 65 6d 3e 20 61 73 20 61 20 68 65 ata</em> as a he
60f0: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 0a x string.</dd>..
6100: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
6110: 22 74 6c 73 3a 3a 73 68 61 35 31 32 22 3e 3c 73 "tls::sha512"><s
6120: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 68 61 35 31 trong>tls::sha51
6130: 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 2</strong> <em>d
6140: 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 ata</em></a></dt
6150: 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e >. <dd>Return
6160: 73 20 74 68 65 20 53 48 41 2d 32 20 53 48 41 35 s the SHA-2 SHA5
6170: 31 32 20 73 65 63 75 72 65 20 68 61 73 68 20 61 12 secure hash a
6180: 6c 67 6f 72 69 74 68 6d 20 64 69 67 65 73 74 20 lgorithm digest
6190: 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d for <em>data</em
61a0: 3e 20 61 73 20 61 20 68 65 78 20 73 74 72 69 6e > as a hex strin
61b0: 67 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c g.</dd>.</dl>..<
61c0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 41 4c 4c h3><a name="CALL
61d0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 BACK OPTIONS">CA
61e0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f LLBACK OPTIONS</
61f0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 0a 41 73 20 a></h3>..<p>.As
6200: 69 6e 64 69 63 61 74 65 64 20 61 62 6f 76 65 2c indicated above,
6210: 20 69 6e 64 69 76 69 64 75 61 6c 20 63 68 61 6e individual chan
6220: 6e 65 6c 73 20 63 61 6e 20 62 65 20 67 69 76 65 nels can be give
6230: 6e 20 74 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c n their own call
6240: 62 61 63 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 backs.to handle
6250: 69 6e 74 65 72 6d 65 64 69 61 74 65 20 70 72 6f intermediate pro
6260: 63 65 73 73 69 6e 67 20 62 79 20 74 68 65 20 4f cessing by the O
6270: 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 penSSL library,
6280: 75 73 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e using the.<stron
6290: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f g>-command</stro
62a0: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 ng>, <strong>-pa
62b0: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c ssword</strong>,
62c0: 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e 2d 76 61 and.<strong>-va
62d0: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f lidate_command</
62e0: 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 20 strong> options
62f0: 70 61 73 73 65 64 20 74 6f 20 65 69 74 68 65 72 passed to either
6300: 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a of.<strong>tls:
6310: 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e :socket</strong>
6320: 20 6f 72 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a or <strong>tls:
6330: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e :import</strong>
6340: 2e 0a 49 66 20 74 68 65 20 63 61 6c 6c 62 61 63 ..If the callbac
6350: 6b 20 67 65 6e 65 72 61 74 65 73 20 61 6e 20 65 k generates an e
6360: 72 72 6f 72 2c 20 74 68 65 20 3c 62 3e 62 67 65 rror, the <b>bge
6370: 72 72 6f 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 rror</b> command
6380: 20 77 69 74 68 20 62 65 0a 69 6e 76 6f 6b 65 64 with be.invoked
6390: 20 77 69 74 68 20 74 68 65 20 65 72 72 6f 72 20 with the error
63a0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 0a 3c 2f 70 information..</p
63b0: 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a >..<blockquote>.
63c0: 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 <dl>.. <dt><s
63d0: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f trong>-command</
63e0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c strong> <em>call
63f0: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 back</em></dt>.
6400: 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 <dd>..Invokes
6410: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c the specified <
6420: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
6430: 20 73 63 72 69 70 74 20 61 74 20 73 65 76 65 72 script at sever
6440: 61 6c 20 70 6f 69 6e 74 73 0a 09 64 75 72 69 6e al points..durin
6450: 67 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 68 61 g the OpenSSL ha
6460: 6e 64 73 68 61 6b 65 20 61 6e 64 20 75 73 65 2e ndshake and use.
6470: 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 See below for t
6480: 68 65 20 70 6f 73 73 69 62 6c 65 0a 09 61 72 67 he possible..arg
6490: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f uments passed to
64a0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 the callback sc
64b0: 72 69 70 74 2e 20 56 61 6c 75 65 73 20 72 65 74 ript. Values ret
64c0: 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 0a 09 urned from the..
64d0: 63 61 6c 6c 62 61 63 6b 20 61 72 65 20 69 67 6e callback are ign
64e0: 6f 72 65 64 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 ored....<br>..<b
64f0: 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e r>...<dl>...<dt>
6500: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 65 72 72 6f .. <strong>erro
6510: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 r</strong> <em>c
6520: 68 61 6e 6e 65 6c 20 6d 65 73 73 61 67 65 3c 2f hannel message</
6530: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e em>..</dt>..<dd>
6540: 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 .. The <em>mess
6550: 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e age</em> argumen
6560: 74 20 63 6f 6e 74 61 69 6e 73 20 61 6e 20 65 72 t contains an er
6570: 72 6f 72 20 6d 65 73 73 61 67 65 20 67 65 6e 65 ror message gene
6580: 72 61 74 65 64 0a 09 20 20 62 79 20 74 68 65 20 rated.. by the
6590: 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e OpenSSL function
65a0: 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65 61 73 6f <code>ERR_reaso
65b0: 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 n_error_string()
65c0: 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f 64 64 3e 0a </code>...</dd>.
65d0: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 ..<br>...<dt>..
65e0: 20 3c 73 74 72 6f 6e 67 3e 69 6e 66 6f 3c 2f 73 <strong>info</s
65f0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e trong> <em>chann
6600: 65 6c 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d el major minor m
6610: 65 73 73 61 67 65 20 74 79 70 65 3c 2f 65 6d 3e essage type</em>
6620: 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 ..</dt>..<dd>..
6630: 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 This form of ca
6640: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 llback is invoke
6650: 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c d by the OpenSSL
6660: 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f function.. <co
6670: 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 74 5f 69 de>SSL_CTX_set_i
6680: 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f nfo_callback()</
6690: 63 6f 64 65 3e 20 64 75 72 69 6e 67 20 63 6f 6e code> during con
66a0: 6e 65 63 74 69 6f 6e 20 73 65 74 75 70 0a 09 20 nection setup..
66b0: 20 61 6e 64 20 75 73 65 2e 0a 09 20 20 3c 62 72 and use... <br
66c0: 3e 0a 09 20 20 3c 75 6c 3e 0a 09 20 20 3c 6c 69 >.. <ul>.. <li
66d0: 3e 50 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 >Possible values
66e0: 20 66 6f 72 20 3c 65 6d 3e 6d 61 6a 6f 72 3c 2f for <em>major</
66f0: 65 6d 3e 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64 em> are:.. <cod
6700: 65 3e 68 61 6e 64 73 68 61 6b 65 2c 20 61 6c 65 e>handshake, ale
6710: 72 74 2c 20 63 6f 6e 6e 65 63 74 2c 20 61 63 63 rt, connect, acc
6720: 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e ept</code>.</li>
6730: 0a 09 20 20 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 .. <li>Possible
6740: 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e values for <em>
6750: 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a minor</em> are:.
6760: 09 20 20 3c 63 6f 64 65 3e 73 74 61 72 74 2c 20 . <code>start,
6770: 64 6f 6e 65 2c 20 72 65 61 64 2c 20 77 72 69 74 done, read, writ
6780: 65 2c 20 6c 6f 6f 70 2c 20 65 78 69 74 3c 2f 63 e, loop, exit</c
6790: 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c ode>.</li>.. <l
67a0: 69 3e 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67 i>The <em>messag
67b0: 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 e</em> argument
67c0: 69 73 20 61 20 64 65 73 63 72 69 70 74 69 76 65 is a descriptive
67d0: 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61 string which ma
67e0: 79 0a 09 20 20 62 65 20 67 65 6e 65 72 61 74 65 y.. be generate
67f0: 64 20 65 69 74 68 65 72 20 62 79 20 3c 63 6f 64 d either by <cod
6800: 65 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 72 69 e>SSL_state_stri
6810: 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e ng_long()</code>
6820: 20 6f 72 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e or by.. <code>
6830: 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f 73 SSL_alert_desc_s
6840: 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f tring_long()</co
6850: 64 65 3e 2c 20 64 65 70 65 6e 64 69 6e 67 20 6f de>, depending o
6860: 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 2e 3c 2f n the context.</
6870: 6c 69 3e 0a 09 20 20 3c 6c 69 3e 46 6f 72 20 61 li>.. <li>For a
6880: 6c 65 72 74 73 2c 20 74 68 65 20 70 6f 73 73 69 lerts, the possi
6890: 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c ble values for <
68a0: 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 61 72 65 em>type</em> are
68b0: 3a 0a 09 20 20 3c 63 6f 64 65 3e 77 61 72 6e 69 :.. <code>warni
68c0: 6e 67 2c 20 66 61 74 61 6c 2c 20 61 6e 64 20 75 ng, fatal, and u
68d0: 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 65 3e 2e 20 46 nknown</code>. F
68e0: 6f 72 20 6f 74 68 65 72 73 2c 0a 09 20 20 3c 63 or others,.. <c
68f0: 6f 64 65 3e 69 6e 66 6f 3c 2f 63 6f 64 65 3e 20 ode>info</code>
6900: 69 73 20 75 73 65 64 2e 3c 2f 6c 69 3e 0a 09 20 is used.</li>..
6910: 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 0a 09 </ul>..</dd>...
6920: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e <dt>.. <strong>
6930: 6d 65 73 73 61 67 65 3c 2f 73 74 72 6f 6e 67 3e message</strong>
6940: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 69 72 <em>channel dir
6950: 65 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 ection version c
6960: 6f 6e 74 65 6e 74 5f 74 79 70 65 20 64 61 74 61 ontent_type data
6970: 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 </em>..</dt>..<d
6980: 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 d>.. This form
6990: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
69a0: 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 nvoked by the Op
69b0: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 enSSL function..
69c0: 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 65 74 5f <code>SSL_set_
69d0: 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f msg_callback()</
69e0: 63 6f 64 65 3e 20 77 68 65 6e 65 76 65 72 20 61 code> whenever a
69f0: 20 6d 65 73 73 61 67 65 20 69 73 20 73 65 6e 74 message is sent
6a00: 20 6f 72 0a 09 20 20 72 65 63 65 69 76 65 64 2e or.. received.
6a10: 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 It is only avai
6a20: 6c 61 62 6c 65 20 77 68 65 6e 0a 09 20 20 4f 70 lable when.. Op
6a30: 65 6e 53 53 4c 20 69 73 20 63 6f 6d 70 6c 69 65 enSSL is complie
6a40: 64 20 77 69 74 68 20 74 68 65 20 3c 65 6d 3e 65 d with the <em>e
6a50: 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61 63 65 3c nable-ssl-trace<
6a60: 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e 0a 09 20 20 /em> option...
6a70: 57 68 65 72 65 20 3c 65 6d 3e 64 69 72 65 63 74 Where <em>direct
6a80: 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20 53 65 6e 74 ion</em> is Sent
6a90: 20 6f 72 20 52 65 63 65 69 76 65 64 2c 20 3c 65 or Received, <e
6aa0: 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 20 69 m>version</em> i
6ab0: 73 20 74 68 65 0a 09 20 20 70 72 6f 74 6f 63 6f s the.. protoco
6ac0: 6c 20 76 65 72 73 69 6f 6e 2c 20 3c 65 6d 3e 63 l version, <em>c
6ad0: 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f 65 6d 3e ontent_type</em>
6ae0: 20 69 73 20 74 68 65 20 6d 65 73 73 61 67 65 20 is the message
6af0: 63 6f 6e 74 65 6e 74 20 74 79 70 65 2c 0a 09 20 content type,..
6b00: 20 61 6e 64 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 and <em>data</e
6b10: 6d 3e 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f 20 m> is more info
6b20: 6f 6e 20 74 68 65 20 6d 65 73 73 61 67 65 20 66 on the message f
6b30: 72 6f 6d 20 74 68 65 20 3c 63 6f 64 65 3e 53 53 rom the <code>SS
6b40: 4c 5f 74 72 61 63 65 3c 2f 63 6f 64 65 3e 20 41 L_trace</code> A
6b50: 50 49 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e PI...</dd>..<br>
6b60: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f ...<dt>.. <stro
6b70: 6e 67 3e 73 65 73 73 69 6f 6e 3c 2f 73 74 72 6f ng>session</stro
6b80: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 ng> <em>channel
6b90: 73 65 73 73 69 6f 6e 5f 69 64 20 74 69 63 6b 65 session_id ticke
6ba0: 74 20 6c 69 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a t lifetime</em>.
6bb0: 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 .</dt>..<dd>..
6bc0: 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c This form of cal
6bd0: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
6be0: 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 by the OpenSSL
6bf0: 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 function.. <cod
6c00: 65 3e 53 53 4c 5f 43 54 58 5f 73 65 73 73 5f 73 e>SSL_CTX_sess_s
6c10: 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f 63 6f 64 et_new_cb()</cod
6c20: 65 3e 2e 0a 09 20 20 57 68 65 72 65 20 3c 65 6d e>... Where <em
6c30: 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 65 6d 3e >session_id</em>
6c40: 20 69 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 is the current
6c50: 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 session identifi
6c60: 65 72 2c 0a 09 20 20 3c 65 6d 3e 74 69 63 6b 65 er,.. <em>ticke
6c70: 74 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 73 65 t</em> is the se
6c80: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 69 6e 66 ssion ticket inf
6c90: 6f 2c 20 61 6e 64 20 3c 65 6d 3e 6c 69 66 65 74 o, and <em>lifet
6ca0: 69 6d 65 3c 2f 65 6d 3e 0a 09 20 20 69 73 20 74 ime</em>.. is t
6cb0: 68 65 20 74 68 65 20 74 69 63 6b 65 74 20 6c 69 he the ticket li
6cc0: 66 65 74 69 6d 65 20 69 6e 20 73 65 63 6f 6e 64 fetime in second
6cd0: 73 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e 0a s...</dd>..<br>.
6ce0: 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e .</dl>. </dd>
6cf0: 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 20 20 20 20 .. <br>..
6d00: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 <dt><strong>-pas
6d10: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c sword</strong> <
6d20: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
6d30: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 </dt>. <dd>..
6d40: 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 Invokes the spec
6d50: 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 ified <em>callba
6d60: 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 77 ck</em> script w
6d70: 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 hen OpenSSL need
6d80: 73 20 74 6f 0a 09 6f 62 74 61 69 6e 20 61 20 70 s to..obtain a p
6d90: 61 73 73 77 6f 72 64 2e 20 53 65 65 20 62 65 6c assword. See bel
6da0: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 ow for the possi
6db0: 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 61 ble arguments pa
6dc0: 73 73 65 64 20 74 6f 0a 09 74 68 65 20 63 61 6c ssed to..the cal
6dd0: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 53 65 lback script. Se
6de0: 65 20 62 65 6c 6f 77 20 66 6f 72 20 76 61 6c 69 e below for vali
6df0: 64 20 72 65 74 75 72 6e 20 76 61 6c 75 65 73 2e d return values.
6e00: 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a 09 ...<br>..<br>...
6e10: 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c <dl>...<dt>.. <
6e20: 73 74 72 6f 6e 67 3e 70 61 73 73 77 6f 72 64 3c strong>password<
6e30: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 72 77 66 /strong> <em>rwf
6e40: 6c 61 67 20 73 69 7a 65 3c 2f 65 6d 3e 0a 09 3c lag size</em>..<
6e50: 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 49 6e /dt>..<dd>.. In
6e60: 76 6f 6b 65 64 20 77 68 65 6e 20 6c 6f 61 64 69 voked when loadi
6e70: 6e 67 20 6f 72 20 73 74 6f 72 69 6e 67 20 61 20 ng or storing a
6e80: 50 45 4d 20 63 65 72 74 69 66 69 63 61 74 65 20 PEM certificate
6e90: 77 69 74 68 20 65 6e 63 72 79 70 74 69 6f 6e 2e with encryption.
6ea0: 0a 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 72 77 .. Where <em>rw
6eb0: 66 6c 61 67 3c 2f 65 6d 3e 20 69 73 20 30 20 66 flag</em> is 0 f
6ec0: 6f 72 20 72 65 61 64 69 6e 67 2f 64 65 63 72 79 or reading/decry
6ed0: 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72 0a 09 ption or 1 for..
6ee0: 20 20 77 72 69 74 69 6e 67 2f 65 6e 63 72 79 70 writing/encryp
6ef0: 74 69 6f 6e 20 28 63 61 6e 20 70 72 6f 6d 70 74 tion (can prompt
6f00: 20 75 73 65 72 20 74 6f 20 63 6f 6e 66 69 72 6d user to confirm
6f10: 29 20 61 6e 64 0a 09 20 20 3c 65 6d 3e 73 69 7a ) and.. <em>siz
6f20: 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 6d 61 e</em> is the ma
6f30: 78 20 70 61 73 73 77 6f 72 64 20 6c 65 6e 67 74 x password lengt
6f40: 68 20 69 6e 20 62 79 74 65 73 2e 0a 09 20 20 54 h in bytes... T
6f50: 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 he callback shou
6f60: 6c 64 20 72 65 74 75 72 6e 20 74 68 65 20 70 61 ld return the pa
6f70: 73 73 77 6f 72 64 20 61 73 20 61 20 73 74 72 69 ssword as a stri
6f80: 6e 67 2e 0a 09 3c 2f 64 64 3e 0a 20 20 20 20 3c ng...</dd>. <
6f90: 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a /dd>.. <br>..
6fa0: 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 . <dt><strong
6fb0: 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d 61 6e >-validatecomman
6fc0: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 d</strong> <em>c
6fd0: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 allback</em></dt
6fe0: 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f >. <dd>..Invo
6ff0: 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 69 65 kes the specifie
7000: 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f d <em>callback</
7010: 65 6d 3e 20 73 63 72 69 70 74 20 64 75 72 69 6e em> script durin
7020: 67 20 68 61 6e 64 73 68 61 6b 65 20 69 6e 0a 09 g handshake in..
7030: 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64 61 74 order to validat
7040: 65 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 76 e the provided v
7050: 61 6c 75 65 28 73 29 2e 20 53 65 65 20 62 65 6c alue(s). See bel
7060: 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 ow for the possi
7070: 62 6c 65 0a 09 61 72 67 75 6d 65 6e 74 73 20 70 ble..arguments p
7080: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c assed to the cal
7090: 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 0a 09 54 lback script...T
70a0: 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 61 6c o reject the val
70b0: 75 65 20 61 6e 64 20 61 62 6f 72 74 20 63 6f 6e ue and abort con
70c0: 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 6c nection, the cal
70d0: 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 lback should ret
70e0: 75 72 6e 20 30 2e 0a 09 54 6f 20 61 63 63 65 70 urn 0...To accep
70f0: 74 20 74 68 65 20 76 61 6c 75 65 20 61 6e 64 20 t the value and
7100: 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e continue the con
7110: 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 nection, it shou
7120: 6c 64 20 72 65 74 75 72 6e 20 31 2e 0a 09 54 6f ld return 1...To
7130: 20 72 65 6a 65 63 74 20 74 68 65 20 76 61 6c 75 reject the valu
7140: 65 2c 20 62 75 74 20 63 6f 6e 74 69 6e 75 65 20 e, but continue
7150: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 the connection,
7160: 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e it should return
7170: 20 32 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e 2....<br>..<br>
7180: 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09 ...<dl>...<dt>..
7190: 20 20 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f <strong>alpn</
71a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e strong> <em>chan
71b0: 6e 65 6c 20 70 72 6f 74 6f 63 6f 6c 20 6d 61 74 nel protocol mat
71c0: 63 68 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 ch</em>..</dt>..
71d0: 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 <dd>.. For serv
71e0: 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f ers, this form o
71f0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e f callback is in
7200: 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 63 voked when the c
7210: 6c 69 65 6e 74 20 41 4c 50 4e 0a 09 20 20 65 78 lient ALPN.. ex
7220: 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 63 65 69 tension is recei
7230: 76 65 64 2e 20 49 66 20 3c 65 6d 3e 6d 61 74 63 ved. If <em>matc
7240: 68 3c 2f 65 6d 3e 20 69 73 20 74 72 75 65 2c 20 h</em> is true,
7250: 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d <em>protocol</em
7260: 3e 0a 09 20 20 69 73 20 74 68 65 20 66 69 72 73 >.. is the firs
7270: 74 20 3c 62 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 73 t <b>-alpn</b> s
7280: 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f pecified protoco
7290: 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 20 74 68 65 20 l common to the
72a0: 62 6f 74 68 20 74 68 65 0a 09 20 20 63 6c 69 65 both the.. clie
72b0: 6e 74 20 61 6e 64 20 73 65 72 76 65 72 2e 20 49 nt and server. I
72c0: 66 20 6e 6f 74 2c 20 74 68 65 20 66 69 72 73 74 f not, the first
72d0: 20 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65 client specifie
72e0: 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73 0a 09 20 d protocol is..
72f0: 20 75 73 65 64 2e 20 43 61 6c 6c 65 64 20 61 66 used. Called af
7300: 74 65 72 20 68 65 6c 6c 6f 20 61 6e 64 20 41 4c ter hello and AL
7310: 50 4e 20 63 61 6c 6c 62 61 63 6b 73 2e 0a 09 3c PN callbacks...<
7320: 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 /dd>...<br>...<d
7330: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 68 65 t>.. <strong>he
7340: 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d llo</strong> <em
7350: 3e 63 68 61 6e 6e 65 6c 20 73 65 72 76 65 72 6e >channel servern
7360: 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a ame</em>..</dt>.
7370: 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 .<dd>.. For ser
7380: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 vers, this form
7390: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
73a0: 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 63 6c nvoked during cl
73b0: 69 65 6e 74 20 68 65 6c 6c 6f 0a 09 20 20 6d 65 ient hello.. me
73c0: 73 73 61 67 65 20 70 72 6f 63 65 73 73 69 6e 67 ssage processing
73d0: 2e 20 49 74 20 69 73 20 75 73 65 64 20 74 6f 20 . It is used to
73e0: 73 65 6c 65 63 74 20 61 6e 20 61 70 70 72 6f 70 select an approp
73f0: 72 69 61 74 65 20 63 65 72 74 69 66 69 63 61 74 riate certificat
7400: 65 20 74 6f 0a 09 20 20 70 72 65 73 65 6e 74 2c e to.. present,
7410: 20 61 6e 64 20 6d 61 6b 65 20 6f 74 68 65 72 20 and make other
7420: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 64 configuration ad
7430: 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 76 61 justments releva
7440: 6e 74 20 74 6f 20 74 68 61 74 0a 09 20 20 73 65 nt to that.. se
7450: 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 74 rver name and it
7460: 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e s configuration.
7470: 20 43 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 53 Called before S
7480: 4e 49 20 61 6e 64 20 41 4c 50 4e 20 63 61 6c 6c NI and ALPN call
7490: 62 61 63 6b 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 backs...</dd>...
74a0: 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c <br>...<dt>.. <
74b0: 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73 74 72 6f strong>sni</stro
74c0: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 ng> <em>channel
74d0: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a servername</em>.
74e0: 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 .</dt>..<dd>..
74f0: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 For servers, thi
7500: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
7510: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 ck is invoked wh
7520: 65 6e 20 74 68 65 20 53 4e 49 20 65 78 74 65 6e en the SNI exten
7530: 73 69 6f 6e 0a 09 20 20 66 72 6f 6d 20 74 68 65 sion.. from the
7540: 20 63 6c 69 65 6e 74 20 69 73 20 72 65 63 65 69 client is recei
7550: 76 65 64 2e 20 57 68 65 72 65 20 3c 65 6d 3e 73 ved. Where <em>s
7560: 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 20 69 ervername</em> i
7570: 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 09 20 20 s the client..
7580: 70 72 6f 76 69 64 65 64 20 73 65 72 76 65 72 20 provided server
7590: 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 3c 62 name from the <b
75a0: 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 62 3e >-servername</b>
75b0: 20 6f 70 74 69 6f 6e 2e 20 54 68 69 73 20 69 73 option. This is
75c0: 0a 09 20 20 75 73 65 64 20 77 68 65 6e 20 61 20 .. used when a
75d0: 73 65 72 76 65 72 20 73 75 70 70 6f 72 74 73 20 server supports
75e0: 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65 73 2c 20 multiple names,
75f0: 73 6f 20 74 68 65 20 72 69 67 68 74 20 63 65 72 so the right cer
7600: 74 69 66 69 63 61 74 65 0a 09 20 20 63 61 6e 20 tificate.. can
7610: 62 65 20 75 73 65 64 2e 20 43 61 6c 6c 65 64 20 be used. Called
7620: 61 66 74 65 72 20 68 65 6c 6c 6f 20 63 61 6c 6c after hello call
7630: 62 61 63 6b 20 62 75 74 20 62 65 66 6f 72 65 20 back but before
7640: 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 2e 0a 09 ALPN callback...
7650: 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c </dd>...<br>...<
7660: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 76 dt>.. <strong>v
7670: 65 72 69 66 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c erify</strong> <
7680: 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 65 70 74 68 em>channel depth
7690: 20 63 65 72 74 20 73 74 61 74 75 73 20 65 72 72 cert status err
76a0: 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 or</em>..</dt>..
76b0: 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 <dd>.. This for
76c0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
76d0: 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e invoked by Open
76e0: 53 53 4c 20 77 68 65 6e 20 61 20 6e 65 77 20 63 SSL when a new c
76f0: 65 72 74 69 66 69 63 61 74 65 0a 09 20 20 69 73 ertificate.. is
7700: 20 72 65 63 65 69 76 65 64 20 66 72 6f 6d 20 74 received from t
7710: 68 65 20 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f he peer. It allo
7720: 77 73 20 74 68 65 20 63 6c 69 65 6e 74 20 74 6f ws the client to
7730: 20 63 68 65 63 6b 20 74 68 65 0a 09 20 20 63 65 check the.. ce
7740: 72 74 69 66 69 63 61 74 65 20 76 65 72 69 66 69 rtificate verifi
7750: 63 61 74 69 6f 6e 20 72 65 73 75 6c 74 73 20 61 cation results a
7760: 6e 64 20 63 68 6f 6f 73 65 20 77 68 65 74 68 65 nd choose whethe
7770: 72 20 74 6f 20 63 6f 6e 74 69 6e 75 65 0a 09 20 r to continue..
7780: 20 6f 72 20 6e 6f 74 2e 20 49 74 20 69 73 20 63 or not. It is c
7790: 61 6c 6c 65 64 20 66 6f 72 20 65 61 63 68 20 63 alled for each c
77a0: 65 72 74 69 66 69 63 61 74 65 20 69 6e 20 74 68 ertificate in th
77b0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68 e certificate ch
77c0: 61 69 6e 2e 0a 09 20 20 3c 75 6c 3e 0a 09 20 20 ain... <ul>..
77d0: 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 64 65 70 74 <li>The <em>dept
77e0: 68 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 h</em> argument
77f0: 69 73 20 61 6e 20 69 6e 74 65 67 65 72 20 72 65 is an integer re
7800: 70 72 65 73 65 6e 74 69 6e 67 20 74 68 65 0a 09 presenting the..
7810: 20 20 63 75 72 72 65 6e 74 20 64 65 70 74 68 20 current depth
7820: 6f 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61 on the certifica
7830: 74 65 20 63 68 61 69 6e 2c 20 77 69 74 68 0a 09 te chain, with..
7840: 20 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e <code>0</code>
7850: 20 61 73 20 74 68 65 20 70 65 65 72 20 63 65 72 as the peer cer
7860: 74 69 66 69 63 61 74 65 20 61 6e 64 20 68 69 67 tificate and hig
7870: 68 65 72 20 76 61 6c 75 65 73 20 67 6f 69 6e 67 her values going
7880: 0a 09 20 20 75 70 20 74 6f 20 74 68 65 20 43 65 .. up to the Ce
7890: 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 rtificate Author
78a0: 69 74 79 20 28 43 41 29 2e 3c 2f 6c 69 3e 0a 09 ity (CA).</li>..
78b0: 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 63 65 <li>The <em>ce
78c0: 72 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 rt</em> argument
78d0: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 is a list of ke
78e0: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73 69 y-value pairs si
78f0: 6d 69 6c 61 72 0a 09 20 20 74 6f 20 74 68 6f 73 milar.. to thos
7900: 65 20 72 65 74 75 72 6e 65 64 20 62 79 0a 09 20 e returned by..
7910: 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a <a href="#tls::
7920: 73 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e status"><strong>
7930: 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 tls::status</str
7940: 6f 6e 67 3e 3c 2f 61 3e 2e 3c 2f 6c 69 3e 0a 09 ong></a>.</li>..
7950: 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 73 74 <li>The <em>st
7960: 61 74 75 73 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 atus</em> argume
7970: 6e 74 20 69 73 20 61 6e 20 62 6f 6f 6c 65 61 6e nt is an boolean
7980: 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68 representing th
7990: 65 0a 09 20 20 76 61 6c 69 64 69 74 79 20 6f 66 e.. validity of
79a0: 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 65 72 the current cer
79b0: 74 69 66 69 63 61 74 65 2e 0a 09 20 20 41 20 76 tificate... A v
79c0: 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e 30 3c alue of <code>0<
79d0: 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 68 65 /code> means the
79e0: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20 certificate is
79f0: 64 65 65 6d 65 64 20 69 6e 76 61 6c 69 64 2e 0a deemed invalid..
7a00: 09 20 20 41 20 76 61 6c 75 65 20 6f 66 20 3c 63 . A value of <c
7a10: 6f 64 65 3e 31 3c 2f 63 6f 64 65 3e 20 6d 65 61 ode>1</code> mea
7a20: 6e 73 20 74 68 65 20 63 65 72 74 69 66 69 63 61 ns the certifica
7a30: 74 65 20 69 73 20 64 65 65 6d 65 64 20 76 61 6c te is deemed val
7a40: 69 64 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e id.</li>.. <li>
7a50: 54 68 65 20 3c 65 6d 3e 65 72 72 6f 72 3c 2f 65 The <em>error</e
7a60: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 73 75 70 70 m> argument supp
7a70: 6c 69 65 73 20 74 68 65 20 6d 65 73 73 61 67 65 lies the message
7a80: 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65 72 61 , if any, genera
7a90: 74 65 64 0a 09 20 20 62 79 20 3c 63 6f 64 65 3e ted.. by <code>
7aa0: 58 35 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 X509_STORE_CTX_g
7ab0: 65 74 5f 65 72 72 6f 72 28 29 3c 2f 63 6f 64 65 et_error()</code
7ac0: 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 2f 75 6c 3e >.</li>.. </ul>
7ad0: 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e 0a 09 3c ..</dd>..<br>..<
7ae0: 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 3c /dl>. </dd>.<
7af0: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 /dl>.</blockquot
7b00: 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 72 65 6e 63 e>..<p>.Referenc
7b10: 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e e implementation
7b20: 73 20 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 s of these callb
7b30: 61 63 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65 acks are provide
7b40: 64 20 69 6e 20 74 68 65 0a 64 69 73 74 72 69 62 d in the.distrib
7b50: 75 74 69 6f 6e 20 61 73 20 3c 73 74 72 6f 6e 67 ution as <strong
7b60: 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f >tls::callback</
7b70: 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 strong>, <strong
7b80: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f >tls::password</
7b90: 73 74 72 6f 6e 67 3e 2c 0a 61 6e 64 20 3c 73 74 strong>,.and <st
7ba0: 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 rong>tls::valida
7bb0: 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f te_command</stro
7bc0: 6e 67 3e 20 72 65 73 70 65 63 74 69 76 65 6c 79 ng> respectively
7bd0: 2e 20 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 . Note that the
7be0: 73 65 20 61 72 65 0a 3c 65 6d 3e 73 61 6d 70 6c se are.<em>sampl
7bf0: 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e 74 e</em> implement
7c00: 61 74 69 6f 6e 73 20 6f 6e 6c 79 2e 20 20 49 6e ations only. In
7c10: 20 61 20 6d 6f 72 65 20 72 65 61 6c 69 73 74 69 a more realisti
7c20: 63 20 64 65 70 6c 6f 79 6d 65 6e 74 0a 79 6f 75 c deployment.you
7c30: 20 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20 79 would specify y
7c40: 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b our own callback
7c50: 20 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63 68 scripts on each
7c60: 20 54 4c 53 20 63 68 61 6e 6e 65 6c 20 75 73 69 TLS channel usi
7c70: 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 2d ng the.<strong>-
7c80: 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e command</strong>
7c90: 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 , <strong>-passw
7ca0: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e ord</strong>, an
7cb0: 64 20 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 d <strong>-valid
7cc0: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 ate_command</str
7cd0: 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 2e 0a 3c 2f ong> options..</
7ce0: 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 64 65 66 61 p>..<p>.The defa
7cf0: 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 ult behavior whe
7d00: 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 2d 63 n the <strong>-c
7d10: 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 ommand</strong>
7d20: 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c and <strong>-val
7d30: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 idate_command</s
7d40: 74 72 6f 6e 67 3e 0a 6f 70 74 69 6f 6e 73 20 61 trong>.options a
7d50: 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 re not specified
7d60: 20 69 73 20 66 6f 72 20 54 4c 53 20 74 6f 20 70 is for TLS to p
7d70: 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 rocess the assoc
7d80: 69 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 iated library ca
7d90: 6c 6c 62 61 63 6b 73 0a 69 6e 74 65 72 6e 61 6c llbacks.internal
7da0: 6c 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 ly. The default
7db0: 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 behavior when th
7dc0: 65 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 e <strong>-passw
7dd0: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 ord</strong> opt
7de0: 69 6f 6e 20 69 73 20 6e 6f 74 0a 73 70 65 63 69 ion is not.speci
7df0: 66 69 65 64 20 69 73 20 66 6f 72 20 54 4c 53 20 fied is for TLS
7e00: 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 to process the a
7e10: 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 ssociated librar
7e20: 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 20 61 y callbacks by a
7e30: 74 74 65 6d 70 74 69 6e 67 0a 74 6f 20 63 61 6c ttempting.to cal
7e40: 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 l <strong>tls::p
7e50: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e assword</strong>
7e60: 2e 0a 54 68 65 20 64 69 66 66 65 72 65 6e 63 65 ..The difference
7e70: 20 62 65 74 77 65 65 6e 20 74 68 65 73 65 20 74 between these t
7e80: 77 6f 20 62 65 68 61 76 69 6f 72 73 20 69 73 20 wo behaviors is
7e90: 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 a consequence of
7ea0: 20 6d 61 69 6e 74 61 69 6e 69 6e 67 0a 63 6f 6d maintaining.com
7eb0: 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 patibility with
7ec0: 65 61 72 6c 69 65 72 20 69 6d 70 6c 65 6d 65 6e earlier implemen
7ed0: 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c tations..</p>..<
7ee0: 70 3e 0a 54 68 65 20 3c 73 74 72 6f 6e 67 3e 74 p>.The <strong>t
7ef0: 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e ls::debug</stron
7f00: 67 3e 20 76 61 72 69 61 62 6c 65 20 70 72 6f 76 g> variable prov
7f10: 69 64 65 73 20 73 6f 6d 65 20 61 64 64 69 74 69 ides some additi
7f20: 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c 20 6f 76 65 onal.control ove
7f30: 72 20 74 68 65 73 65 20 72 65 66 65 72 65 6e 63 r these referenc
7f40: 65 20 63 61 6c 6c 62 61 63 6b 73 2e 20 20 49 74 e callbacks. It
7f50: 73 20 76 61 6c 75 65 20 69 73 20 7a 65 72 6f 20 s value is zero
7f60: 62 79 20 64 65 66 61 75 6c 74 2e 0a 48 69 67 68 by default..High
7f70: 65 72 20 76 61 6c 75 65 73 20 70 72 6f 64 75 63 er values produc
7f80: 65 20 6d 6f 72 65 20 64 69 61 67 6e 6f 73 74 69 e more diagnosti
7f90: 63 20 6f 75 74 70 75 74 2c 20 61 6e 64 20 77 69 c output, and wi
7fa0: 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 ll also force th
7fb0: 65 0a 76 65 72 69 66 79 20 6d 65 74 68 6f 64 20 e.verify method
7fc0: 69 6e 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a in <strong>tls::
7fd0: 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 callback</strong
7fe0: 3e 20 74 6f 20 61 63 63 65 70 74 20 74 68 65 0a > to accept the.
7ff0: 63 65 72 74 69 66 69 63 61 74 65 2c 20 65 76 65 certificate, eve
8000: 6e 20 77 68 65 6e 20 69 74 20 69 73 20 69 6e 76 n when it is inv
8010: 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a alid..</p>..<p>.
8020: 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 6f 66 20 <em>.The use of
8030: 74 68 65 20 72 65 66 65 72 65 6e 63 65 20 63 61 the reference ca
8040: 6c 6c 62 61 63 6b 73 20 3c 73 74 72 6f 6e 67 3e llbacks <strong>
8050: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 tls::callback</s
8060: 74 72 6f 6e 67 3e 2c 0a 3c 73 74 72 6f 6e 67 3e trong>,.<strong>
8070: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 tls::password</s
8080: 74 72 6f 6e 67 3e 2c 20 61 6e 64 20 3c 73 74 72 trong>, and <str
8090: 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 ong>tls::validat
80a0: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e e_command</stron
80b0: 67 3e 0a 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d g>.is not recomm
80c0: 65 6e 64 65 64 2e 20 20 54 68 65 79 20 6d 61 79 ended. They may
80d0: 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d be removed from
80e0: 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 future releases
80f0: 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 70 ..</em>.</p>..<p
8100: 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 6f >.<em>.The use o
8110: 66 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 3c f the variable <
8120: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 strong>tls::debu
8130: 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 73 20 6e 6f g</strong> is no
8140: 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 t recommended..I
8150: 74 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 t may be removed
8160: 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c from future rel
8170: 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 eases..</em>.</p
8180: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
8190: 44 45 42 55 47 22 3e 44 45 42 55 47 3c 2f 61 3e DEBUG">DEBUG</a>
81a0: 3c 2f 68 33 3e 0a 0a 54 4c 53 20 6b 65 79 20 6c </h3>..TLS key l
81b0: 6f 67 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e ogging can be en
81c0: 61 62 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67 abled by setting
81d0: 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 the environment
81e0: 20 76 61 72 69 61 62 6c 65 0a 3c 62 3e 53 53 4c variable.<b>SSL
81f0: 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 KEYLOGFILE</b> t
8200: 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 o the name of th
8210: 65 20 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f e file to log to
8220: 2e 20 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 . Then whenever
8230: 54 4c 53 0a 6b 65 79 20 6d 61 74 65 72 69 61 6c TLS.key material
8240: 20 69 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 is generated or
8250: 20 72 65 63 65 69 76 65 64 20 69 74 20 77 69 6c received it wil
8260: 6c 20 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 l be logged to t
8270: 68 65 20 66 69 6c 65 2e 20 54 68 69 73 0a 69 73 he file. This.is
8280: 20 75 73 65 66 75 6c 20 66 6f 72 20 6c 6f 67 67 useful for logg
8290: 69 6e 67 20 6b 65 79 20 64 61 74 61 20 66 6f 72 ing key data for
82a0: 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 6e 67 network logging
82b0: 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 74 6f tools to use to
82c0: 0a 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74 .decrypt the dat
82d0: 61 2e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d a...<h3><a name=
82e0: 22 48 54 54 50 53 20 45 58 41 4d 50 4c 45 22 3e "HTTPS EXAMPLE">
82f0: 48 54 54 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61 HTTPS EXAMPLE</a
8300: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 ></h3>..<p>This
8310: 65 78 61 6d 70 6c 65 20 75 73 65 73 20 61 20 73 example uses a s
8320: 61 6d 70 6c 65 20 73 65 72 76 65 72 2e 70 65 6d ample server.pem
8330: 20 70 72 6f 76 69 64 65 64 20 77 69 74 68 20 74 provided with t
8340: 68 65 20 54 4c 53 20 72 65 6c 65 61 73 65 2c 0a he TLS release,.
8350: 63 6f 75 72 74 65 73 79 20 6f 66 20 74 68 65 20 courtesy of the
8360: 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c <strong>OpenSSL<
8370: 2f 73 74 72 6f 6e 67 3e 20 70 72 6f 6a 65 63 74 /strong> project
8380: 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e 3c 63 6f 64 .</p>..<pre><cod
8390: 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 e>.package requi
83a0: 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 re http.package
83b0: 72 65 71 75 69 72 65 20 74 6c 73 0a 0a 68 74 74 require tls..htt
83c0: 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 p::register http
83d0: 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c s 443 [list ::tl
83e0: 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 s::socket -autos
83f0: 65 72 76 65 72 6e 61 6d 65 20 74 72 75 65 20 2d ervername true -
8400: 72 65 71 75 69 72 65 20 74 72 75 65 20 2d 63 61 require true -ca
8410: 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72 dir /etc/ssl/cer
8420: 74 73 5d 0a 0a 73 65 74 20 74 6f 6b 20 5b 68 74 ts]..set tok [ht
8430: 74 70 3a 3a 67 65 74 75 72 6c 20 68 74 74 70 73 tp::geturl https
8440: 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f 5d 0a ://www.tcl.tk/].
8450: 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e 0a 0a 3c </code></pre>..<
8460: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 50 45 43 h3><a name="SPEC
8470: 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f IAL CONSIDERATIO
8480: 4e 53 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53 NS">SPECIAL CONS
8490: 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f IDERATIONS</a></
84a0: 68 33 3e 0a 0a 3c 70 3e 54 68 65 20 63 61 70 61 h3>..<p>The capa
84b0: 62 69 6c 69 74 69 65 73 20 6f 66 20 74 68 69 73 bilities of this
84c0: 20 70 61 63 6b 61 67 65 20 63 61 6e 20 76 61 72 package can var
84d0: 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 62 61 73 y enormously bas
84e0: 65 64 20 75 70 6f 6e 20 68 6f 77 20 79 6f 75 72 ed upon how your
84f0: 0a 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 .OpenSSL library
8500: 20 77 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20 was configured
8510: 61 6e 64 20 62 75 69 6c 74 2e 20 4e 65 77 20 76 and built. New v
8520: 65 72 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f ersions may obso
8530: 6c 65 74 65 20 6f 6c 64 65 72 0a 70 72 6f 74 6f lete older.proto
8540: 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64 col versions, ad
8550: 64 20 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68 d or remove ciph
8560: 65 72 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61 ers, change defa
8570: 75 6c 74 20 76 61 6c 75 65 73 2c 20 65 74 63 2e ult values, etc.
8580: 20 55 73 65 20 74 68 65 0a 3c 73 74 72 6f 6e 67 Use the.<strong
8590: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 73 >tls::ciphers</s
85a0: 74 72 6f 6e 67 3e 20 61 6e 64 20 3c 73 74 72 6f trong> and <stro
85b0: 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c ng>tls::protocol
85c0: 73 3c 2f 73 74 72 6f 6e 67 3e 20 63 6f 6d 6d 61 s</strong> comma
85d0: 6e 64 73 20 74 6f 0a 6f 62 74 61 69 6e 20 74 68 nds to.obtain th
85e0: 65 20 73 75 70 70 6f 72 74 65 64 20 76 65 72 73 e supported vers
85f0: 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c ions.</p>..<h3><
8600: 61 20 6e 61 6d 65 3d 22 53 45 45 20 41 4c 53 4f a name="SEE ALSO
8610: 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f ">SEE ALSO</a></
8620: 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 3e h3>..<p><strong>
8630: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 2c socket</strong>,
8640: 20 3c 73 74 72 6f 6e 67 3e 66 69 6c 65 65 76 65 <strong>fileeve
8650: 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67 3e 3c 61 0a nt, </strong><a.
8660: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 href="http://www
8670: 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 3c .openssl.org/"><
8680: 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f strong>OpenSSL</
8690: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a strong></a></p>.
86a0: 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a 43 6f 70 .<hr>..<pre>.Cop
86b0: 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 31 39 yright © 19
86c0: 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 2e 0a 99 Matt Newman..
86d0: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b Copyright ©
86e0: 20 32 30 30 34 20 53 74 61 72 66 69 73 68 20 53 2004 Starfish S
86f0: 79 73 74 65 6d 73 2e 0a 3c 2f 70 72 65 3e 0a 3c ystems..</pre>.<
8700: 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c 3e 0a /body>.</html>.