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 20 3c b>tls::ciphers <
0460: 2f 62 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c /b> <em>protocol
0470: 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 ?verbose? ?supp
0480: 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e orted?</em></dd>
0490: 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 .. <dd><b>tls
04a0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c ::protocols</b><
04b0: 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 /dd>.. <dd><b
04c0: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 >tls::version</b
04d0: 3e 3c 2f 64 64 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 ></dd>..</dl>.
04e0: 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e </dd>. <dd>
04f0: 3c 61 20 68 72 65 66 3d 22 23 43 4f 4d 4d 41 4e <a href="#COMMAN
0500: 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f 61 3e DS">COMMANDS</a>
0510: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 </dd>. <dd><a
0520: 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b href="#CALLBACK
0530: 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 OPTIONS">CALLBA
0540: 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c 2f CK OPTIONS</a></
0550: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 dd>. <dd><a h
0560: 72 65 66 3d 22 23 48 54 54 50 53 20 45 58 41 4d ref="#HTTPS EXAM
0570: 50 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 PLE">HTTPS EXAMP
0580: 4c 45 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 LE</a></dd>.
0590: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 45 <dd><a href="#SE
05a0: 45 20 41 4c 53 4f 22 3e 53 50 45 43 49 41 4c 20 E ALSO">SPECIAL
05b0: 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f CONSIDERATIONS</
05c0: 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e a></dd>. <dd>
05d0: 3c 61 20 68 72 65 66 3d 22 23 53 45 45 20 41 4c <a href="#SEE AL
05e0: 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61 3e SO">SEE ALSO</a>
05f0: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 72 </dd>.</dl>..<hr
0600: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
0610: 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 3e 3c 2f NAME">NAME</a></
0620: 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 3e h3>..<p><strong>
0630: 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 2d 20 62 tls</strong> - b
0640: 69 6e 64 69 6e 67 20 74 6f 20 3c 73 74 72 6f 6e inding to <stron
0650: 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e g>OpenSSL</stron
0660: 67 3e 0a 74 6f 6f 6c 6b 69 74 2e 3c 2f 70 3e 0a g>.toolkit.</p>.
0670: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 59 .<h3><a name="SY
0680: 4e 4f 50 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 NOPSIS">SYNOPSIS
0690: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 62 </a></h3>..<p><b
06a0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 >package require
06b0: 20 54 63 6c 20 38 2e 34 3c 2f 62 3e 3c 62 72 3e Tcl 8.4</b><br>
06c0: 0a 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71 75 .<b>package requ
06d0: 69 72 65 20 74 6c 73 3c 2f 62 3e 3c 62 72 3e 0a ire tls</b><br>.
06e0: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 <br>.<a href="#t
06f0: 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 ls::init"><b>tls
0700: 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 69 3e 3f 6f ::init</b> <i>?o
0710: 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c ptions?</i></a><
0720: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0730: 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c s::socket"><b>tl
0740: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 s::socket</b> <i
0750: 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20 >?options? host
0760: 70 6f 72 74 3c 2f 69 3e 3c 62 72 3e 0a 3c 61 20 port</i><br>.<a
0770: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b href="#tls::sock
0780: 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b et"><b>tls::sock
0790: 65 74 3c 2f 62 3e 20 3c 69 3e 3f 2d 73 65 72 76 et</b> <i>?-serv
07a0: 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 er command? ?opt
07b0: 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 69 3e 3c 2f ions? port</i></
07c0: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 a><br>.<a href="
07d0: 23 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c 62 #tls::status"><b
07e0: 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e >tls::status</b>
07f0: 20 3c 69 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 <i>?-local? cha
0800: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e nnel</i></a><br>
0810: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
0820: 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 62 3e 74 connection"><b>t
0830: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f ls::connection</
0840: 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 b> <i>channel</i
0850: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 ></a><br>.<a hre
0860: 66 3d 22 23 74 6c 73 3a 3a 68 61 6e 64 73 68 61 f="#tls::handsha
0870: 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64 ke"><b>tls::hand
0880: 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 3e 63 68 61 shake</b> <i>cha
0890: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e nnel</i></a><br>
08a0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
08b0: 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a import"><b>tls::
08c0: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 3e 63 68 import</b> <i>ch
08d0: 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c annel ?options?<
08e0: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 /i></a><br>.<a h
08f0: 72 65 66 3d 22 23 74 6c 73 3a 3a 75 6e 69 6d 70 ref="#tls::unimp
0900: 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 ort"><b>tls::uni
0910: 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 3e 63 68 61 mport</b> <i>cha
0920: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e nnel</i></a><br>
0930: 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 .<br>.<a href="#
0940: 74 6c 73 3a 3a 63 69 70 68 65 72 73 22 3e 3c 62 tls::ciphers"><b
0950: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 62 >tls::ciphers</b
0960: 3e 20 3c 69 3e 70 72 6f 74 6f 63 6f 6c 20 3f 76 > <i>protocol ?v
0970: 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 6f 72 74 erbose? ?support
0980: 65 64 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a ed?</i></a><br>.
0990: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 70 <a href="#tls::p
09a0: 72 6f 74 6f 63 6f 6c 73 22 3e 3c 62 3e 74 6c 73 rotocols"><b>tls
09b0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c ::protocols</b><
09c0: 2f 61 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c /a>.<a href="#tl
09d0: 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74 s::version"><b>t
09e0: 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c ls::version</b><
09f0: 2f 61 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 /a>.</p>..<h3><a
0a00: 20 6e 61 6d 65 3d 22 44 45 53 43 52 49 50 54 49 name="DESCRIPTI
0a10: 4f 4e 22 3e 44 45 53 43 52 49 50 54 49 4f 4e 3c ON">DESCRIPTION<
0a20: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 /a></h3>..<p>Thi
0a30: 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 s extension prov
0a40: 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 20 62 ides a generic b
0a50: 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a 68 72 65 inding to <a.hre
0a60: 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 f="http://www.op
0a70: 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e enssl.org/">Open
0a80: 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 SSL</a>, utilizi
0a90: 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 54 ng the.<strong>T
0aa0: 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 3c cl_StackChannel<
0ab0: 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20 66 6f 72 /strong>.API for
0ac0: 20 54 63 6c 20 38 2e 34 20 61 6e 64 20 68 69 67 Tcl 8.4 and hig
0ad0: 68 65 72 2e 20 54 68 65 20 73 6f 63 6b 65 74 73 her. The sockets
0ae0: 20 62 65 68 61 76 65 20 65 78 61 63 74 6c 79 20 behave exactly
0af0: 74 68 65 20 73 61 6d 65 0a 61 73 20 63 68 61 6e the same.as chan
0b00: 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 73 69 nels created usi
0b10: 6e 67 20 54 63 6c 27 73 20 62 75 69 6c 74 2d 69 ng Tcl's built-i
0b20: 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 n <strong>socket
0b30: 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e </strong>.comman
0b40: 64 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e 61 d with additiona
0b50: 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f l options for co
0b60: 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 53 ntrolling the SS
0b70: 4c 20 73 65 73 73 69 6f 6e 2e 0a 3c 2f 70 3e 0a L session..</p>.
0b80: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f .<h3><a name="CO
0b90: 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 MMANDS">COMMANDS
0ba0: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 </a></h3>..<p>Ty
0bb0: 70 69 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c pically one woul
0bc0: 64 20 75 73 65 20 74 68 65 20 3c 73 74 72 6f 6e d use the <stron
0bd0: 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f g>tls::socket </
0be0: 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 strong>command.w
0bf0: 68 69 63 68 20 70 72 6f 76 69 64 65 73 20 63 6f hich provides co
0c00: 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 mpatibility with
0c10: 20 74 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 the native Tcl
0c20: 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f <strong>socket</
0c30: 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e strong>.command.
0c40: 20 49 6e 20 73 75 63 68 20 63 61 73 65 73 20 3c In such cases <
0c50: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f strong>tls::impo
0c60: 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f 75 rt</strong> shou
0c70: 6c 64 20 6e 6f 74 20 62 65 0a 75 73 65 64 20 64 ld not be.used d
0c80: 69 72 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 irectly.</p>..<d
0c90: 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 l>. <dt><a na
0ca0: 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c me="tls::init"><
0cb0: 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e b>tls::init </b>
0cc0: 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e <i>?options?</i>
0cd0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
0ce0: 64 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e 63 74 d>Optional funct
0cf0: 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 20 64 ion to set the d
0d00: 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20 75 efault options u
0d10: 73 65 64 20 62 79 0a 09 3c 73 74 72 6f 6e 67 3e sed by..<strong>
0d20: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 tls::socket</str
0d30: 6f 6e 67 3e 2e 20 49 66 20 79 6f 75 20 63 61 6c ong>. If you cal
0d40: 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 l <strong>tls::i
0d50: 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 mport</strong>..
0d60: 64 69 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f directly this ro
0d70: 75 74 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 utine has no eff
0d80: 65 63 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 ect. Any of the
0d90: 6f 70 74 69 6f 6e 73 0a 09 74 68 61 74 20 3c 73 options..that <s
0da0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 trong>tls::socke
0db0: 74 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63 65 70 t</strong> accep
0dc0: 74 73 20 63 61 6e 20 62 65 20 73 65 74 0a 09 75 ts can be set..u
0dd0: 73 69 6e 67 20 74 68 69 73 20 63 6f 6d 6d 61 6e sing this comman
0de0: 64 2c 20 74 68 6f 75 67 68 20 79 6f 75 20 73 68 d, though you sh
0df0: 6f 75 6c 64 20 6c 69 6d 69 74 20 79 6f 75 72 20 ould limit your
0e00: 6f 70 74 69 6f 6e 73 0a 09 74 6f 20 6f 6e 6c 79 options..to only
0e10: 20 54 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e 65 TLS related one
0e20: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e s.</dd>. <dt>
0e30: 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 </dt>.
0e40: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
0e50: 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 ::socket"><b>tls
0e60: 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d ::socket </b><em
0e70: 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 09 68 6f 73 74 >?options?..host
0e80: 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f port</em></a></
0e90: 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 62 3e 74 dt>. <dt><b>t
0ea0: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 ls::socket</b><e
0eb0: 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d m> ?-server comm
0ec0: 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 and? ?options? p
0ed0: 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ort</em></dt>.
0ee0: 20 20 3c 64 64 3e 54 68 69 73 20 69 73 20 61 20 <dd>This is a
0ef0: 68 65 6c 70 65 72 20 66 75 6e 63 74 69 6f 6e 20 helper function
0f00: 74 68 61 74 20 75 74 69 6c 69 7a 65 73 20 74 68 that utilizes th
0f10: 65 20 75 6e 64 65 72 6c 79 69 6e 67 0a 09 63 6f e underlying..co
0f20: 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 3e mmands (<strong>
0f30: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 tls::import</str
0f40: 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76 65 ong>). It behave
0f50: 73 0a 09 65 78 61 63 74 6c 79 20 74 68 65 20 73 s..exactly the s
0f60: 61 6d 65 20 61 73 20 74 68 65 20 6e 61 74 69 76 ame as the nativ
0f70: 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f e Tcl <strong>so
0f80: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 63 cket</strong>..c
0f90: 6f 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 ommand except th
0fa0: 61 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 at the options c
0fb0: 61 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f an include any o
0fc0: 66 20 74 68 65 0a 09 61 70 70 6c 69 63 61 62 6c f the..applicabl
0fd0: 65 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a e <a href="#tls:
0fe0: 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72 6f 6e 67 :import"><strong
0ff0: 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 >tls:import</str
1000: 6f 6e 67 3e 3c 2f 61 3e 0a 09 6f 70 74 69 6f 6e ong></a>..option
1010: 73 20 77 69 74 68 20 6f 6e 65 20 61 64 64 69 74 s with one addit
1020: 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 3a 0a 3c 62 ional option:.<b
1030: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c lockquote>. <
1040: 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dl>..<dt><strong
1050: 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 >-autoservername
1060: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
1070: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ol</em></dt>..<d
1080: 64 3e 41 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 d>Automatically
1090: 73 65 6e 64 20 74 68 65 20 2d 73 65 72 76 65 72 send the -server
10a0: 6e 61 6d 65 20 61 73 20 74 68 65 20 3c 65 6d 3e name as the <em>
10b0: 68 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 host</em> argume
10c0: 6e 74 0a 09 20 20 20 20 28 64 65 66 61 75 6c 74 nt.. (default
10d0: 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 is <em>false</e
10e0: 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 m>)</dd>. </d
10f0: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e l>.</blockquote>
1100: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d .. <dt><a nam
1110: 65 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e e="tls::import">
1120: 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c <b>tls::import <
1130: 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a 09 3f /b><i>channel..?
1140: 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e options?</i></a>
1150: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 53 53 </dt>. <dd>SS
1160: 4c 2d 65 6e 61 62 6c 65 20 61 20 72 65 67 75 6c L-enable a regul
1170: 61 72 20 54 63 6c 20 63 68 61 6e 6e 65 6c 20 2d ar Tcl channel -
1180: 20 69 74 20 6e 65 65 64 20 6e 6f 74 20 62 65 20 it need not be
1190: 61 0a 09 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d a..socket, but m
11a0: 75 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64 ust provide bi-d
11b0: 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e irectional flow.
11c0: 20 41 6c 73 6f 0a 09 73 65 74 74 69 6e 67 20 73 Also..setting s
11d0: 65 73 73 69 6f 6e 20 70 61 72 61 6d 65 74 65 72 ession parameter
11e0: 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 68 s for SSL handsh
11f0: 61 6b 65 2e 3c 2f 64 64 3e 0a 0a 3c 62 6c 6f 63 ake.</dd>..<bloc
1200: 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e kquote>. <dl>
1210: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 ..<dt><strong>-a
1220: 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d lpn</strong> <em
1230: 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >list</em></dt>.
1240: 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 70 72 6f .<dd>List of pro
1250: 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20 tocols to offer
1260: 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 69 during Applicati
1270: 6f 6e 2d 4c 61 79 65 72 0a 09 20 20 20 20 50 72 on-Layer.. Pr
1280: 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 otocol Negotiati
1290: 6f 6e 20 28 41 4c 50 4e 29 2e 20 46 6f 72 20 65 on (ALPN). For e
12a0: 78 61 6d 70 6c 65 3a 20 68 32 2c 20 68 74 74 70 xample: h2, http
12b0: 2f 31 2e 31 2c 20 65 74 63 2e 3c 2f 64 64 3e 0a /1.1, etc.</dd>.
12c0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 .<dt><strong>-ca
12d0: 64 69 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d dir</strong> <em
12e0: 3e 64 69 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 >dir</em></dt>..
12f0: 3c 64 64 3e 53 65 74 20 74 68 65 20 43 41 20 63 <dd>Set the CA c
1300: 65 72 74 69 66 69 63 61 74 65 73 20 70 61 74 68 ertificates path
1310: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 64 69 . The default di
1320: 72 65 63 74 6f 72 79 20 69 73 20 70 6c 61 74 66 rectory is platf
1330: 6f 72 6d 0a 09 20 20 20 20 73 70 65 63 69 66 69 orm.. specifi
1340: 63 20 61 6e 64 20 63 61 6e 20 62 65 20 73 65 74 c and can be set
1350: 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 at compile time
1360: 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 6f 76 . This can be ov
1370: 65 72 72 69 64 64 65 6e 0a 09 20 20 20 20 76 69 erridden.. vi
1380: 61 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 a the <b>SSL_CER
1390: 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 72 6f T_DIR</b> enviro
13a0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c nment variable.<
13b0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
13c0: 67 3e 2d 63 61 66 69 6c 65 20 3c 2f 73 74 72 6f g>-cafile </stro
13d0: 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c ng><em>filename<
13e0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 /em></dt>..<dd>S
13f0: 65 74 20 74 68 65 20 63 65 72 74 69 66 69 63 61 et the certifica
1400: 74 65 20 61 75 74 68 6f 72 69 74 79 20 28 43 41 te authority (CA
1410: 29 20 63 65 72 74 69 66 69 63 61 74 65 73 20 66 ) certificates f
1420: 69 6c 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74 ile. The default
1430: 0a 09 20 20 20 20 69 73 20 74 68 65 20 63 65 72 .. is the cer
1440: 74 2e 70 65 6d 20 66 69 6c 65 20 69 6e 20 74 68 t.pem file in th
1450: 65 20 4f 70 73 6e 53 53 4c 20 64 69 72 65 63 74 e OpsnSSL direct
1460: 6f 72 79 2e 20 54 68 69 73 20 63 61 6e 20 61 6c ory. This can al
1470: 73 6f 20 62 65 0a 09 20 20 20 20 6f 76 65 72 72 so be.. overr
1480: 69 64 64 65 6e 20 76 69 61 20 74 68 65 20 3c 62 idden via the <b
1490: 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c 45 3c 2f >SSL_CERT_FILE</
14a0: 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 b> environment v
14b0: 61 72 69 61 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c ariable.</dd>..<
14c0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74 dt><strong>-cert
14d0: 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 file</strong> <e
14e0: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c m>filename</em><
14f0: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 /dt>..<dd>Specif
1500: 79 20 74 68 65 20 66 69 6c 65 6e 61 6d 65 20 77 y the filename w
1510: 69 74 68 20 74 68 65 20 63 65 72 74 69 66 69 63 ith the certific
1520: 61 74 65 20 74 6f 20 75 73 65 2e 3c 2f 64 64 3e ate to use.</dd>
1530: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 ..<dt><strong>-c
1540: 65 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ert</strong> <em
1550: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f >filename</em></
1560: 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 dt>..<dd>Specify
1570: 20 74 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66 the contents of
1580: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 74 a certificate t
1590: 6f 20 75 73 65 2c 20 61 73 20 61 20 44 45 52 0a o use, as a DER.
15a0: 09 20 20 20 20 65 6e 63 6f 64 65 64 20 62 69 6e . encoded bin
15b0: 61 72 79 20 76 61 6c 75 65 20 28 58 2e 35 30 39 ary value (X.509
15c0: 20 44 45 52 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 DER).</dd>..<dt
15d0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 ><strong>-cipher
15e0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 </strong> <em>st
15f0: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 ring</em></dt>..
1600: 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 69 70 68 <dd>List of ciph
1610: 65 72 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69 ers to use. Stri
1620: 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 ng is a colon ("
1630: 3a 22 29 20 73 65 70 61 72 61 74 65 64 20 6c 69 :") separated li
1640: 73 74 0a 09 20 20 20 20 6f 66 20 63 69 70 68 65 st.. of ciphe
1650: 72 73 20 6f 72 20 63 69 70 68 65 72 20 73 75 69 rs or cipher sui
1660: 74 65 73 2e 20 43 69 70 68 65 72 20 73 75 69 74 tes. Cipher suit
1670: 65 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e es can be combin
1680: 65 64 0a 09 20 20 20 20 75 73 69 6e 67 20 74 68 ed.. using th
1690: 65 20 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72 61 e <b>+</b> chara
16a0: 63 74 65 72 2e 20 50 72 65 66 69 78 65 73 20 63 cter. Prefixes c
16b0: 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70 65 an be used to pe
16c0: 72 6d 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20 72 rmanently.. r
16d0: 65 6d 6f 76 65 20 28 22 21 22 29 2c 20 64 65 6c emove ("!"), del
16e0: 65 74 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d 6f ete ("-"), or mo
16f0: 76 65 20 61 20 63 79 70 68 65 72 20 74 6f 20 74 ve a cypher to t
1700: 68 65 20 65 6e 64 20 6f 66 0a 09 20 20 20 20 74 he end of.. t
1710: 68 65 20 6c 69 73 74 20 28 22 2b 22 29 2e 20 4b he list ("+"). K
1720: 65 79 77 6f 72 64 73 20 3c 62 3e 40 53 54 52 45 eywords <b>@STRE
1730: 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62 NGTH</b> (sort b
1740: 79 20 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20 20 y algorithm..
1750: 20 6b 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c 62 key length), <b
1760: 3e 40 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e 3c >@SECLEVEL=</b><
1770: 69 3e 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65 63 i>n</i> (set sec
1780: 75 72 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a 09 urity level to..
1790: 20 20 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e 44 n), and <b>D
17a0: 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20 EFAULT</b> (use
17b0: 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c default cipher l
17c0: 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e ist, at start on
17d0: 6c 79 29 0a 09 20 20 20 20 63 61 6e 20 61 6c 73 ly).. can als
17e0: 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 2e 20 o be specified.
17f0: 53 65 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63 75 See OpenSSL docu
1800: 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 mentation for th
1810: 65 20 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73 74 e full.. list
1820: 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 65 73 of valid values
1830: 2e 20 28 54 4c 53 20 31 2e 32 20 61 6e 64 20 65 . (TLS 1.2 and e
1840: 61 72 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64 64 arlier only)</dd
1850: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1860: 63 69 70 68 65 72 73 75 69 74 65 73 3c 2f 73 74 ciphersuites</st
1870: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 rong> <em>string
1880: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
1890: 4c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 List of cipher s
18a0: 75 69 74 65 73 20 74 6f 20 75 73 65 2e 20 53 74 uites to use. St
18b0: 72 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 ring is a colon
18c0: 28 22 3a 22 29 0a 09 20 20 20 20 73 65 70 61 72 (":").. separ
18d0: 61 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 ated list of cip
18e0: 68 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73 2e her suite names.
18f0: 20 28 54 4c 53 20 31 2e 33 20 6f 6e 6c 79 29 3c (TLS 1.3 only)<
1900: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1910: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f g>-command</stro
1920: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ng> <em>callback
1930: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
1940: 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f Callback to invo
1950: 6b 65 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f ke at several po
1960: 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 20 ints during the
1970: 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 handshake...
1980: 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f 20 This is used to
1990: 70 61 73 73 20 65 72 72 6f 72 73 20 61 6e 64 20 pass errors and
19a0: 74 72 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 tracing informat
19b0: 69 6f 6e 2c 20 61 6e 64 0a 09 20 20 20 20 69 74 ion, and.. it
19c0: 20 63 61 6e 20 61 6c 6c 6f 77 20 54 63 6c 20 73 can allow Tcl s
19d0: 63 72 69 70 74 73 20 74 6f 20 70 65 72 66 6f 72 cripts to perfor
19e0: 6d 20 74 68 65 69 72 20 6f 77 6e 20 63 65 72 74 m their own cert
19f0: 69 66 69 63 61 74 65 0a 09 20 20 20 20 76 61 6c ificate.. val
1a00: 69 64 61 74 69 6f 6e 20 69 6e 20 70 6c 61 63 65 idation in place
1a10: 20 6f 66 20 74 68 65 20 64 65 66 61 75 6c 74 20 of the default
1a20: 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 validation provi
1a30: 64 65 64 20 62 79 0a 09 20 20 20 20 4f 70 65 6e ded by.. Open
1a40: 53 53 4c 2e 20 53 65 65 20 3c 61 20 68 72 65 66 SSL. See <a href
1a50: 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 ="#CALLBACK OPTI
1a60: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 ONS">CALLBACK OP
1a70: 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66 TIONS</a>.. f
1a80: 6f 72 20 66 75 72 74 68 65 72 20 64 69 73 63 75 or further discu
1a90: 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 ssion.</dd>..<dt
1aa0: 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68 70 61 72 61 ><strong>-dhpara
1ab0: 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e ms </strong><em>
1ac0: 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 filename</em></d
1ad0: 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 20 t>..<dd>Specify
1ae0: 74 68 65 20 44 69 66 66 69 65 2d 48 65 6c 6c 6d the Diffie-Hellm
1af0: 61 6e 20 70 61 72 61 6d 65 74 65 72 73 20 66 69 an parameters fi
1b00: 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 le.</dd>..<dt><s
1b10: 74 72 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f trong>-keyfile</
1b20: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 strong> <em>file
1b30: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 name</em></dt>..
1b40: 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 <dd>Specify the
1b50: 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65 private key file
1b60: 2e 20 28 64 65 66 61 75 6c 74 20 69 73 0a 09 20 . (default is..
1b70: 20 20 20 76 61 6c 75 65 20 6f 66 20 2d 63 65 72 value of -cer
1b80: 74 66 69 6c 65 29 3c 2f 64 64 3e 0a 09 3c 64 74 tfile)</dd>..<dt
1b90: 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 3c 2f 73 ><strong>-key</s
1ba0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e trong> <em>filen
1bb0: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ame</em></dt>..<
1bc0: 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 70 dd>Specify the p
1bd0: 72 69 76 61 74 65 20 6b 65 79 20 74 6f 20 75 73 rivate key to us
1be0: 65 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 e as a DER encod
1bf0: 65 64 20 76 61 6c 75 65 20 28 50 4b 43 53 23 31 ed value (PKCS#1
1c00: 20 44 45 52 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e DER)</dd>..<dt>
1c10: 3c 73 74 72 6f 6e 67 3e 2d 6d 6f 64 65 6c 3c 2f <strong>-model</
1c20: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e strong> <em>chan
1c30: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c nel</em></dt>..<
1c40: 64 64 3e 46 6f 72 63 65 20 74 68 69 73 20 63 68 dd>Force this ch
1c50: 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 20 74 annel to share t
1c60: 68 65 20 73 61 6d 65 20 3c 65 6d 3e 3c 73 74 72 he same <em><str
1c70: 6f 6e 67 3e 53 53 4c 5f 43 54 58 3c 2f 73 74 72 ong>SSL_CTX</str
1c80: 6f 6e 67 3e 3c 2f 65 6d 3e 0a 09 20 20 20 20 73 ong></em>.. s
1c90: 74 72 75 63 74 75 72 65 20 61 73 20 74 68 65 20 tructure as the
1ca0: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 68 specified <em>ch
1cb0: 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 6e 64 0a annel</em>, and.
1cc0: 09 20 20 20 20 74 68 65 72 65 66 6f 72 65 20 73 . therefore s
1cd0: 68 61 72 65 20 63 61 6c 6c 62 61 63 6b 73 20 65 hare callbacks e
1ce0: 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 tc.</dd>..<dt><s
1cf0: 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c trong>-password<
1d00: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c /strong> <em>cal
1d10: 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a lback</em></dt>.
1d20: 09 3c 64 64 3e 43 61 6c 6c 62 61 63 6b 20 74 6f .<dd>Callback to
1d30: 20 69 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65 invoke when Ope
1d40: 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f 62 nSSL needs to ob
1d50: 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2c tain a password,
1d60: 0a 09 20 20 20 20 74 79 70 69 63 61 6c 6c 79 20 .. typically
1d70: 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 to unlock the pr
1d80: 69 76 61 74 65 20 6b 65 79 20 6f 66 20 61 20 63 ivate key of a c
1d90: 65 72 74 69 66 69 63 61 74 65 2e 20 54 68 65 0a ertificate. The.
1da0: 09 20 20 20 20 63 61 6c 6c 62 61 63 6b 20 73 68 . callback sh
1db0: 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73 74 ould return a st
1dc0: 72 69 6e 67 20 77 68 69 63 68 20 72 65 70 72 65 ring which repre
1dd0: 73 65 6e 74 73 20 74 68 65 20 70 61 73 73 77 6f sents the passwo
1de0: 72 64 0a 09 20 20 20 20 74 6f 20 62 65 20 75 73 rd.. to be us
1df0: 65 64 2e 20 53 65 65 20 3c 61 20 68 72 65 66 3d ed. See <a href=
1e00: 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f "#CALLBACK OPTIO
1e10: 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 NS">CALLBACK OPT
1e20: 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f IONS</a>.. fo
1e30: 72 20 66 75 72 74 68 65 72 20 64 69 73 63 75 73 r further discus
1e40: 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e sion.</dd>..<dt>
1e50: 3c 73 74 72 6f 6e 67 3e 2d 70 6f 73 74 5f 68 61 <strong>-post_ha
1e60: 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f 6e 67 3e ndshake</strong>
1e70: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f <em>bool</em></
1e80: 64 74 3e 0a 09 3c 64 64 3e 41 6c 6c 6f 77 20 70 dt>..<dd>Allow p
1e90: 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 20 74 69 ost-handshake ti
1ea0: 63 6b 65 74 20 75 70 64 61 74 65 73 2e 3c 2f 64 cket updates.</d
1eb0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
1ec0: 2d 72 65 71 75 65 73 74 20 3c 2f 73 74 72 6f 6e -request </stron
1ed0: 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c g><em>bool</em><
1ee0: 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75 65 73 /dt>..<dd>Reques
1ef0: 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 t a certificate
1f00: 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67 from peer during
1f10: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a SSL handshake..
1f20: 09 20 20 20 20 28 64 65 66 61 75 6c 74 20 69 73 . (default is
1f30: 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c <em>true</em>)<
1f40: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1f50: 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74 72 6f g>-require</stro
1f60: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
1f70: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75 ></dt>..<dd>Requ
1f80: 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74 ire a valid cert
1f90: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65 ificate from pee
1fa0: 72 20 64 75 72 69 6e 67 20 53 53 4c 20 68 61 6e r during SSL han
1fb0: 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 49 66 20 dshake... If
1fc0: 74 68 69 73 20 69 73 20 73 65 74 20 74 6f 20 74 this is set to t
1fd0: 72 75 65 2c 20 74 68 65 6e 20 3c 73 74 72 6f 6e rue, then <stron
1fe0: 67 3e 2d 72 65 71 75 65 73 74 3c 2f 73 74 72 6f g>-request</stro
1ff0: 6e 67 3e 20 6d 75 73 74 0a 09 20 20 20 20 61 6c ng> must.. al
2000: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75 so be set to tru
2010: 65 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c e. (default is <
2020: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f em>false</em>)</
2030: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
2040: 3e 2d 73 65 63 75 72 69 74 79 6c 65 76 65 6c 3c >-securitylevel<
2050: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69 6e 74 /strong> <em>int
2060: 65 67 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 eger</em></dt>..
2070: 3c 64 64 3e 53 65 74 20 73 65 63 75 72 69 74 79 <dd>Set security
2080: 20 6c 65 76 65 6c 2e 20 4d 75 73 74 20 62 65 20 level. Must be
2090: 30 20 74 6f 20 35 2e 20 54 68 65 20 73 65 63 75 0 to 5. The secu
20a0: 72 69 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63 rity level affec
20b0: 74 73 0a 09 20 20 20 20 63 69 70 68 65 72 20 73 ts.. cipher s
20c0: 75 69 74 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 uite encryption
20d0: 61 6c 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 70 algorithms, supp
20e0: 6f 72 74 65 64 20 45 43 43 20 63 75 72 76 65 73 orted ECC curves
20f0: 2c 0a 09 20 20 20 20 73 75 70 70 6f 72 74 65 64 ,.. supported
2100: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 signature algor
2110: 69 74 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65 ithms, DH parame
2120: 74 65 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69 ter sizes, certi
2130: 66 69 63 61 74 65 0a 09 20 20 20 20 6b 65 79 20 ficate.. key
2140: 73 69 7a 65 73 20 61 6e 64 20 73 69 67 6e 61 74 sizes and signat
2150: 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2e 20 ure algorithms.
2160: 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20 31 The default is 1
2170: 2e 0a 09 20 20 20 20 4c 65 76 65 6c 20 33 20 61 ... Level 3 a
2180: 6e 64 20 68 69 67 68 65 72 20 64 69 73 61 62 6c nd higher disabl
2190: 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65 e support for se
21a0: 73 73 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e ssion tickets an
21b0: 64 20 6f 6e 6c 79 0a 09 20 20 20 20 61 63 63 65 d only.. acce
21c0: 70 74 20 63 69 70 68 65 72 20 73 75 69 74 65 73 pt cipher suites
21d0: 20 74 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f that provide fo
21e0: 72 77 61 72 64 20 73 65 63 72 65 63 79 2e 3c 2f rward secrecy.</
21f0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
2200: 3e 2d 73 65 72 76 65 72 3c 2f 73 74 72 6f 6e 67 >-server</strong
2210: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c > <em>bool</em><
2220: 2f 64 74 3e 0a 09 3c 64 64 3e 48 61 6e 64 73 68 /dt>..<dd>Handsh
2230: 61 6b 65 20 61 73 20 73 65 72 76 65 72 20 69 66 ake as server if
2240: 20 74 72 75 65 2c 20 65 6c 73 65 20 68 61 6e 64 true, else hand
2250: 73 68 61 6b 65 20 61 73 0a 09 20 20 20 20 63 6c shake as.. cl
2260: 69 65 6e 74 2e 20 28 64 65 66 61 75 6c 74 20 69 ient. (default i
2270: 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e s <em>false</em>
2280: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 )</dd>..<dt><str
2290: 6f 6e 67 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c ong>-servername<
22a0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 6f 73 /strong> <em>hos
22b0: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 t</em></dt>..<dd
22c0: 3e 53 70 65 63 69 66 79 20 73 65 72 76 65 72 20 >Specify server
22d0: 68 6f 73 74 6e 61 6d 65 2e 20 4f 6e 6c 79 20 61 hostname. Only a
22e0: 76 61 69 6c 61 62 6c 65 20 69 66 20 74 68 65 20 vailable if the
22f0: 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 0a OpenSSL library.
2300: 09 20 20 20 20 74 68 65 20 70 61 63 6b 61 67 65 . the package
2310: 20 69 73 20 6c 69 6e 6b 65 64 20 61 67 61 69 6e is linked again
2320: 73 74 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 st supports the
2330: 54 4c 53 20 68 6f 73 74 6e 61 6d 65 20 65 78 74 TLS hostname ext
2340: 65 6e 73 69 6f 6e 0a 09 20 20 20 20 66 6f 72 20 ension.. for
2350: 27 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 'Server Name Ind
2360: 69 63 61 74 69 6f 6e 27 20 28 53 4e 49 29 2e 20 ication' (SNI).
2370: 55 73 65 20 74 6f 20 6e 61 6d 65 20 74 68 65 20 Use to name the
2380: 6c 6f 67 69 63 61 6c 20 68 6f 73 74 0a 09 20 20 logical host..
2390: 20 20 77 65 20 61 72 65 20 74 61 6c 6b 69 6e 67 we are talking
23a0: 20 74 6f 20 61 6e 64 20 65 78 70 65 63 74 69 6e to and expectin
23b0: 67 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 g a certificate
23c0: 66 6f 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c for.</dd>..<dt><
23d0: 73 74 72 6f 6e 67 3e 2d 73 65 73 73 69 6f 6e 5f strong>-session_
23e0: 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e id</strong> <em>
23f0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e string</em></dt>
2400: 0a 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 69 64 ..<dd>Session id
2410: 20 74 6f 20 72 65 73 75 6d 65 20 73 65 73 73 69 to resume sessi
2420: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 on.</dd>..<dt><s
2430: 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f 73 74 72 trong>-ssl2</str
2440: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 ong> <em>bool</e
2450: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 m></dt>..<dd>Ena
2460: 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76 ble use of SSL v
2470: 32 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 2. (default is <
2480: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f em>false</em>)</
2490: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
24a0: 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e >-ssl3 </strong>
24b0: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 <em>bool</em></d
24c0: 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 t>..<dd>Enable u
24d0: 73 65 20 6f 66 20 53 53 4c 20 76 33 2e 20 28 64 se of SSL v3. (d
24e0: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 efault is <em>fa
24f0: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 lse</em>)</dd>..
2500: 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 <dt>-<strong>tls
2510: 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 1</strong> <em>b
2520: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ool</em></dt>..<
2530: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 dd>Enable use of
2540: 20 54 4c 53 20 76 31 2e 20 28 64 65 66 61 75 6c TLS v1. (defaul
2550: 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 t is <em>true</e
2560: 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c m>)</dd>..<dt>-<
2570: 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73 strong>tls1.1</s
2580: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
2590: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 /em></dt>..<dd>E
25a0: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 nable use of TLS
25b0: 20 76 31 2e 31 20 28 64 65 66 61 75 6c 74 20 69 v1.1 (default i
25c0: 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 s <em>true</em>)
25d0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 </dd>..<dt>-<str
25e0: 6f 6e 67 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f ong>tls1.2</stro
25f0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
2600: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 ></dt>..<dd>Enab
2610: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
2620: 2e 32 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c .2 (default is <
2630: 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 em>true</em>)</d
2640: 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 d>..<dt>-<strong
2650: 3e 74 6c 73 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e >tls1.3</strong>
2660: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f <em>bool</em></
2670: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 dt>..<dd>Enable
2680: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 20 use of TLS v1.3
2690: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
26a0: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a true</em>)</dd>.
26b0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 .<dt><strong>-va
26c0: 6c 69 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 lidatecommand</s
26d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 trong> <em>callb
26e0: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ack</em></dt>..<
26f0: 64 64 3e 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69 dd>Callback to i
2700: 6e 76 6f 6b 65 20 74 6f 20 76 65 72 69 66 79 20 nvoke to verify
2710: 6f 72 20 76 61 6c 69 64 61 74 65 20 70 72 6f 74 or validate prot
2720: 6f 63 6f 6c 20 63 6f 6e 66 69 67 0a 09 20 20 20 ocol config..
2730: 20 70 61 72 61 6d 65 74 65 72 73 20 64 75 72 69 parameters duri
2740: 6e 67 20 74 68 65 20 70 72 6f 74 6f 63 6f 6c 20 ng the protocol
2750: 6e 65 67 6f 74 69 61 74 69 6f 6e 20 70 68 61 73 negotiation phas
2760: 65 2e 20 53 65 65 0a 09 20 20 20 20 3c 61 20 68 e. See.. <a h
2770: 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f ref="#CALLBACK O
2780: 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b PTIONS">CALLBACK
2790: 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 OPTIONS</a>..
27a0: 20 20 66 6f 72 20 66 75 72 74 68 65 72 20 64 69 for further di
27b0: 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 scussion.</dd>.
27c0: 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b </dl>.</block
27d0: 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e quote>.. <dt>
27e0: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 75 6e <a name="tls::un
27f0: 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a import"><b>tls::
2800: 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69 3e unimport </b><i>
2810: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c channel</i></a><
2820: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 50 72 6f /dt>. <dd>Pro
2830: 76 69 64 65 64 20 66 6f 72 20 73 79 6d 6d 65 74 vided for symmet
2840: 72 79 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 74 6c ry to <strong>tl
2850: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e s::import</stron
2860: 67 3e 2c 20 74 68 69 73 0a 20 20 20 20 20 20 75 g>, this. u
2870: 6e 73 74 61 63 6b 73 20 74 68 65 20 53 53 4c 2d nstacks the SSL-
2880: 65 6e 61 62 6c 69 6e 67 20 6f 66 20 61 20 72 65 enabling of a re
2890: 67 75 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e 65 gular Tcl channe
28a0: 6c 2e 20 20 41 6e 20 65 72 72 6f 72 0a 20 20 20 l. An error.
28b0: 20 20 20 69 73 20 74 68 72 6f 77 6e 20 69 66 20 is thrown if
28c0: 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 74 TLS is not the t
28d0: 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e 6e op stacked chann
28e0: 65 6c 20 74 79 70 65 2e 3c 2f 64 64 3e 0a 20 20 el type.</dd>.
28f0: 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 <dt> </dt
2900: 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d >. <dt><a nam
2910: 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b e="tls::handshak
2920: 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a e"><strong>tls::
2930: 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f 6e handshake</stron
2940: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f g> <em>channel</
2950: 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 em></a></dt>.
2960: 20 3c 64 64 3e 46 6f 72 63 65 73 20 68 61 6e 64 <dd>Forces hand
2970: 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 6c shake to take pl
2980: 61 63 65 2c 20 61 6e 64 20 72 65 74 75 72 6e 73 ace, and returns
2990: 20 30 20 69 66 0a 09 68 61 6e 64 73 68 61 6b 65 0 if..handshake
29a0: 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f is still in pro
29b0: 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b gress (non-block
29c0: 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 0a 09 74 ing), or 1 if..t
29d0: 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73 he handshake was
29e0: 20 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66 20 successful. If
29f0: 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 61 the handshake fa
2a00: 69 6c 65 64 0a 09 74 68 69 73 20 72 6f 75 74 69 iled..this routi
2a10: 6e 65 20 77 69 6c 6c 20 74 68 72 6f 77 20 61 6e ne will throw an
2a20: 20 65 72 72 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20 error.</dd>.
2a30: 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e <dt> </dt>
2a40: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
2a50: 3d 22 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c ="tls::status"><
2a60: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 strong>tls::stat
2a70: 75 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 us</strong>.
2a80: 3c 65 6d 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 <em>?-local? cha
2a90: 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 nnel</em></a></d
2aa0: 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 t>. <dd>Retur
2ab0: 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 ns the current s
2ac0: 74 61 74 75 73 20 6f 66 20 74 68 65 20 63 65 72 tatus of the cer
2ad0: 74 69 66 69 63 61 74 65 20 66 6f 72 20 61 6e 20 tificate for an
2ae0: 53 53 4c 0a 09 63 68 61 6e 6e 65 6c 2e 20 54 68 SSL..channel. Th
2af0: 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 e result is a li
2b00: 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 st of key-value
2b10: 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 pairs describing
2b20: 0a 09 74 68 65 20 63 65 72 74 69 66 69 63 61 74 ..the certificat
2b30: 65 2e 20 49 66 20 74 68 65 20 72 65 73 75 6c 74 e. If the result
2b40: 20 69 73 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 is an empty lis
2b50: 74 20 74 68 65 6e 20 74 68 65 0a 09 53 53 4c 20 t then the..SSL
2b60: 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20 6e 6f handshake has no
2b70: 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 64 2e t yet completed.
2b80: 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f If <em>-local</
2b90: 65 6d 3e 20 69 73 0a 09 73 70 65 63 69 66 69 65 em> is..specifie
2ba0: 64 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f 63 61 d, then the loca
2bb0: 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 l certificate is
2bc0: 20 75 73 65 64 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f used.</dd>.<blo
2bd0: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c ckquote>..<b>SSL
2be0: 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 Status</b>.
2bf0: 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e <dl>..<dt><stron
2c00: 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 g>alpn</strong>
2c10: 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d <em>protocol</em
2c20: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
2c30: 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 protocol selecte
2c40: 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 d after Applicat
2c50: 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 ion-Layer Protoc
2c60: 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 74 ol.. Negotiat
2c70: 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e ion (ALPN).</dd>
2c80: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 ..<dt><strong>ci
2c90: 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 pher</strong> <e
2ca0: 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 m>cipher</em></d
2cb0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 75 72 72 t>..<dd>The curr
2cc0: 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 ent cipher in us
2cd0: 65 20 62 65 74 77 65 65 6e 20 74 68 65 20 63 6c e between the cl
2ce0: 69 65 6e 74 20 61 6e 64 0a 09 20 20 20 20 73 65 ient and.. se
2cf0: 72 76 65 72 20 63 68 61 6e 6e 65 6c 73 2e 3c 2f rver channels.</
2d00: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
2d10: 3e 70 65 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e >peername</stron
2d20: 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e g> <em>name</em>
2d30: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 </dt>..<dd>The p
2d40: 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 eername from the
2d50: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
2d60: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
2d70: 70 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 protocol</strong
2d80: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 > <em>version</e
2d90: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
2da0: 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f protocol versio
2db0: 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 n used for the c
2dc0: 6f 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 onnection:..
2dd0: 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 SSL2, SSL3, TLS1
2de0: 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 , TLS1.1, TLS1.2
2df0: 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b , TLS1.3, or unk
2e00: 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e nown.</dd>..<dt>
2e10: 3c 73 74 72 6f 6e 67 3e 73 62 69 74 73 3c 2f 73 <strong>sbits</s
2e20: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d trong> <em>n</em
2e30: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
2e40: 6e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 number of bits u
2e50: 73 65 64 20 66 6f 72 20 74 68 65 20 73 65 73 73 sed for the sess
2e60: 69 6f 6e 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c ion key.</dd>..<
2e70: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 dt><strong>signa
2e80: 74 75 72 65 48 61 73 68 41 6c 67 6f 72 69 74 68 tureHashAlgorith
2e90: 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 m</strong> <em>a
2ea0: 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 lgorithm</em></d
2eb0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67 6e t>..<dd>The sign
2ec0: 61 74 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 ature hash algor
2ed0: 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e ithm.</dd>..<dt>
2ee0: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 <strong>signatur
2ef0: 65 5f 74 79 70 65 3c 2f 73 74 72 6f 6e 67 3e 20 e_type</strong>
2f00: 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 3c 2f 64 <em>type</em></d
2f10: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 69 67 6e t>..<dd>The sign
2f20: 61 74 75 72 65 20 74 79 70 65 20 76 61 6c 75 65 ature type value
2f30: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
2f40: 6f 6e 67 3e 76 65 72 69 66 69 63 61 74 69 6f 6e ong>verification
2f50: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 72 65 </strong> <em>re
2f60: 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 sult</em></dt>..
2f70: 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 <dd>Certificate
2f80: 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 verification res
2f90: 75 6c 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ult.</dd>..<dt><
2fa0: 73 74 72 6f 6e 67 3e 63 61 5f 6e 61 6d 65 73 3c strong>ca_names<
2fb0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 /strong> <em>lis
2fc0: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 t</em></dt>..<dd
2fd0: 3e 4c 69 73 74 20 6f 66 20 74 68 65 20 43 65 72 >List of the Cer
2fe0: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 tificate Authori
2ff0: 74 69 65 73 20 75 73 65 64 20 74 6f 20 63 72 65 ties used to cre
3000: 61 74 65 20 74 68 65 20 63 65 72 74 69 66 69 63 ate the certific
3010: 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f ate.</dd>. </
3020: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 dl>.</blockquote
3030: 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 >.<blockquote>..
3040: 3c 62 3e 43 65 72 74 69 66 69 63 61 74 65 20 53 <b>Certificate S
3050: 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 tatus</b>. <d
3060: 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e l>..<dt><strong>
3070: 61 6c 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d all</strong> <em
3080: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 >string</em></dt
3090: 3e 0a 09 3c 64 64 3e 44 75 6d 70 20 6f 66 20 61 >..<dd>Dump of a
30a0: 6c 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 ll certificate i
30b0: 6e 66 6f 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e nfo.</dd>...<dt>
30c0: 3c 73 74 72 6f 6e 67 3e 76 65 72 73 69 6f 6e 3c <strong>version<
30d0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 61 6c /strong> <em>val
30e0: 75 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ue</em></dt>..<d
30f0: 64 3e 54 68 65 20 63 65 72 74 69 66 69 63 61 74 d>The certificat
3100: 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 64 64 3e 0a e version.</dd>.
3110: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 .<dt><strong>ser
3120: 69 61 6c 4e 75 6d 62 65 72 3c 2f 73 74 72 6f 6e ialNumber</stron
3130: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 g> <em>n</em></d
3140: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 65 72 69 t>..<dd>The seri
3150: 61 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 al number of the
3160: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 certificate as
3170: 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e hex string.</dd>
3180: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 ..<dt><strong>si
3190: 67 6e 61 74 75 72 65 3c 2f 73 74 72 6f 6e 67 3e gnature</strong>
31a0: 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f <em>algorithm</
31b0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 em></dt>..<dd>Ci
31c0: 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 pher algorithm u
31d0: 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 sed for certific
31e0: 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f ate signature.</
31f0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3200: 3e 69 73 73 75 65 72 3c 2f 73 74 72 6f 6e 67 3e >issuer</strong>
3210: 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 <em>dn</em></dt
3220: 3e 0a 09 3c 64 64 3e 54 68 65 20 64 69 73 74 69 >..<dd>The disti
3230: 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 nguished name (D
3240: 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 N) of the certif
3250: 69 63 61 74 65 20 69 73 73 75 65 72 2e 3c 2f 64 icate issuer.</d
3260: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3270: 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72 6f 6e notBefore</stron
3280: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e g> <em>date</em>
3290: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 62 </dt>..<dd>The b
32a0: 65 67 69 6e 20 64 61 74 65 20 66 6f 72 20 74 68 egin date for th
32b0: 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 e validity of th
32c0: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f e certificate.</
32d0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
32e0: 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72 6f 6e >notAfter</stron
32f0: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e g> <em>date</em>
3300: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 65 </dt>..<dd>The e
3310: 78 70 69 72 61 74 69 6f 6e 20 64 61 74 65 20 66 xpiration date f
3320: 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61 or the certifica
3330: 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 te.</dd>..<dt><s
3340: 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 3c 2f 73 trong>subject</s
3350: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 trong> <em>dn</e
3360: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
3370: 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e distinguished n
3380: 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 ame (DN) of the
3390: 63 65 72 74 69 66 69 63 61 74 65 20 73 75 62 6a certificate subj
33a0: 65 63 74 2e 0a 09 20 20 20 20 46 69 65 6c 64 73 ect... Fields
33b0: 20 69 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d 6f 6e include: Common
33c0: 20 4e 61 6d 65 20 28 43 4e 29 2c 20 4f 72 67 61 Name (CN), Orga
33d0: 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c 20 4c 6f nization (O), Lo
33e0: 63 61 6c 69 74 79 0a 09 20 20 20 20 6f 72 20 43 cality.. or C
33f0: 69 74 79 20 28 4c 29 2c 20 53 74 61 74 65 20 6f ity (L), State o
3400: 72 20 50 72 6f 76 69 6e 63 65 20 28 53 29 2c 20 r Province (S),
3410: 61 6e 64 20 43 6f 75 6e 74 72 79 20 4e 61 6d 65 and Country Name
3420: 20 28 43 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e (C).</dd>..<dt>
3430: 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 55 6e <strong>issuerUn
3440: 69 71 75 65 49 44 3c 2f 73 74 72 6f 6e 67 3e 20 iqueID</strong>
3450: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c <em>string</em><
3460: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 69 73 /dt>..<dd>The is
3470: 73 75 65 72 20 75 6e 69 71 75 65 20 69 64 2e 3c suer unique id.<
3480: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3490: 67 3e 73 75 62 6a 65 63 74 55 6e 69 71 75 65 49 g>subjectUniqueI
34a0: 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 D</strong> <em>s
34b0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
34c0: 09 3c 64 64 3e 54 68 65 20 73 75 62 6a 65 63 74 .<dd>The subject
34d0: 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 64 64 3e unique id.</dd>
34e0: 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e ...<dt><strong>n
34f0: 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 um_extensions</s
3500: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d trong> <em>n</em
3510: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 6d 62 ></dt>..<dd>Numb
3520: 65 72 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 er of certificat
3530: 65 20 65 78 74 65 6e 73 69 6f 6e 73 2e 3c 2f 64 e extensions.</d
3540: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3550: 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 74 72 6f extensions</stro
3560: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d ng> <em>list</em
3570: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 ></dt>..<dd>List
3580: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 of certificate
3590: 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e extension names.
35a0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
35b0: 6e 67 3e 61 75 74 68 6f 72 69 74 79 4b 65 79 49 ng>authorityKeyI
35c0: 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e dentifier</stron
35d0: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
35e0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 41 4b m></dt>..<dd>(AK
35f0: 49 29 20 4b 65 79 20 69 64 65 6e 74 69 66 69 65 I) Key identifie
3600: 72 20 6f 66 20 74 68 65 20 49 73 73 75 69 6e 67 r of the Issuing
3610: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 20 CA certificate
3620: 74 68 61 74 20 73 69 67 6e 65 64 0a 09 20 20 20 that signed..
3630: 20 74 68 65 20 53 53 4c 20 63 65 72 74 69 66 69 the SSL certifi
3640: 63 61 74 65 20 61 73 20 68 65 78 20 73 74 72 69 cate as hex stri
3650: 6e 67 2e 20 54 68 69 73 20 76 61 6c 75 65 20 6d ng. This value m
3660: 61 74 63 68 65 73 20 74 68 65 20 53 4b 49 0a 09 atches the SKI..
3670: 20 20 20 20 76 61 6c 75 65 20 6f 66 20 74 68 65 value of the
3680: 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20 43 41 Intermediate CA
3690: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
36a0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
36b0: 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e 74 69 subjectKeyIdenti
36c0: 66 69 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 fier</strong> <e
36d0: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 m>string</em></d
36e0: 74 3e 0a 09 3c 64 64 3e 28 53 4b 49 29 20 48 61 t>..<dd>(SKI) Ha
36f0: 73 68 20 6f 66 20 74 68 65 20 70 75 62 6c 69 63 sh of the public
3700: 20 6b 65 79 20 69 6e 73 69 64 65 20 74 68 65 20 key inside the
3710: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 certificate as h
3720: 65 78 0a 09 20 20 20 73 74 72 69 6e 67 2e 20 55 ex.. string. U
3730: 73 65 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20 sed to identify
3740: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 68 61 certificates tha
3750: 74 20 63 6f 6e 74 61 69 6e 20 61 20 70 61 72 74 t contain a part
3760: 69 63 75 6c 61 72 0a 09 20 20 20 70 75 62 6c 69 icular.. publi
3770: 63 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 c key.</dd>..<dt
3780: 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 ><strong>subject
3790: 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e AltName</strong>
37a0: 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f <em>list</em></
37b0: 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 dt>..<dd>List of
37c0: 20 61 6c 6c 20 6f 66 20 74 68 65 20 61 6c 74 65 all of the alte
37d0: 72 6e 61 74 69 76 65 20 64 6f 6d 61 69 6e 20 6e rnative domain n
37e0: 61 6d 65 73 2c 20 73 75 62 20 64 6f 6d 61 69 6e ames, sub domain
37f0: 73 2c 0a 09 20 20 20 20 61 6e 64 20 49 50 20 61 s,.. and IP a
3800: 64 64 72 65 73 73 65 73 20 74 68 61 74 20 61 72 ddresses that ar
3810: 65 20 73 65 63 75 72 65 64 20 62 79 20 74 68 65 e secured by the
3820: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
3830: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3840: 6f 63 73 70 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ocsp</strong> <e
3850: 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e m>list</em></dt>
3860: 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c ..<dd>List of al
3870: 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69 l Online Certifi
3880: 63 61 74 65 20 53 74 61 74 75 73 20 50 72 6f 74 cate Status Prot
3890: 6f 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73 ocol (OCSP) URLs
38a0: 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 .</dd>...<dt><st
38b0: 72 6f 6e 67 3e 63 65 72 74 69 66 69 63 61 74 65 rong>certificate
38c0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 65 </strong> <em>ce
38d0: 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 rt</em></dt>..<d
38e0: 64 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 d>The PEM encode
38f0: 64 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f d certificate.</
3900: 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e dd>...<dt><stron
3910: 67 3e 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72 g>signatureAlgor
3920: 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ithm</strong> <e
3930: 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e m>algorithm</em>
3940: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 70 68 65 </dt>..<dd>Ciphe
3950: 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 r algorithm used
3960: 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 for certificate
3970: 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e signature.</dd>
3980: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 ..<dt><strong>si
3990: 67 6e 61 74 75 72 65 56 61 6c 75 65 3c 2f 73 74 gnatureValue</st
39a0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 rong> <em>string
39b0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
39c0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e Certificate sign
39d0: 61 74 75 72 65 20 61 73 20 68 65 78 20 73 74 72 ature as hex str
39e0: 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ing.</dd>..<dt><
39f0: 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 strong>signature
3a00: 44 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 Digest</strong>
3a10: 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e <em>version</em>
3a20: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 </dt>..<dd>Certi
3a30: 66 69 63 61 74 65 20 73 69 67 6e 69 6e 67 20 64 ficate signing d
3a40: 69 67 65 73 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 igest.</dd>..<dt
3a50: 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 63 4b ><strong>publicK
3a60: 65 79 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 eyAlgorithm</str
3a70: 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 ong> <em>algorit
3a80: 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 hm</em></dt>..<d
3a90: 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 d>Certificate si
3aa0: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b gnature public k
3ab0: 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64 ey algorithm.</d
3ac0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3ad0: 70 75 62 6c 69 63 4b 65 79 3c 2f 73 74 72 6f 6e publicKey</stron
3ae0: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
3af0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 m></dt>..<dd>Cer
3b00: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
3b10: 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 73 re public key as
3b20: 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 hex string.</dd
3b30: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 >..<dt><strong>b
3b40: 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d its</strong> <em
3b50: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 >n</em></dt>..<d
3b60: 64 3e 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 d>Number of bits
3b70: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 used for certif
3b80: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
3b90: 6b 65 79 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 key</dd>..<dt><s
3ba0: 74 72 6f 6e 67 3e 73 65 6c 66 5f 73 69 67 6e 65 trong>self_signe
3bb0: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 d</strong> <em>b
3bc0: 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e oolean</em></dt>
3bd0: 0a 09 3c 64 64 3e 49 73 20 63 65 72 74 69 66 69 ..<dd>Is certifi
3be0: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 73 cate signature s
3bf0: 65 6c 66 20 73 69 67 6e 65 64 2e 3c 2f 64 64 3e elf signed.</dd>
3c00: 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 ...<dt><strong>s
3c10: 68 61 31 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67 ha1_hash</strong
3c20: 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c > <em>hash</em><
3c30: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 48 /dt>..<dd>The SH
3c40: 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 A1 hash of the c
3c50: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 65 ertificate as he
3c60: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 x string.</dd>..
3c70: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 68 61 32 <dt><strong>sha2
3c80: 35 36 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67 3e 56_hash</strong>
3c90: 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c 2f <em>hash</em></
3ca0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 48 41 dt>..<dd>The SHA
3cb0: 32 35 36 20 68 61 73 68 20 6f 66 20 74 68 65 20 256 hash of the
3cc0: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 certificate as h
3cd0: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a ex string.</dd>.
3ce0: 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 </dl>.</bloc
3cf0: 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 kquote>.. <dt
3d00: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63 ><a name="tls::c
3d10: 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 73 74 72 6f onnection"><stro
3d20: 6e 67 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 ng>tls::connecti
3d30: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 on</strong>.
3d40: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e <em>channel</em>
3d50: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
3d60: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 d>Returns the cu
3d70: 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e rrent connection
3d80: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53 status of an SS
3d90: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 0a 09 L channel. The..
3da0: 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 result is a list
3db0: 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 of key-value pa
3dc0: 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74 irs describing t
3dd0: 68 65 0a 09 63 6f 6e 6e 65 63 74 65 64 20 70 65 he..connected pe
3de0: 65 72 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71 er.</dd>.<blockq
3df0: 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c 20 53 74 uote>..<b>SSL St
3e00: 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c atus</b>. <dl
3e10: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
3e20: 74 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 tate</strong> <e
3e30: 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 m>state</em></dt
3e40: 3e 0a 09 3c 64 64 3e 53 74 61 74 65 20 6f 66 20 >..<dd>State of
3e50: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c the connection.<
3e60: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3e70: 67 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 g>servername</st
3e80: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f rong> <em>name</
3e90: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
3ea0: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f e name of the co
3eb0: 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 nnected to serve
3ec0: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 r.</dd>..<dt><st
3ed0: 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 73 rong>protocol</s
3ee0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 trong> <em>versi
3ef0: 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 on</em></dt>..<d
3f00: 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 d>The protocol v
3f10: 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 ersion used for
3f20: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 0a the connection:.
3f30: 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c 33 2c . SSL2, SSL3,
3f40: 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 TLS1, TLS1.1, T
3f50: 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f LS1.2, TLS1.3, o
3f60: 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a r unknown.</dd>.
3f70: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 65 6e .<dt><strong>ren
3f80: 65 67 6f 74 69 61 74 69 6f 6e 3c 2f 73 74 72 6f egotiation</stro
3f90: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c ng> <em>boolean<
3fa0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 /em></dt>..<dd>W
3fb0: 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 hether protocol
3fc0: 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 renegotiation is
3fd0: 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f supported or no
3fe0: 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 t.</dd>..<dt><st
3ff0: 72 6f 6e 67 3e 73 65 63 75 72 69 74 79 6c 65 76 rong>securitylev
4000: 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e el</strong> <em>
4010: 6c 65 76 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a level</em></dt>.
4020: 09 3c 64 64 3e 54 68 65 20 73 65 63 75 72 69 74 .<dd>The securit
4030: 79 20 6c 65 76 65 6c 20 75 73 65 64 20 66 6f 72 y level used for
4040: 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 63 69 selection of ci
4050: 70 68 65 72 73 2c 20 6b 65 79 20 73 69 7a 65 2c phers, key size,
4060: 20 65 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e etc.</dd>..<dt>
4070: 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f <strong>session_
4080: 72 65 75 73 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 reused</strong>
4090: 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e <em>boolean</em>
40a0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 </dt>..<dd>Wheth
40b0: 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 68 er the session h
40c0: 61 73 20 62 65 65 6e 20 72 65 75 73 65 64 20 6f as been reused o
40d0: 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 r not.</dd>..<dt
40e0: 3e 3c 73 74 72 6f 6e 67 3e 69 73 5f 73 65 72 76 ><strong>is_serv
40f0: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e er</strong> <em>
4100: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 boolean</em></dt
4110: 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20 74 >..<dd>Whether t
4120: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 he connection is
4130: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61 configured as a
4140: 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 20 63 server (1) or c
4150: 6c 69 65 6e 74 20 28 30 29 2e 3c 2f 64 64 3e 0a lient (0).</dd>.
4160: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 6f 6d .<dt><strong>com
4170: 70 72 65 73 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 pression</strong
4180: 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c > <em>mode</em><
4190: 2f 64 74 3e 0a 09 3c 64 64 3e 43 6f 6d 70 72 65 /dt>..<dd>Compre
41a0: 73 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 ssion method.</d
41b0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
41c0: 65 78 70 61 6e 73 69 6f 6e 3c 2f 73 74 72 6f 6e expansion</stron
41d0: 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e g> <em>mode</em>
41e0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 78 70 61 6e </dt>..<dd>Expan
41f0: 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 sion method.</dd
4200: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c >. </dl>.</bl
4210: 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b ockquote>.<block
4220: 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 69 70 68 65 quote>..<b>Ciphe
4230: 72 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c r Info</b>. <
4240: 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dl>..<dt><strong
4250: 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e >cipher</strong>
4260: 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e <em>cipher</em>
4270: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 </dt>..<dd>The c
4280: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e urrent cipher in
4290: 20 75 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e use for the con
42a0: 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c nection.</dd>..<
42b0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 6e 64 dt><strong>stand
42c0: 61 72 64 5f 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 ard_name</strong
42d0: 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c > <em>name</em><
42e0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 74 /dt>..<dd>The st
42f0: 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 20 andard RFC name
4300: 6f 66 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a of cipher.</dd>.
4310: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74 .<dt><strong>bit
4320: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e s</strong> <em>n
4330: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
4340: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 72 The number of pr
4350: 6f 63 65 73 73 65 64 20 62 69 74 73 20 75 73 65 ocessed bits use
4360: 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64 d for cipher.</d
4370: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
4380: 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 73 74 72 secret_bits</str
4390: 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c ong> <em>n</em><
43a0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 /dt>..<dd>The nu
43b0: 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 20 62 mber of secret b
43c0: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 its used for cip
43d0: 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c her.</dd>..<dt><
43e0: 73 74 72 6f 6e 67 3e 6d 69 6e 5f 76 65 72 73 69 strong>min_versi
43f0: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e on</strong> <em>
4400: 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 version</em></dt
4410: 3e 0a 09 3c 64 64 3e 54 68 65 20 6d 69 6e 69 6d >..<dd>The minim
4420: 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 um protocol vers
4430: 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 72 2e 3c ion for cipher.<
4440: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4450: 67 3e 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 g>id</strong> <e
4460: 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 m>id</em></dt>..
4470: 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20 <dd>The OpenSSL
4480: 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 3e 0a cipher id.</dd>.
4490: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 64 65 73 .<dt><strong>des
44a0: 63 72 69 70 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 cription</strong
44b0: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
44c0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 20 74 65 ></dt>..<dd>A te
44d0: 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f xt description o
44e0: 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c 2f 64 f the cipher.</d
44f0: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 d>. </dl>.</b
4500: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 lockquote>.<bloc
4510: 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 65 73 73 kquote>..<b>Sess
4520: 69 6f 6e 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 ion Info</b>.
4530: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f <dl>..<dt><stro
4540: 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e ng>alpn</strong>
4550: 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 <em>protocol</e
4560: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
4570: 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 protocol select
4580: 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 ed after Applica
4590: 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f tion-Layer Proto
45a0: 63 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 col.. Negotia
45b0: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 tion (ALPN).</dd
45c0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 >..<dt><strong>r
45d0: 65 73 75 6d 61 62 6c 65 3c 2f 73 74 72 6f 6e 67 esumable</strong
45e0: 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 > <em>boolean</e
45f0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6e m></dt>..<dd>Can
4600: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 62 65 20 the session be
4610: 72 65 73 75 6d 65 64 20 6f 72 20 6e 6f 74 2e 3c resumed or not.<
4620: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4630: 67 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f 73 74 g>start_time</st
4640: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64 rong> <em>second
4650: 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 s</em></dt>..<dd
4660: 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73 >Time since sess
4670: 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73 ion started in s
4680: 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f econds since epo
4690: 63 68 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 ch.</dd>..<dt><s
46a0: 74 72 6f 6e 67 3e 74 69 6d 65 6f 75 74 3c 2f 73 trong>timeout</s
46b0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e trong> <em>secon
46c0: 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ds</em></dt>..<d
46d0: 64 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e 20 6f d>Max duration o
46e0: 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 65 63 f session in sec
46f0: 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69 6d 65 onds before time
4700: 2d 6f 75 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e -out.</dd>..<dt>
4710: 3c 73 74 72 6f 6e 67 3e 6c 69 66 65 74 69 6d 65 <strong>lifetime
4720: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 </strong> <em>se
4730: 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a conds</em></dt>.
4740: 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 74 69 63 .<dd>Session tic
4750: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 68 69 6e ket lifetime hin
4760: 74 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 64 t in seconds.</d
4770: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
4780: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f session_id</stro
4790: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 ng> <em>binary_s
47a0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
47b0: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 .<dd>Unique sess
47c0: 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69 ion id for use i
47d0: 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 n resuming the s
47e0: 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 ession.</dd>..<d
47f0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f t><strong>sessio
4800: 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 n_ticket</strong
4810: 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 74 72 > <em>binary_str
4820: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ing</em></dt>..<
4830: 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f dd>Unique sessio
4840: 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73 65 n ticket for use
4850: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 in resuming the
4860: 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 session.</dd>..
4870: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 63 6b <dt><strong>tick
4880: 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f 73 74 72 et_app_data</str
4890: 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f ong> <em>binary_
48a0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e string</em></dt>
48b0: 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 ..<dd>Unique ses
48c0: 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c sion ticket appl
48d0: 69 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 64 ication data.</d
48e0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
48f0: 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 72 6f master_key</stro
4900: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 ng> <em>binary_s
4910: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
4920: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 .<dd>Unique sess
4930: 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c ion master key.<
4940: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4950: 67 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f g>session_cache_
4960: 6d 6f 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 mode</strong> <e
4970: 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>mode</em></dt>
4980: 0a 09 3c 64 64 3e 53 65 72 76 65 72 20 63 61 63 ..<dd>Server cac
4990: 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e 74 2c he mode (client,
49a0: 20 73 65 72 76 65 72 2c 20 6f 72 20 62 6f 74 68 server, or both
49b0: 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c ).</dd>. </dl
49c0: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a >.</blockquote>.
49d0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
49e0: 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 22 3e ="tls::ciphers">
49f0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 <strong>tls::cip
4a00: 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 hers</strong>.
4a10: 20 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f <em>protocol ?
4a20: 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 6f 72 verbose? ?suppor
4a30: 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 ted?</em></a></d
4a40: 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 t>. <dd>Retur
4a50: 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 73 75 70 ns a list of sup
4a60: 70 6f 72 74 65 64 20 63 69 70 68 65 72 73 20 61 ported ciphers a
4a70: 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 3c 65 6d vailable for <em
4a80: 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 2c 0a >protocol</em>,.
4a90: 09 77 68 65 72 65 20 70 72 6f 74 6f 63 6f 6c 20 .where protocol
4aa0: 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 3c must be one of <
4ab0: 62 3e 73 73 6c 32 2c 20 73 73 6c 33 2c 20 74 6c b>ssl2, ssl3, tl
4ac0: 73 31 2c 20 74 6c 73 31 2e 31 2c 0a 09 74 6c 73 s1, tls1.1,..tls
4ad0: 31 2e 32 2c 3c 2f 62 3e 20 6f 72 20 3c 62 3e 74 1.2,</b> or <b>t
4ae0: 6c 73 31 2e 33 3c 2f 62 3e 2e 20 49 66 20 3c 65 ls1.3</b>. If <e
4af0: 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 6d 3e 20 69 m>verbose</em> i
4b00: 73 20 73 70 65 63 69 66 69 65 64 20 61 73 0a 09 s specified as..
4b10: 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72 62 true then a verb
4b20: 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 61 ose, human reada
4b30: 62 6c 65 20 6c 69 73 74 20 69 73 20 72 65 74 75 ble list is retu
4b40: 72 6e 65 64 20 77 69 74 68 0a 09 61 64 64 69 74 rned with..addit
4b50: 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f ional informatio
4b60: 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72 2e n on the cipher.
4b70: 20 49 66 20 3c 65 6d 3e 73 75 70 70 6f 72 74 65 If <em>supporte
4b80: 64 3c 2f 65 6d 3e 0a 09 69 73 20 73 70 65 63 69 d</em>..is speci
4b90: 66 69 65 64 20 61 73 20 74 72 75 65 2c 20 74 68 fied as true, th
4ba0: 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 68 en only the ciph
4bb0: 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 6f ers supported fo
4bc0: 72 20 70 72 6f 74 6f 63 6f 6c 0a 09 77 69 6c 6c r protocol..will
4bd0: 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f 64 64 3e be listed.</dd>
4be0: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d .. <dt><a nam
4bf0: 65 3d 22 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c e="tls::protocol
4c00: 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a s"><strong>tls::
4c10: 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e protocols</stron
4c20: 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 g></a></dt>.
4c30: 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69 <dd>Returns a li
4c40: 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20 st of supported
4c50: 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69 64 protocols. Valid
4c60: 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 09 3c 62 values are:..<b
4c70: 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e 73 73 >ssl2</b>, <b>ss
4c80: 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 3c l3</b>, <b>tls1<
4c90: 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 3c 2f /b>, <b>tls1.1</
4ca0: 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c 2f 62 b>, <b>tls1.2</b
4cb0: 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 31 2e >,..and <b>tls1.
4cc0: 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69 73 3</b>. Exact lis
4cd0: 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65 t depends on Ope
4ce0: 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64 nSSL version and
4cf0: 0a 09 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66 ..compile time f
4d00: 6c 61 67 73 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 lags.</dd>..
4d10: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
4d20: 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 73 74 72 6f ::version"><stro
4d30: 6e 67 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c ng>tls::version<
4d40: 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 /strong></a></dt
4d50: 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e >. <dd>Return
4d60: 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 65 s the OpenSSL ve
4d70: 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f 64 rsion string.</d
4d80: 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 33 3e 3c 61 d>.</dl>..<h3><a
4d90: 20 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43 4b 20 name="CALLBACK
4da0: 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 OPTIONS">CALLBAC
4db0: 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 K OPTIONS</a></h
4dc0: 33 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64 69 63 3>..<p>.As indic
4dd0: 61 74 65 64 20 61 62 6f 76 65 2c 20 69 6e 64 69 ated above, indi
4de0: 76 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c 73 20 vidual channels
4df0: 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65 can be given the
4e00: 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73 ir own callbacks
4e10: 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72 .to handle inter
4e20: 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69 mediate processi
4e30: 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 ng by the OpenSS
4e40: 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67 L library, using
4e50: 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 2d 63 6f the.<strong>-co
4e60: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 mmand</strong>,
4e70: 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 <strong>-passwor
4e80: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 0a d</strong>, and.
4e90: 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 <strong>-validat
4ea0: 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e e_command</stron
4eb0: 67 3e 20 6f 70 74 69 6f 6e 73 20 70 61 73 73 65 g> options passe
4ec0: 64 20 74 6f 20 65 69 74 68 65 72 20 6f 66 0a 3c d to either of.<
4ed0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b strong>tls::sock
4ee0: 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 6f 72 20 3c et</strong> or <
4ef0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f strong>tls::impo
4f00: 72 74 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 3c 2f 70 rt</strong>..</p
4f10: 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a >..<blockquote>.
4f20: 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 <dl>.. <dt><s
4f30: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f trong>-command</
4f40: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c strong> <em>call
4f50: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 back</em></dt>.
4f60: 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 <dd>..Invokes
4f70: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c the specified <
4f80: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
4f90: 20 73 63 72 69 70 74 20 61 74 0a 09 73 65 76 65 script at..seve
4fa0: 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e ral points durin
4fb0: 67 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 68 61 g the OpenSSL ha
4fc0: 6e 64 73 68 61 6b 65 2e 0a 09 56 61 6c 75 65 73 ndshake...Values
4fd0: 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 returned from t
4fe0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 61 72 65 20 he callback are
4ff0: 69 67 6e 6f 72 65 64 2e 0a 09 41 72 67 75 6d 65 ignored...Argume
5000: 6e 74 73 20 61 70 70 65 6e 64 65 64 20 74 6f 20 nts appended to
5010: 74 68 65 20 73 63 72 69 70 74 20 75 70 6f 6e 20 the script upon
5020: 63 61 6c 6c 62 61 63 6b 20 74 61 6b 65 20 6f 6e callback take on
5030: 65 20 6f 66 20 74 68 65 0a 09 66 6f 6c 6c 6f 77 e of the..follow
5040: 69 6e 67 20 66 6f 72 6d 73 3a 0a 0a 09 3c 62 72 ing forms:...<br
5050: 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a >..<br>...<dl>..
5060: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 .<dt>.. <strong
5070: 3e 65 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 3e 20 >error</strong>
5080: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65 73 73 <em>channel mess
5090: 61 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a age</em>..</dt>.
50a0: 09 3c 64 64 3e 0a 09 20 20 54 68 65 20 3c 65 6d .<dd>.. The <em
50b0: 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 >message</em> ar
50c0: 67 75 6d 65 6e 74 20 63 6f 6e 74 61 69 6e 73 20 gument contains
50d0: 61 6e 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 an error message
50e0: 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 generated.. by
50f0: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e the OpenSSL fun
5100: 63 74 69 6f 6e 20 3c 63 6f 64 65 3e 45 52 52 5f ction <code>ERR_
5110: 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 reason_error_str
5120: 69 6e 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c ing()</code>...<
5130: 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 /dd>...<br>...<d
5140: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e t>.. <strong>in
5150: 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e fo</strong> <em>
5160: 63 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 channel major mi
5170: 6e 6f 72 20 6d 65 73 73 61 67 65 20 74 79 70 65 nor message type
5180: 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 </em>..</dt>..<d
5190: 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 d>.. This form
51a0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
51b0: 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 nvoked by the Op
51c0: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 enSSL function..
51d0: 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f <code>SSL_CTX_
51e0: 73 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 set_info_callbac
51f0: 6b 28 29 3c 2f 63 6f 64 65 3e 20 64 75 72 69 6e k()</code> durin
5200: 67 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 65 74 g connection set
5210: 75 70 0a 09 20 20 61 6e 64 20 75 73 65 2e 0a 09 up.. and use...
5220: 20 20 3c 62 72 3e 0a 09 20 20 3c 75 6c 3e 0a 09 <br>.. <ul>..
5230: 20 20 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 20 76 <li>Possible v
5240: 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 alues for <em>ma
5250: 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 jor</em> are:..
5260: 20 3c 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 <code>handshake
5270: 2c 20 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 , alert, connect
5280: 2c 20 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e , accept</code>.
5290: 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 50 6f 73 </li>.. <li>Pos
52a0: 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 sible values for
52b0: 20 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 <em>minor</em>
52c0: 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 73 74 are:.. <code>st
52d0: 61 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61 64 2c art, done, read,
52e0: 20 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 write, loop, ex
52f0: 69 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a it</code>.</li>.
5300: 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 6d . <li>The <em>m
5310: 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 essage</em> argu
5320: 6d 65 6e 74 20 69 73 20 61 20 64 65 73 63 72 69 ment is a descri
5330: 70 74 69 76 65 20 73 74 72 69 6e 67 20 77 68 69 ptive string whi
5340: 63 68 20 6d 61 79 0a 09 20 20 62 65 20 67 65 6e ch may.. be gen
5350: 65 72 61 74 65 64 20 65 69 74 68 65 72 20 62 79 erated either by
5360: 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 <code>SSL_state
5370: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f _string_long()</
5380: 63 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c code> or by.. <
5390: 63 6f 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 code>SSL_alert_d
53a0: 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 esc_string_long(
53b0: 29 3c 2f 63 6f 64 65 3e 2c 20 64 65 70 65 6e 64 )</code>, depend
53c0: 69 6e 67 20 6f 6e 20 63 6f 6e 74 65 78 74 2e 3c ing on context.<
53d0: 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 46 6f 72 20 /li>.. <li>For
53e0: 61 6c 65 72 74 73 2c 20 74 68 65 20 70 6f 73 73 alerts, the poss
53f0: 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 ible values for
5400: 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 61 72 <em>type</em> ar
5410: 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 77 61 72 6e e:.. <code>warn
5420: 69 6e 67 2c 20 66 61 74 61 6c 2c 20 61 6e 64 20 ing, fatal, and
5430: 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 65 3e 2e 20 unknown</code>.
5440: 46 6f 72 20 6f 74 68 65 72 73 2c 0a 09 20 20 3c For others,.. <
5450: 63 6f 64 65 3e 69 6e 66 6f 3c 2f 63 6f 64 65 3e code>info</code>
5460: 20 69 73 20 75 73 65 64 2e 3c 2f 6c 69 3e 0a 09 is used.</li>..
5470: 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 0a </ul>..</dd>..
5480: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 .<dt>.. <strong
5490: 3e 6d 65 73 73 61 67 65 3c 2f 73 74 72 6f 6e 67 >message</strong
54a0: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 69 > <em>channel di
54b0: 72 65 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 rection version
54c0: 63 6f 6e 74 65 6e 74 5f 74 79 70 65 20 64 61 74 content_type dat
54d0: 61 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c a</em>..</dt>..<
54e0: 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d dd>.. This form
54f0: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
5500: 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f invoked by the O
5510: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a penSSL function.
5520: 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 65 74 . <code>SSL_set
5530: 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28 29 3c _msg_callback()<
5540: 2f 63 6f 64 65 3e 20 77 68 65 6e 65 76 65 72 20 /code> whenever
5550: 61 20 6d 65 73 73 61 67 65 20 69 73 20 73 65 6e a message is sen
5560: 74 20 6f 72 0a 09 20 20 72 65 63 65 69 76 65 64 t or.. received
5570: 2e 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 61 . It is only ava
5580: 69 6c 61 62 6c 65 20 77 68 65 6e 0a 09 20 20 4f ilable when.. O
5590: 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d 70 6c 69 penSSL is compli
55a0: 65 64 20 77 69 74 68 20 74 68 65 20 3c 65 6d 3e ed with the <em>
55b0: 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61 63 65 enable-ssl-trace
55c0: 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e 0a 09 20 </em> option...
55d0: 20 57 68 65 72 65 20 3c 65 6d 3e 64 69 72 65 63 Where <em>direc
55e0: 74 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20 53 65 6e tion</em> is Sen
55f0: 74 20 6f 72 20 52 65 63 65 69 76 65 64 2c 20 3c t or Received, <
5600: 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 20 em>version</em>
5610: 69 73 20 74 68 65 0a 09 20 20 70 72 6f 74 6f 63 is the.. protoc
5620: 6f 6c 20 76 65 72 73 69 6f 6e 2c 20 3c 65 6d 3e ol version, <em>
5630: 63 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f 65 6d content_type</em
5640: 3e 20 69 73 20 74 68 65 20 6d 65 73 73 61 67 65 > is the message
5650: 20 63 6f 6e 74 65 6e 74 20 74 79 70 65 2c 0a 09 content type,..
5660: 20 20 61 6e 64 20 3c 65 6d 3e 64 61 74 61 3c 2f and <em>data</
5670: 65 6d 3e 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f em> is more info
5680: 20 6f 6e 20 74 68 65 20 6d 65 73 73 61 67 65 20 on the message
5690: 66 72 6f 6d 20 74 68 65 20 3c 63 6f 64 65 3e 53 from the <code>S
56a0: 53 4c 5f 74 72 61 63 65 3c 2f 63 6f 64 65 3e 20 SL_trace</code>
56b0: 41 50 49 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 API...</dd>..<br
56c0: 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 >...<dt>.. <str
56d0: 6f 6e 67 3e 73 65 73 73 69 6f 6e 3c 2f 73 74 72 ong>session</str
56e0: 6f 6e 67 3e 20 3c 65 6d 3e 73 65 73 73 69 6f 6e ong> <em>session
56f0: 5f 69 64 20 74 69 63 6b 65 74 20 6c 69 66 65 74 _id ticket lifet
5700: 69 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a ime</em>..</dt>.
5710: 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f .<dd>.. This fo
5720: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 rm of callback i
5730: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 s invoked by the
5740: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f OpenSSL functio
5750: 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 n.. <code>SSL_C
5760: 54 58 5f 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f TX_sess_set_new_
5770: 63 62 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 cb()</code>...
5780: 57 68 65 72 65 20 3c 65 6d 3e 73 65 73 73 69 6f Where <em>sessio
5790: 6e 5f 69 64 3c 2f 65 6d 3e 20 69 73 20 74 68 65 n_id</em> is the
57a0: 20 63 75 72 72 65 6e 74 20 73 65 73 73 69 6f 6e current session
57b0: 20 69 64 65 6e 74 69 66 69 65 72 2c 0a 09 20 20 identifier,..
57c0: 3c 65 6d 3e 74 69 63 6b 65 74 3c 2f 65 6d 3e 20 <em>ticket</em>
57d0: 69 73 20 74 68 65 20 73 65 73 73 69 6f 6e 20 74 is the session t
57e0: 69 63 6b 65 74 20 69 6e 66 6f 2c 20 61 6e 64 20 icket info, and
57f0: 3c 65 6d 3e 6c 69 66 65 74 69 6d 65 3c 2f 65 6d <em>lifetime</em
5800: 3e 0a 09 20 20 69 73 20 74 68 65 20 74 68 65 20 >.. is the the
5810: 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 ticket lifetime
5820: 69 6e 20 73 65 63 6f 6e 64 73 2e 0a 09 3c 2f 64 in seconds...</d
5830: 64 3e 0a 09 3c 62 72 3e 0a 09 3c 2f 64 6c 3e 0a d>..<br>..</dl>.
5840: 20 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c </dd>.. <
5850: 62 72 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 br>.. <dt><st
5860: 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f rong>-password</
5870: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c strong> <em>call
5880: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 back</em></dt>.
5890: 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 <dd>..Invokes
58a0: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c the specified <
58b0: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
58c0: 20 73 63 72 69 70 74 20 77 68 65 6e 20 4f 70 65 script when Ope
58d0: 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f 0a 09 6f nSSL needs to..o
58e0: 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 btain a password
58f0: 2e 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 . The callback
5900: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 74 68 should return th
5910: 65 20 70 61 73 73 77 6f 72 64 20 61 73 20 61 20 e password as a
5920: 73 74 72 69 6e 67 2e 0a 09 4e 6f 20 61 72 67 75 string...No argu
5930: 6d 65 6e 74 73 20 61 72 65 20 61 70 70 65 6e 64 ments are append
5940: 65 64 20 74 6f 20 74 68 65 20 73 63 72 69 70 74 ed to the script
5950: 20 75 70 6f 6e 20 63 61 6c 6c 62 61 63 6b 2e 0a upon callback..
5960: 20 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c </dd>.. <
5970: 62 72 3e 0a 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 br>... <dt><s
5980: 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 trong>-validatec
5990: 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 ommand</strong>
59a0: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d <em>callback</em
59b0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a ></dt>. <dd>.
59c0: 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 .Invokes the spe
59d0: 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 cified <em>callb
59e0: 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 ack</em> script
59f0: 64 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 during handshake
5a00: 20 69 6e 0a 09 6f 72 64 65 72 20 74 6f 20 76 61 in..order to va
5a10: 6c 69 64 61 74 65 20 74 68 65 20 70 72 6f 76 69 lidate the provi
5a20: 64 65 64 20 76 61 6c 75 65 28 73 29 2e 20 0a 09 ded value(s). ..
5a30: 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 61 To reject the va
5a40: 6c 75 65 20 61 6e 64 20 61 62 6f 72 74 20 63 6f lue and abort co
5a50: 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20 63 61 nnection, the ca
5a60: 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 llback should re
5a70: 74 75 72 6e 20 30 2e 0a 09 54 6f 20 61 63 63 65 turn 0...To acce
5a80: 70 74 20 74 68 65 20 76 61 6c 75 65 2c 20 69 74 pt the value, it
5a90: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 should return 1
5aa0: 2e 20 20 54 6f 20 72 65 6a 65 63 74 20 74 68 65 . To reject the
5ab0: 20 76 61 6c 75 65 2c 20 62 75 74 0a 09 63 6f 6e value, but..con
5ac0: 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 tinue the connec
5ad0: 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 tion, it should
5ae0: 72 65 74 75 72 6e 20 32 2e 0a 0a 09 3c 62 72 3e return 2....<br>
5af0: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 ..<br>...<dl>...
5b00: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e <dt>.. <strong>
5b10: 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 alpn</strong> <e
5b20: 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 0a m>protocol</em>.
5b30: 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 .</dt>..<dd>..
5b40: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 For servers, thi
5b50: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
5b60: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 ck is invoked wh
5b70: 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c en the client AL
5b80: 50 4e 0a 09 20 20 65 78 74 65 6e 73 69 6f 6e 20 PN.. extension
5b90: 69 73 20 72 65 63 65 69 76 65 64 2e 20 57 68 65 is received. Whe
5ba0: 72 65 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c re <em>protocol<
5bb0: 2f 65 6d 3e 20 69 73 20 74 68 65 20 66 69 72 73 /em> is the firs
5bc0: 74 0a 09 20 20 3c 62 3e 2d 61 6c 70 6e 3c 2f 62 t.. <b>-alpn</b
5bd0: 3e 20 73 70 65 63 69 66 69 65 64 20 70 72 6f 74 > specified prot
5be0: 6f 63 6f 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 20 74 ocol common to t
5bf0: 68 65 20 62 6f 74 68 20 74 68 65 20 63 6c 69 65 he both the clie
5c00: 6e 74 20 61 6e 64 0a 09 20 20 73 65 72 76 65 72 nt and.. server
5c10: 2e 20 49 66 20 6e 6f 6e 65 2c 20 74 68 65 20 66 . If none, the f
5c20: 69 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63 irst client spec
5c30: 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 ified protocol i
5c40: 73 20 75 73 65 64 2e 0a 09 3c 2f 64 64 3e 0a 0a s used...</dd>..
5c50: 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 .<br>...<dt>..
5c60: 3c 73 74 72 6f 6e 67 3e 68 65 6c 6c 6f 3c 2f 73 <strong>hello</s
5c70: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 72 76 65 trong> <em>serve
5c80: 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 rname</em>..</dt
5c90: 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 >..<dd>.. For s
5ca0: 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 ervers, this for
5cb0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
5cc0: 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67 20 invoked during
5cd0: 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 0a 09 20 20 client hello..
5ce0: 6d 65 73 73 61 67 65 20 70 72 6f 63 65 73 73 69 message processi
5cf0: 6e 67 2e 20 49 74 20 69 73 20 75 73 65 64 20 74 ng. It is used t
5d00: 6f 20 73 65 6c 65 63 74 20 61 6e 20 61 70 70 72 o select an appr
5d10: 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69 63 opriate certific
5d20: 61 74 65 20 74 6f 0a 09 20 20 70 72 65 73 65 6e ate to.. presen
5d30: 74 2c 20 61 6e 64 20 6d 61 6b 65 20 6f 74 68 65 t, and make othe
5d40: 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 r configuration
5d50: 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c 65 adjustments rele
5d60: 76 61 6e 74 20 74 6f 20 74 68 61 74 0a 09 20 20 vant to that..
5d70: 73 65 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 server name and
5d80: 69 74 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f its configuratio
5d90: 6e 2e 20 43 61 6c 6c 65 64 20 62 65 66 6f 72 65 n. Called before
5da0: 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 20 63 61 SNI and ALPN ca
5db0: 6c 6c 62 61 63 6b 73 2e 0a 09 3c 2f 64 64 3e 0a llbacks...</dd>.
5dc0: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 ..<br>...<dt>..
5dd0: 20 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73 74 <strong>sni</st
5de0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 72 76 65 72 rong> <em>server
5df0: 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e name</em>..</dt>
5e00: 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 ..<dd>.. For se
5e10: 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d rvers, this form
5e20: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
5e30: 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 invoked when the
5e40: 20 53 4e 49 20 65 78 74 65 6e 73 69 6f 6e 0a 09 SNI extension..
5e50: 20 20 66 72 6f 6d 20 74 68 65 20 63 6c 69 65 6e from the clien
5e60: 74 20 69 73 20 72 65 63 65 69 76 65 64 2e 20 57 t is received. W
5e70: 68 65 72 65 20 3c 65 6d 3e 73 65 72 76 65 72 6e here <em>servern
5e80: 61 6d 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 ame</em> is the
5e90: 63 6c 69 65 6e 74 0a 09 20 20 70 72 6f 76 69 64 client.. provid
5ea0: 65 64 20 73 65 72 76 65 72 20 6e 61 6d 65 20 66 ed server name f
5eb0: 72 6f 6d 20 74 68 65 20 3c 62 3e 2d 73 65 72 76 rom the <b>-serv
5ec0: 65 72 6e 61 6d 65 3c 2f 62 3e 20 6f 70 74 69 6f ername</b> optio
5ed0: 6e 2e 20 54 68 69 73 20 69 73 0a 09 20 20 75 73 n. This is.. us
5ee0: 65 64 20 77 68 65 6e 20 61 20 73 65 72 76 65 72 ed when a server
5ef0: 20 73 75 70 70 6f 72 74 73 20 6d 75 6c 74 69 70 supports multip
5f00: 6c 65 20 6e 61 6d 65 73 2c 20 73 6f 20 74 68 65 le names, so the
5f10: 20 72 69 67 68 74 20 63 65 72 74 69 66 69 63 61 right certifica
5f20: 74 65 0a 09 20 20 63 61 6e 20 62 65 20 75 73 65 te.. can be use
5f30: 64 2e 20 43 61 6c 6c 65 64 20 61 66 74 65 72 20 d. Called after
5f40: 68 65 6c 6c 6f 20 63 61 6c 6c 62 61 63 6b 20 62 hello callback b
5f50: 75 74 20 62 65 66 6f 72 65 20 41 4c 50 4e 20 63 ut before ALPN c
5f60: 61 6c 6c 62 61 63 6b 2e 0a 09 3c 2f 64 64 3e 0a allback...</dd>.
5f70: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 ..<br>...<dt>..
5f80: 20 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 3c <strong>verify<
5f90: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 /strong> <em>cha
5fa0: 6e 6e 65 6c 20 64 65 70 74 68 20 63 65 72 74 20 nnel depth cert
5fb0: 73 74 61 74 75 73 20 65 72 72 6f 72 3c 2f 65 6d status error</em
5fc0: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 >..</dt>..<dd>..
5fd0: 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 This form of c
5fe0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
5ff0: 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 77 68 ed by OpenSSL wh
6000: 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69 66 69 en a new certifi
6010: 63 61 74 65 0a 09 20 20 69 73 20 72 65 63 65 69 cate.. is recei
6020: 76 65 64 20 66 72 6f 6d 20 74 68 65 20 70 65 65 ved from the pee
6030: 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 65 r. It allows the
6040: 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 6b client to check
6050: 20 74 68 65 0a 09 20 20 63 65 72 74 69 66 69 63 the.. certific
6060: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e ate verification
6070: 20 72 65 73 75 6c 74 73 20 61 6e 64 20 63 68 6f results and cho
6080: 6f 73 65 20 77 68 65 74 68 65 72 20 74 6f 20 63 ose whether to c
6090: 6f 6e 74 69 6e 75 65 0a 09 20 20 6f 72 20 6e 6f ontinue.. or no
60a0: 74 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 t. It is called
60b0: 66 6f 72 20 65 61 63 68 20 63 65 72 74 69 66 69 for each certifi
60c0: 63 61 74 65 20 69 6e 20 74 68 65 20 63 65 72 74 cate in the cert
60d0: 69 66 69 63 61 74 65 20 63 68 61 69 6e 2e 0a 09 ificate chain...
60e0: 20 20 3c 75 6c 3e 0a 09 20 20 3c 6c 69 3e 54 68 <ul>.. <li>Th
60f0: 65 20 3c 65 6d 3e 64 65 70 74 68 3c 2f 65 6d 3e e <em>depth</em>
6100: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 argument is an
6110: 69 6e 74 65 67 65 72 20 72 65 70 72 65 73 65 6e integer represen
6120: 74 69 6e 67 20 74 68 65 0a 09 20 20 63 75 72 72 ting the.. curr
6130: 65 6e 74 20 64 65 70 74 68 20 6f 6e 20 74 68 65 ent depth on the
6140: 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 certificate cha
6150: 69 6e 2c 20 77 69 74 68 0a 09 20 20 3c 63 6f 64 in, with.. <cod
6160: 65 3e 30 3c 2f 63 6f 64 65 3e 20 61 73 20 74 68 e>0</code> as th
6170: 65 20 70 65 65 72 20 63 65 72 74 69 66 69 63 61 e peer certifica
6180: 74 65 20 61 6e 64 20 68 69 67 68 65 72 20 76 61 te and higher va
6190: 6c 75 65 73 20 67 6f 69 6e 67 0a 09 20 20 75 70 lues going.. up
61a0: 20 74 6f 20 74 68 65 20 43 65 72 74 69 66 69 63 to the Certific
61b0: 61 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 ate Authority (C
61c0: 41 29 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e A).</li>.. <li>
61d0: 54 68 65 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d The <em>cert</em
61e0: 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 20 > argument is a
61f0: 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 list of key-valu
6200: 65 20 70 61 69 72 73 20 73 69 6d 69 6c 61 72 0a e pairs similar.
6210: 09 20 20 74 6f 20 74 68 6f 73 65 20 72 65 74 75 . to those retu
6220: 72 6e 65 64 20 62 79 0a 09 20 20 3c 61 20 68 72 rned by.. <a hr
6230: 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 ef="#tls::status
6240: 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 "><strong>tls::s
6250: 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f tatus</strong></
6260: 61 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e a>.</li>.. <li>
6270: 54 68 65 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f The <em>status</
6280: 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 em> argument is
6290: 61 6e 20 62 6f 6f 6c 65 61 6e 20 72 65 70 72 65 an boolean repre
62a0: 73 65 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 76 senting the.. v
62b0: 61 6c 69 64 69 74 79 20 6f 66 20 74 68 65 20 63 alidity of the c
62c0: 75 72 72 65 6e 74 20 63 65 72 74 69 66 69 63 61 urrent certifica
62d0: 74 65 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 6f te... A value o
62e0: 66 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e f <code>0</code>
62f0: 20 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 69 means the certi
6300: 66 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 64 ficate is deemed
6310: 20 69 6e 76 61 6c 69 64 2e 0a 09 20 20 41 20 76 invalid... A v
6320: 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e 31 3c alue of <code>1<
6330: 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 68 65 /code> means the
6340: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20 certificate is
6350: 64 65 65 6d 65 64 20 76 61 6c 69 64 2e 3c 2f 6c deemed valid.</l
6360: 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 i>.. <li>The <e
6370: 6d 3e 65 72 72 6f 72 3c 2f 65 6d 3e 20 61 72 67 m>error</em> arg
6380: 75 6d 65 6e 74 20 73 75 70 70 6c 69 65 73 20 74 ument supplies t
6390: 68 65 20 6d 65 73 73 61 67 65 2c 20 69 66 20 61 he message, if a
63a0: 6e 79 2c 20 67 65 6e 65 72 61 74 65 64 0a 09 20 ny, generated..
63b0: 20 62 79 20 3c 63 6f 64 65 3e 58 35 30 39 5f 53 by <code>X509_S
63c0: 54 4f 52 45 5f 43 54 58 5f 67 65 74 5f 65 72 72 TORE_CTX_get_err
63d0: 6f 72 28 29 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 or()</code>.</li
63e0: 3e 0a 09 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 >.. </ul>..</dd
63f0: 3e 0a 09 3c 62 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 >..<br>..</dl>.
6400: 20 20 20 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c </dd>.</dl>.<
6410: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 3c 70 /blockquote>..<p
6420: 3e 0a 52 65 66 65 72 65 6e 63 65 20 69 6d 70 6c >.Reference impl
6430: 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74 ementations of t
6440: 68 65 73 65 20 63 61 6c 6c 62 61 63 6b 73 20 61 hese callbacks a
6450: 72 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 74 re provided in t
6460: 68 65 0a 64 69 73 74 72 69 62 75 74 69 6f 6e 20 he.distribution
6470: 61 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a as <strong>tls::
6480: 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 callback</strong
6490: 3e 2c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a >, <strong>tls::
64a0: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 password</strong
64b0: 3e 2c 0a 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 >,.and <strong>t
64c0: 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d ls::validate_com
64d0: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 72 65 mand</strong> re
64e0: 73 70 65 63 74 69 76 65 6c 79 2e 20 20 4e 6f 74 spectively. Not
64f0: 65 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 e that these are
6500: 0a 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e .<em>sample</em>
6510: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 implementations
6520: 20 6f 6e 6c 79 2e 20 20 49 6e 20 61 20 6d 6f 72 only. In a mor
6530: 65 20 72 65 61 6c 69 73 74 69 63 20 64 65 70 6c e realistic depl
6540: 6f 79 6d 65 6e 74 0a 79 6f 75 20 77 6f 75 6c 64 oyment.you would
6550: 20 73 70 65 63 69 66 79 20 79 6f 75 72 20 6f 77 specify your ow
6560: 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 n callback scrip
6570: 74 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 20 63 ts on each TLS c
6580: 68 61 6e 6e 65 6c 20 75 73 69 6e 67 20 74 68 65 hannel using the
6590: 0a 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e .<strong>-comman
65a0: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 d</strong>, <str
65b0: 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 ong>-password</s
65c0: 74 72 6f 6e 67 3e 2c 20 61 6e 64 20 3c 73 74 72 trong>, and <str
65d0: 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f ong>-validate_co
65e0: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f mmand</strong> o
65f0: 70 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 ptions..</p>..<p
6600: 3e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 62 65 >.The default be
6610: 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 havior when the
6620: 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 <strong>-command
6630: 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 20 3c 73 </strong> and <s
6640: 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 5f trong>-validate_
6650: 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e command</strong>
6660: 0a 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 .options are not
6670: 20 73 70 65 63 69 66 69 65 64 20 69 73 20 66 6f specified is fo
6680: 72 20 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 r TLS to process
6690: 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 the associated
66a0: 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 6b library callback
66b0: 73 0a 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 68 s.internally. Th
66c0: 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 e default behavi
66d0: 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 73 74 72 or when the <str
66e0: 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 ong>-password</s
66f0: 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 20 69 73 trong> option is
6700: 20 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 20 69 not.specified i
6710: 73 20 66 6f 72 20 54 4c 53 20 74 6f 20 70 72 6f s for TLS to pro
6720: 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 61 cess the associa
6730: 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c 6c ted library call
6740: 62 61 63 6b 73 20 62 79 20 61 74 74 65 6d 70 74 backs by attempt
6750: 69 6e 67 0a 74 6f 20 63 61 6c 6c 20 3c 73 74 72 ing.to call <str
6760: 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 ong>tls::passwor
6770: 64 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 54 68 65 20 d</strong>..The
6780: 64 69 66 66 65 72 65 6e 63 65 20 62 65 74 77 65 difference betwe
6790: 65 6e 20 74 68 65 73 65 20 74 77 6f 20 62 65 68 en these two beh
67a0: 61 76 69 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 aviors is a cons
67b0: 65 71 75 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 equence of maint
67c0: 61 69 6e 69 6e 67 0a 63 6f 6d 70 61 74 69 62 69 aining.compatibi
67d0: 6c 69 74 79 20 77 69 74 68 20 65 61 72 6c 69 65 lity with earlie
67e0: 72 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e r implementation
67f0: 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 s..</p>..<p>.The
6800: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 <strong>tls::de
6810: 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 76 61 72 bug</strong> var
6820: 69 61 62 6c 65 20 70 72 6f 76 69 64 65 73 20 73 iable provides s
6830: 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c 0a 63 ome additional.c
6840: 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 73 ontrol over thes
6850: 65 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c e reference call
6860: 62 61 63 6b 73 2e 20 20 49 74 73 20 76 61 6c 75 backs. Its valu
6870: 65 20 69 73 20 7a 65 72 6f 20 62 79 20 64 65 66 e is zero by def
6880: 61 75 6c 74 2e 0a 48 69 67 68 65 72 20 76 61 6c ault..Higher val
6890: 75 65 73 20 70 72 6f 64 75 63 65 20 6d 6f 72 65 ues produce more
68a0: 20 64 69 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 diagnostic outp
68b0: 75 74 2c 20 61 6e 64 20 77 69 6c 6c 20 61 6c 73 ut, and will als
68c0: 6f 20 66 6f 72 63 65 20 74 68 65 0a 76 65 72 69 o force the.veri
68d0: 66 79 20 6d 65 74 68 6f 64 20 69 6e 20 3c 73 74 fy method in <st
68e0: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 rong>tls::callba
68f0: 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 74 6f 20 61 ck</strong> to a
6900: 63 63 65 70 74 20 74 68 65 0a 63 65 72 74 69 66 ccept the.certif
6910: 69 63 61 74 65 2c 20 65 76 65 6e 20 77 68 65 6e icate, even when
6920: 20 69 74 20 69 73 20 69 6e 76 61 6c 69 64 2e 0a it is invalid..
6930: 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 </p>..<p>.<em>.T
6940: 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 72 65 he use of the re
6950: 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b ference callback
6960: 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 s <strong>tls::c
6970: 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e allback</strong>
6980: 2c 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 ,.<strong>tls::p
6990: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e assword</strong>
69a0: 2c 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 6c , and <strong>tl
69b0: 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d s::validate_comm
69c0: 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 0a 69 73 20 and</strong>.is
69d0: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e not recommended.
69e0: 20 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 65 They may be re
69f0: 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 moved from futur
6a00: 65 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d e releases..</em
6a10: 3e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e >.</p>..<p>.<em>
6a20: 0a 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 .The use of the
6a30: 76 61 72 69 61 62 6c 65 20 3c 73 74 72 6f 6e 67 variable <strong
6a40: 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72 >tls::debug</str
6a50: 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f ong> is not reco
6a60: 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 6d 61 79 20 mmended..It may
6a70: 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 be removed from
6a80: 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e future releases.
6a90: 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 .</em>.</p>..<h3
6aa0: 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 42 55 47 22 ><a name="DEBUG"
6ab0: 3e 44 45 42 55 47 3c 2f 61 3e 3c 2f 68 33 3e 0a >DEBUG</a></h3>.
6ac0: 0a 54 4c 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 .TLS key logging
6ad0: 20 63 61 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 can be enabled
6ae0: 62 79 20 73 65 74 74 69 6e 67 20 74 68 65 20 65 by setting the e
6af0: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 nvironment varia
6b00: 62 6c 65 0a 3c 62 3e 53 53 4c 4b 45 59 4c 4f 47 ble.<b>SSLKEYLOG
6b10: 46 49 4c 45 3c 2f 62 3e 20 74 6f 20 74 68 65 20 FILE</b> to the
6b20: 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 name of the file
6b30: 20 74 6f 20 6c 6f 67 20 74 6f 2e 20 54 68 65 6e to log to. Then
6b40: 20 77 68 65 6e 65 76 65 72 20 54 4c 53 0a 6b 65 whenever TLS.ke
6b50: 79 20 6d 61 74 65 72 69 61 6c 20 69 73 20 67 65 y material is ge
6b60: 6e 65 72 61 74 65 64 20 6f 72 20 72 65 63 65 69 nerated or recei
6b70: 76 65 64 20 69 74 20 77 69 6c 6c 20 62 65 20 6c ved it will be l
6b80: 6f 67 67 65 64 20 74 6f 20 74 68 65 20 66 69 6c ogged to the fil
6b90: 65 2e 20 54 68 69 73 0a 69 73 20 75 73 65 66 75 e. This.is usefu
6ba0: 6c 20 66 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 l for logging ke
6bb0: 79 20 64 61 74 61 20 66 6f 72 20 6e 65 74 77 6f y data for netwo
6bc0: 72 6b 20 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 rk logging tools
6bd0: 20 74 6f 20 75 73 65 20 74 6f 0a 64 65 63 72 79 to use to.decry
6be0: 70 74 20 74 68 65 20 64 61 74 61 2e 0a 0a 3c 68 pt the data...<h
6bf0: 33 3e 3c 61 20 6e 61 6d 65 3d 22 48 54 54 50 53 3><a name="HTTPS
6c00: 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 EXAMPLE">HTTPS
6c10: 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 68 33 3e EXAMPLE</a></h3>
6c20: 0a 0a 3c 70 3e 54 68 69 73 20 65 78 61 6d 70 6c ..<p>This exampl
6c30: 65 20 75 73 65 73 20 61 20 73 61 6d 70 6c 65 20 e uses a sample
6c40: 73 65 72 76 65 72 2e 70 65 6d 20 70 72 6f 76 69 server.pem provi
6c50: 64 65 64 20 77 69 74 68 20 74 68 65 20 54 4c 53 ded with the TLS
6c60: 20 72 65 6c 65 61 73 65 2c 0a 63 6f 75 72 74 65 release,.courte
6c70: 73 79 20 6f 66 20 74 68 65 20 3c 73 74 72 6f 6e sy of the <stron
6c80: 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e g>OpenSSL</stron
6c90: 67 3e 20 70 72 6f 6a 65 63 74 2e 3c 2f 70 3e 0a g> project.</p>.
6ca0: 0a 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 63 .<pre><code>.pac
6cb0: 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74 kage require htt
6cc0: 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 p.package requir
6cd0: 65 20 74 6c 73 0a 0a 68 74 74 70 3a 3a 72 65 67 e tls..http::reg
6ce0: 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 ister https 443
6cf0: 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 [list ::tls::soc
6d00: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e ket -autoservern
6d10: 61 6d 65 20 74 72 75 65 20 2d 72 65 71 75 69 72 ame true -requir
6d20: 65 20 74 72 75 65 20 2d 63 61 64 69 72 20 2f 65 e true -cadir /e
6d30: 74 63 2f 73 73 6c 2f 63 65 72 74 73 5d 0a 0a 73 tc/ssl/certs]..s
6d40: 65 74 20 74 6f 6b 20 5b 68 74 74 70 3a 3a 67 65 et tok [http::ge
6d50: 74 75 72 6c 20 68 74 74 70 73 3a 2f 2f 77 77 77 turl https://www
6d60: 2e 74 63 6c 2e 74 6b 2f 5d 0a 3c 2f 63 6f 64 65 .tcl.tk/].</code
6d70: 3e 3c 2f 70 72 65 3e 0a 0a 3c 68 33 3e 3c 61 20 ></pre>..<h3><a
6d80: 6e 61 6d 65 3d 22 53 50 45 43 49 41 4c 20 43 4f name="SPECIAL CO
6d90: 4e 53 49 44 45 52 41 54 49 4f 4e 53 22 3e 53 50 NSIDERATIONS">SP
6da0: 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 ECIAL CONSIDERAT
6db0: 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c IONS</a></h3>..<
6dc0: 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74 69 p>The capabiliti
6dd0: 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b 61 es of this packa
6de0: 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f 72 ge can vary enor
6df0: 6d 6f 75 73 6c 79 20 62 61 73 65 64 20 75 70 6f mously based upo
6e00: 6e 20 68 6f 77 20 79 6f 75 72 0a 4f 70 65 6e 53 n how your.OpenS
6e10: 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 20 63 SL library was c
6e20: 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 62 75 onfigured and bu
6e30: 69 6c 74 2e 20 4e 65 77 20 76 65 72 73 69 6f 6e ilt. New version
6e40: 73 20 6d 61 79 20 6f 62 73 6f 6c 65 74 65 20 6f s may obsolete o
6e50: 6c 64 65 72 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 lder.protocol ve
6e60: 72 73 69 6f 6e 73 2c 20 61 64 64 20 6f 72 20 72 rsions, add or r
6e70: 65 6d 6f 76 65 20 63 69 70 68 65 72 73 2c 20 63 emove ciphers, c
6e80: 68 61 6e 67 65 20 64 65 66 61 75 6c 74 20 76 61 hange default va
6e90: 6c 75 65 73 2c 20 65 74 63 2e 20 55 73 65 20 74 lues, etc. Use t
6ea0: 68 65 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a he.<strong>tls::
6eb0: 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e ciphers</strong>
6ec0: 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 and <strong>tls
6ed0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 ::protocols</str
6ee0: 6f 6e 67 3e 20 63 6f 6d 6d 61 6e 64 73 20 74 6f ong> commands to
6ef0: 0a 6f 62 74 61 69 6e 20 74 68 65 20 73 75 70 70 .obtain the supp
6f00: 6f 72 74 65 64 20 76 65 72 73 69 6f 6e 73 2e 3c orted versions.<
6f10: 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 /p>..<h3><a name
6f20: 3d 22 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 ="SEE ALSO">SEE
6f30: 41 4c 53 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c ALSO</a></h3>..<
6f40: 70 3e 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 p><strong>socket
6f50: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f </strong>, <stro
6f60: 6e 67 3e 66 69 6c 65 65 76 65 6e 74 2c 20 3c 2f ng>fileevent, </
6f70: 73 74 72 6f 6e 67 3e 3c 61 0a 68 72 65 66 3d 22 strong><a.href="
6f80: 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 http://www.opens
6f90: 73 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72 6f 6e 67 sl.org/"><strong
6fa0: 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 >OpenSSL</strong
6fb0: 3e 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68 72 3e 0a ></a></p>..<hr>.
6fc0: 0a 3c 70 72 65 3e 0a 43 6f 70 79 72 69 67 68 74 .<pre>.Copyright
6fd0: 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74 © 1999 Mat
6fe0: 74 20 4e 65 77 6d 61 6e 2e 0a 43 6f 70 79 72 69 t Newman..Copyri
6ff0: 67 68 74 20 26 63 6f 70 79 3b 20 32 30 30 34 20 ght © 2004
7000: 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 Starfish Systems
7010: 2e 0a 3c 2f 70 72 65 3e 0a 3c 2f 62 6f 64 79 3e ..</pre>.</body>
7020: 0a 3c 2f 68 74 6d 6c 3e 0a .</html>.