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 20 0a sitional//EN"> .
0040: 0a 3c 68 74 6d 6c 3e 0a 0a 3c 68 65 61 64 3e 0a .<html>..<head>.
0050: 3c 6d 65 74 61 20 68 74 74 70 2d 65 71 75 69 76 <meta http-equiv
0060: 3d 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 0a ="Content-Type".
0070: 63 6f 6e 74 65 6e 74 3d 22 74 65 78 74 2f 68 74 content="text/ht
0080: 6d 6c 3b 20 63 68 61 72 73 65 74 3d 69 73 6f 2d ml; charset=iso-
0090: 38 38 35 39 2d 31 22 3e 0a 3c 6d 65 74 61 20 6e 8859-1">.<meta n
00a0: 61 6d 65 3d 22 43 6f 70 79 72 69 67 68 74 22 20 ame="Copyright"
00b0: 63 6f 6e 74 65 6e 74 3d 22 31 39 39 39 20 4d 61 content="1999 Ma
00c0: 74 74 20 4e 65 77 6d 61 6e 20 2f 20 32 30 30 34 tt Newman / 2004
00d0: 20 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d Starfish System
00e0: 73 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c 53 20 28 s">.<title>TLS (
00f0: 53 53 4c 29 20 54 63 6c 20 43 6f 6d 6d 61 6e 64 SSL) Tcl Command
0100: 73 3c 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64 s</title>.</head
0110: 3e 0a 0a 3c 62 6f 64 79 20 62 67 63 6f 6c 6f 72 >..<body bgcolor
0120: 3d 22 23 46 46 46 46 46 46 22 3e 0a 0a 3c 64 6c ="#FFFFFF">..<dl
0130: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 >. <dd><a hre
0140: 66 3d 22 23 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f f="#NAME">NAME</
0150: 61 3e 20 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 a> <dl>.
0160: 3c 64 64 3e 3c 62 3e 74 6c 73 3c 2f 62 3e 20 2d <dd><b>tls</b> -
0170: 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 62 3e 4f binding to <b>O
0180: 70 65 6e 53 53 4c 3c 2f 62 3e 20 74 6f 6f 6c 6b penSSL</b> toolk
0190: 69 74 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 it.</dd>. </d
01a0: 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20 l>. </dd>.
01b0: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 <dd><a href="#S
01c0: 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f 50 53 49 YNOPSIS">SYNOPSI
01d0: 53 3c 2f 61 3e 20 3c 2f 64 64 3e 0a 20 20 20 20 S</a> </dd>.
01e0: 3c 64 64 3e 3c 64 6c 3e 0a 20 20 20 20 20 20 20 <dd><dl>.
01f0: 20 20 20 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b <dd><b>pack
0200: 61 67 65 20 72 65 71 75 69 72 65 20 54 63 6c 3c age require Tcl<
0210: 2f 62 3e 20 3c 65 6d 3e 3f 38 2e 34 3f 3c 2f 65 /b> <em>?8.4?</e
0220: 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 m></dd>.
0230: 20 20 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 <dd><b>packa
0240: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f ge require tls</
0250: 62 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 b></dd>.
0260: 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f <dt> </
0270: 64 74 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 dt>.
0280: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 <dd><b>tls::init
0290: 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e </b> <em>?option
02a0: 73 3f 3c 2f 65 6d 3e 20 3c 2f 64 64 3e 0a 20 20 s?</em> </dd>.
02b0: 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 <dd><b
02c0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e >tls::socket</b>
02d0: 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68 <em>?options? h
02e0: 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 ost port</em></d
02f0: 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c d>. <
0300: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 dd><b>tls::socke
0310: 74 3c 2f 62 3e 20 3c 65 6d 3e 20 3f 2d 73 65 72 t</b> <em> ?-ser
0320: 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 ver command? ?op
0330: 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e tions? port</em>
0340: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 </dd>.
0350: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 68 61 <dd><b>tls::ha
0360: 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 65 6d 3e ndshake</b> <em>
0370: 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 channel</em></d
0380: 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c d>. <
0390: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75 dd><b>tls::statu
03a0: 73 20 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d 6c 6f 63 s </b> <em>?-loc
03b0: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e al? channel</em>
03c0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 </dd>.
03d0: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 6f <dd><b>tls::co
03e0: 6e 6e 65 63 74 69 6f 6e 20 3c 2f 62 3e 20 3c 65 nnection </b> <e
03f0: 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f m>channel</em></
0400: 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 dd>.
0410: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f <dd><b>tls::impo
0420: 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e 6e rt</b> <em>chann
0430: 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 65 6d el ?options?</em
0440: 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 ></dd>.
0450: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 75 <dd><b>tls::u
0460: 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e nimport</b> <em>
0470: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 channel</em></dd
0480: 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 >. <d
0490: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 t> </dt>.
04a0: 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 <dd><b
04b0: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 20 3c 2f >tls::ciphers </
04c0: 62 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 b> <em>protocol
04d0: 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 6f ?verbose? ?suppo
04e0: 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a rted?</em></dd>.
04f0: 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e <dd>
0500: 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c <b>tls::protocol
0510: 73 3c 2f 62 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 s</b></dd>.
0520: 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c <dd><b>tl
0530: 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f s::version</b></
0540: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 2f 64 6c dd>. </dl
0550: 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 >. </dd>.
0560: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 4f <dd><a href="#CO
0570: 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 MMANDS">COMMANDS
0580: 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 </a></dd>. <d
0590: 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c d><a href="#CALL
05a0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 BACK OPTIONS">CA
05b0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f LLBACK OPTIONS</
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 48 54 54 50 53 20 <a href="#HTTPS
05e0: 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45 EXAMPLE">HTTPS E
05f0: 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 64 3e 0a XAMPLE</a></dd>.
0600: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d <dd><a href=
0610: 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 50 45 43 "#SEE ALSO">SPEC
0620: 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f IAL CONSIDERATIO
0630: 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 NS</a></dd>.
0640: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 45 <dd><a href="#SE
0650: 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f E ALSO">SEE ALSO
0660: 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a </a></dd>.</dl>.
0670: 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 .<hr>..<h3><a na
0680: 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f me="NAME">NAME</
0690: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 a></h3>..<p><str
06a0: 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e ong>tls</strong>
06b0: 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 73 - binding to <s
06c0: 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 trong>OpenSSL</s
06d0: 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 74 2e 3c trong>.toolkit.<
06e0: 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 /p>..<h3><a name
06f0: 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f ="SYNOPSIS">SYNO
0700: 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c PSIS</a></h3>..<
0710: 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71 p><b>package req
0720: 75 69 72 65 20 54 63 6c 20 38 2e 34 3c 2f 62 3e uire Tcl 8.4</b>
0730: 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 67 65 20 <br>.<b>package
0740: 72 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e 3c require tls</b><
0750: 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 66 br>.<br>.<a href
0760: 3d 22 23 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 ="#tls::init"><b
0770: 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c >tls::init</b> <
0780: 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c i>?options?</i><
0790: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
07a0: 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c "#tls::socket"><
07b0: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 b>tls::socket</b
07c0: 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68 > <i>?options? h
07d0: 6f 73 74 20 70 6f 72 74 3c 2f 69 3e 3c 62 72 3e ost port</i><br>
07e0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
07f0: 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a socket"><b>tls::
0800: 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f 2d socket</b> <i>?-
0810: 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 server command?
0820: 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f ?options? port</
0830: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
0840: 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 ef="#tls::status
0850: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75 73 "><b>tls::status
0860: 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63 61 6c 3f </b> <i>?-local?
0870: 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e channel</i></a>
0880: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 <br>.<a href="#t
0890: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e ls::connection">
08a0: 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 <b>tls::connecti
08b0: 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 on</b> <i>channe
08c0: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 l</i></a><br>.<a
08d0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61 6e href="#tls::han
08e0: 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a dshake"><b>tls::
08f0: 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 69 handshake</b> <i
0900: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e >channel</i></a>
0910: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 <br>.<a href="#t
0920: 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 ls::import"><b>t
0930: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c ls::import</b> <
0940: 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f i>channel ?optio
0950: 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a ns?</i></a><br>.
0960: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 75 <a href="#tls::u
0970: 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a nimport"><b>tls:
0980: 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 :unimport</b> <i
0990: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e >channel</i></a>
09a0: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 <br>.<br>.<a hre
09b0: 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 65 72 73 f="#tls::ciphers
09c0: 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 "><b>tls::cipher
09d0: 73 3c 2f 62 3e 20 3c 69 3e 70 72 6f 74 6f 63 6f s</b> <i>protoco
09e0: 6c 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 l ?verbose? ?sup
09f0: 70 6f 72 74 65 64 3f 3c 2f 69 3e 3c 2f 61 3e 3c ported?</i></a><
0a00: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0a10: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e 3c 62 s::protocols"><b
0a20: 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c >tls::protocols<
0a30: 2f 62 3e 3c 2f 61 3e 0a 3c 61 20 68 72 65 66 3d /b></a>.<a href=
0a40: 22 23 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e "#tls::version">
0a50: 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c <b>tls::version<
0a60: 2f 62 3e 3c 2f 61 3e 0a 3c 2f 70 3e 0a 0a 3c 68 /b></a>.</p>..<h
0a70: 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 53 43 52 3><a name="DESCR
0a80: 49 50 54 49 4f 4e 22 3e 44 45 53 43 52 49 50 54 IPTION">DESCRIPT
0a90: 49 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 ION</a></h3>..<p
0aa0: 3e 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 >This extension
0ab0: 70 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65 72 provides a gener
0ac0: 69 63 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61 ic binding to <a
0ad0: 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 .href="http://ww
0ae0: 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e w.openssl.org/">
0af0: 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 OpenSSL</a>, uti
0b00: 6c 69 7a 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f lizing the.<stro
0b10: 6e 67 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e ng>Tcl_StackChan
0b20: 6e 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 nel</strong>.API
0b30: 20 66 6f 72 20 54 63 6c 20 38 2e 34 20 61 6e 64 for Tcl 8.4 and
0b40: 20 68 69 67 68 65 72 2e 20 54 68 65 20 73 6f 63 higher. The soc
0b50: 6b 65 74 73 20 62 65 68 61 76 65 20 65 78 61 63 kets behave exac
0b60: 74 6c 79 20 74 68 65 20 73 61 6d 65 0a 61 73 20 tly the same.as
0b70: 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 channels created
0b80: 20 75 73 69 6e 67 20 54 63 6c 27 73 20 62 75 69 using Tcl's bui
0b90: 6c 74 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f lt-in <strong>so
0ba0: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f cket</strong>.co
0bb0: 6d 6d 61 6e 64 20 77 69 74 68 20 61 64 64 69 74 mmand with addit
0bc0: 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f ional options fo
0bd0: 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 r controlling th
0be0: 65 20 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 3c e SSL session..<
0bf0: 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 /p>..<h3><a name
0c00: 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d ="COMMANDS">COMM
0c10: 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c ANDS</a></h3>..<
0c20: 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65 20 p>Typically one
0c30: 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 3c 73 would use the <s
0c40: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 trong>tls::socke
0c50: 74 20 3c 2f 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61 t </strong>comma
0c60: 6e 64 0a 77 68 69 63 68 20 70 72 6f 76 69 64 65 nd.which provide
0c70: 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 s compatibility
0c80: 77 69 74 68 20 74 68 65 20 6e 61 74 69 76 65 20 with the native
0c90: 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b Tcl <strong>sock
0ca0: 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d et</strong>.comm
0cb0: 61 6e 64 2e 20 49 6e 20 73 75 63 68 20 63 61 73 and. In such cas
0cc0: 65 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a es <strong>tls::
0cd0: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 import</strong>
0ce0: 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 0a 75 73 should not be.us
0cf0: 65 64 20 64 69 72 65 63 74 6c 79 2e 3c 2f 70 3e ed directly.</p>
0d00: 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c ..<dl>. <dt><
0d10: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69 a name="tls::ini
0d20: 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 t"><b>tls::init
0d30: 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f </b><i>?options?
0d40: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 </i></a></dt>.
0d50: 20 20 3c 64 64 3e 4f 70 74 69 6f 6e 61 6c 20 66 <dd>Optional f
0d60: 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 unction to set t
0d70: 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f he default optio
0d80: 6e 73 20 75 73 65 64 20 62 79 0a 09 3c 73 74 72 ns used by..<str
0d90: 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c ong>tls::socket<
0da0: 2f 73 74 72 6f 6e 67 3e 2e 20 49 66 20 79 6f 75 /strong>. If you
0db0: 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c call <strong>tl
0dc0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e s::import</stron
0dd0: 67 3e 0a 20 20 20 20 20 20 20 20 64 69 72 65 63 g>. direc
0de0: 74 6c 79 20 74 68 69 73 20 72 6f 75 74 69 6e 65 tly this routine
0df0: 20 68 61 73 20 6e 6f 20 65 66 66 65 63 74 2e 20 has no effect.
0e00: 41 6e 79 20 6f 66 20 74 68 65 20 6f 70 74 69 6f Any of the optio
0e10: 6e 73 0a 20 20 20 20 20 20 20 20 74 68 61 74 20 ns. that
0e20: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 <strong>tls::soc
0e30: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63 ket</strong> acc
0e40: 65 70 74 73 20 63 61 6e 20 62 65 20 73 65 74 0a epts can be set.
0e50: 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 74 68 using th
0e60: 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 74 68 6f 75 is command, thou
0e70: 67 68 20 79 6f 75 20 73 68 6f 75 6c 64 20 6c 69 gh you should li
0e80: 6d 69 74 20 79 6f 75 72 20 6f 70 74 69 6f 6e 73 mit your options
0e90: 0a 20 20 20 20 20 20 20 20 74 6f 20 6f 6e 6c 79 . to only
0ea0: 20 54 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e 65 TLS related one
0eb0: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e s.</dd>. <dt>
0ec0: 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 </dt>.
0ed0: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
0ee0: 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 ::socket"><b>tls
0ef0: 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d ::socket </b><em
0f00: 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 20 20 20 20 20 >?options?.
0f10: 20 20 20 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d host port</em
0f20: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c ></a></dt>. <
0f30: 64 74 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 dt><b>tls::socke
0f40: 74 3c 2f 62 3e 3c 65 6d 3e 20 3f 2d 73 65 72 76 t</b><em> ?-serv
0f50: 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 er command? ?opt
0f60: 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e 3c ions? port</em><
0f70: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 54 68 69 /dt>. <dd>Thi
0f80: 73 20 69 73 20 61 20 68 65 6c 70 65 72 20 66 75 s is a helper fu
0f90: 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 74 69 6c nction that util
0fa0: 69 7a 65 73 20 74 68 65 20 75 6e 64 65 72 6c 79 izes the underly
0fb0: 69 6e 67 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d ing. comm
0fc0: 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 3e 74 6c ands (<strong>tl
0fd0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e s::import</stron
0fe0: 67 3e 29 2e 20 49 74 20 62 65 68 61 76 65 73 0a g>). It behaves.
0ff0: 20 20 20 20 20 20 20 20 65 78 61 63 74 6c 79 20 exactly
1000: 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 20 the same as the
1010: 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 74 72 6f native Tcl <stro
1020: 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e ng>socket</stron
1030: 67 3e 0a 20 20 20 20 20 20 20 20 63 6f 6d 6d 61 g>. comma
1040: 6e 64 20 65 78 63 65 70 74 20 74 68 61 74 20 74 nd except that t
1050: 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 6e 20 69 he options can i
1060: 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66 20 74 68 nclude any of th
1070: 65 0a 20 20 20 20 20 20 20 20 61 70 70 6c 69 63 e. applic
1080: 61 62 6c 65 20 3c 61 20 68 72 65 66 3d 22 23 74 able <a href="#t
1090: 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72 ls::import"><str
10a0: 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f ong>tls:import</
10b0: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 20 20 20 20 strong></a>.
10c0: 20 20 20 20 6f 70 74 69 6f 6e 73 20 77 69 74 68 options with
10d0: 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 one additional
10e0: 6f 70 74 69 6f 6e 3a 0a 3c 62 6c 6f 63 6b 71 75 option:.<blockqu
10f0: 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a 20 20 ote>. <dl>.
1100: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
1110: 67 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d g>-autoservernam
1120: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 e</strong> <em>b
1130: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ool</em></dt>.
1140: 20 20 20 20 20 20 3c 64 64 3e 41 75 74 6f 6d 61 <dd>Automa
1150: 74 69 63 61 6c 6c 79 20 73 65 6e 64 20 74 68 65 tically send the
1160: 20 2d 73 65 72 76 65 72 6e 61 6d 65 20 61 73 20 -servername as
1170: 74 68 65 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d the <em>host</em
1180: 3e 20 61 72 67 75 6d 65 6e 74 0a 20 20 20 20 20 > argument.
1190: 20 20 20 20 20 20 20 28 64 65 66 61 75 6c 74 20 (default
11a0: 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d is <em>false</em
11b0: 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c >)</dd>. </dl
11c0: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a >.</blockquote>.
11d0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
11e0: 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c ="tls::import"><
11f0: 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c 2f b>tls::import </
1200: 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a 20 20 20 b><i>channel.
1210: 20 20 20 20 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f ?options?</
1220: 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 i></a></dt>.
1230: 3c 64 64 3e 53 53 4c 2d 65 6e 61 62 6c 65 20 61 <dd>SSL-enable a
1240: 20 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68 61 regular Tcl cha
1250: 6e 6e 65 6c 20 2d 20 69 74 20 6e 65 65 64 20 6e nnel - it need n
1260: 6f 74 20 62 65 20 61 0a 20 20 20 20 20 20 20 20 ot be a.
1270: 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 socket, but must
1280: 20 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65 provide bi-dire
1290: 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c ctional flow. Al
12a0: 73 6f 0a 20 20 20 20 20 20 20 20 73 65 74 74 69 so. setti
12b0: 6e 67 20 73 65 73 73 69 6f 6e 20 70 61 72 61 6d ng session param
12c0: 65 74 65 72 73 20 66 6f 72 20 53 53 4c 20 68 61 eters for SSL ha
12d0: 6e 64 73 68 61 6b 65 2e 3c 2f 64 64 3e 0a 0a 3c ndshake.</dd>..<
12e0: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 blockquote>.
12f0: 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 <dl>. <dt
1300: 3e 3c 73 74 72 6f 6e 67 3e 2d 61 6c 70 6e 3c 2f ><strong>-alpn</
1310: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 strong> <em>list
1320: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
1330: 20 20 20 3c 64 64 3e 4c 69 73 74 20 6f 66 20 70 <dd>List of p
1340: 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 rotocols to offe
1350: 72 20 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61 r during Applica
1360: 74 69 6f 6e 2d 4c 61 79 65 72 0a 09 20 20 20 20 tion-Layer..
1370: 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 Protocol Negotia
1380: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 20 46 6f 72 tion (ALPN). For
1390: 20 65 78 61 6d 70 6c 65 3a 20 68 32 2c 20 68 74 example: h2, ht
13a0: 74 70 2f 31 2e 31 2c 20 65 74 63 2e 3c 2f 64 64 tp/1.1, etc.</dd
13b0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
13c0: 74 72 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74 trong>-cadir</st
13d0: 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 rong> <em>dir</e
13e0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
13f0: 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 <dd>Specify the
1400: 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 directory contai
1410: 6e 69 6e 67 20 74 68 65 20 43 41 20 63 65 72 74 ning the CA cert
1420: 69 66 69 63 61 74 65 73 2e 20 54 68 65 0a 09 20 ificates. The..
1430: 20 20 20 64 65 66 61 75 6c 74 20 64 69 72 65 63 default direc
1440: 74 6f 72 79 20 69 73 20 70 6c 61 74 66 6f 72 6d tory is platform
1450: 20 73 70 65 63 69 66 69 63 20 61 6e 64 20 63 61 specific and ca
1460: 6e 20 62 65 20 73 65 74 20 61 74 0a 09 20 20 20 n be set at..
1470: 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20 54 compile time. T
1480: 68 69 73 20 63 61 6e 20 62 65 20 6f 76 65 72 72 his can be overr
1490: 69 64 64 65 6e 20 76 69 61 20 74 68 65 20 3c 62 idden via the <b
14a0: 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 >SSL_CERT_DIR</b
14b0: 3e 0a 09 20 20 20 20 65 6e 76 69 72 6f 6e 6d 65 >.. environme
14c0: 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c 2f 64 64 nt variable.</dd
14d0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
14e0: 74 72 6f 6e 67 3e 2d 63 61 66 69 6c 65 20 3c 2f trong>-cafile </
14f0: 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e strong><em>filen
1500: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ame</em></dt>.
1510: 20 20 20 20 20 20 3c 64 64 3e 53 70 65 63 69 66 <dd>Specif
1520: 79 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 y the certificat
1530: 65 20 61 75 74 68 6f 72 69 74 79 20 28 43 41 29 e authority (CA)
1540: 20 66 69 6c 65 20 74 6f 20 75 73 65 2e 3c 2f 64 file to use.</d
1550: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
1560: 73 74 72 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65 strong>-certfile
1570: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 </strong> <em>fi
1580: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e lename</em></dt>
1590: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70 65 . <dd>Spe
15a0: 63 69 66 79 20 74 68 65 20 66 69 6c 65 6e 61 6d cify the filenam
15b0: 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 e containing the
15c0: 20 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 certificate to
15d0: 75 73 65 2e 20 54 68 65 0a 09 20 20 20 20 64 65 use. The.. de
15e0: 66 61 75 6c 74 20 6e 61 6d 65 20 69 73 20 3c 62 fault name is <b
15f0: 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e 2e 20 54 >cert.pem</b>. T
1600: 68 69 73 20 63 61 6e 20 62 65 20 6f 76 65 72 72 his can be overr
1610: 69 64 64 65 6e 20 76 69 61 0a 09 20 20 20 20 74 idden via.. t
1620: 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 46 he <b>SSL_CERT_F
1630: 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d ILE</b> environm
1640: 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c 2f 64 ent variable.</d
1650: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
1660: 73 74 72 6f 6e 67 3e 2d 63 65 72 74 3c 2f 73 74 strong>-cert</st
1670: 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 rong> <em>filena
1680: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 me</em></dt>.
1690: 20 20 20 20 20 3c 64 64 3e 53 70 65 63 69 66 79 <dd>Specify
16a0: 20 74 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66 the contents of
16b0: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 20 74 a certificate t
16c0: 6f 20 75 73 65 2c 20 61 73 20 61 20 44 45 52 0a o use, as a DER.
16d0: 09 20 20 20 20 65 6e 63 6f 64 65 64 20 62 69 6e . encoded bin
16e0: 61 72 79 20 76 61 6c 75 65 20 28 58 2e 35 30 39 ary value (X.509
16f0: 20 44 45 52 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 DER).</dd>.
1700: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
1710: 2d 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e -cipher</strong>
1720: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e <em>string</em>
1730: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
1740: 64 3e 4c 69 73 74 20 6f 66 20 63 69 70 68 65 72 d>List of cipher
1750: 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69 6e 67 s to use. String
1760: 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22 is a colon (":"
1770: 29 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 ) separated list
1780: 0a 09 20 20 20 20 6f 66 20 63 69 70 68 65 72 73 .. of ciphers
1790: 20 6f 72 20 63 69 70 68 65 72 20 73 75 69 74 65 or cipher suite
17a0: 73 2e 20 43 69 70 68 65 72 20 73 75 69 74 65 73 s. Cipher suites
17b0: 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 can be combined
17c0: 0a 09 20 20 20 20 75 73 69 6e 67 20 74 68 65 20 .. using the
17d0: 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72 61 63 74 <b>+</b> charact
17e0: 65 72 2e 20 50 72 65 66 69 78 65 73 20 63 61 6e er. Prefixes can
17f0: 20 62 65 20 75 73 65 64 20 74 6f 20 70 65 72 6d be used to perm
1800: 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20 72 65 6d anently.. rem
1810: 6f 76 65 20 28 22 21 22 29 2c 20 64 65 6c 65 74 ove ("!"), delet
1820: 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d 6f 76 65 e ("-"), or move
1830: 20 61 20 63 79 70 68 65 72 20 74 6f 20 74 68 65 a cypher to the
1840: 20 65 6e 64 20 6f 66 0a 09 20 20 20 20 74 68 65 end of.. the
1850: 20 6c 69 73 74 20 28 22 2b 22 29 2e 20 4b 65 79 list ("+"). Key
1860: 77 6f 72 64 73 20 3c 62 3e 40 53 54 52 45 4e 47 words <b>@STRENG
1870: 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 TH</b> (sort by
1880: 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20 20 20 6b algorithm.. k
1890: 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c 62 3e 40 ey length), <b>@
18a0: 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e 3c 69 3e SECLEVEL=</b><i>
18b0: 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65 63 75 72 n</i> (set secur
18c0: 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a 09 20 20 ity level to..
18d0: 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e 44 45 46 n), and <b>DEF
18e0: 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20 64 65 AULT</b> (use de
18f0: 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c 69 73 fault cipher lis
1900: 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e 6c 79 t, at start only
1910: 29 0a 09 20 20 20 20 63 61 6e 20 61 6c 73 6f 20 ).. can also
1920: 62 65 20 73 70 65 63 69 66 69 65 64 2e 20 53 65 be specified. Se
1930: 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63 75 6d 65 e OpenSSL docume
1940: 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 ntation for the
1950: 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73 74 20 6f full.. list o
1960: 66 20 76 61 6c 69 64 20 76 61 6c 75 65 73 2e 20 f valid values.
1970: 28 54 4c 53 20 31 2e 32 20 61 6e 64 20 65 61 72 (TLS 1.2 and ear
1980: 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a lier only)</dd>.
1990: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
19a0: 6f 6e 67 3e 2d 63 69 70 68 65 72 73 75 69 74 65 ong>-ciphersuite
19b0: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 s</strong> <em>s
19c0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
19d0: 20 20 20 20 20 20 20 20 3c 64 64 3e 4c 69 73 74 <dd>List
19e0: 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 of cipher suite
19f0: 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69 6e 67 s to use. String
1a00: 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22 is a colon (":"
1a10: 29 0a 09 20 20 20 20 73 65 70 61 72 61 74 65 64 ).. separated
1a20: 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 list of cipher
1a30: 73 75 69 74 65 20 6e 61 6d 65 73 2e 20 28 54 4c suite names. (TL
1a40: 53 20 31 2e 33 20 6f 6e 6c 79 29 3c 2f 64 64 3e S 1.3 only)</dd>
1a50: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
1a60: 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 rong>-command</s
1a70: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 trong> <em>callb
1a80: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ack</em></dt>.
1a90: 20 20 20 20 20 20 3c 64 64 3e 43 61 6c 6c 62 61 <dd>Callba
1aa0: 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 61 74 20 ck to invoke at
1ab0: 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 several points d
1ac0: 75 72 69 6e 67 20 74 68 65 20 68 61 6e 64 73 68 uring the handsh
1ad0: 61 6b 65 2e 0a 09 20 20 20 20 54 68 69 73 20 69 ake... This i
1ae0: 73 20 75 73 65 64 20 74 6f 20 70 61 73 73 20 65 s used to pass e
1af0: 72 72 6f 72 73 20 61 6e 64 20 74 72 61 63 69 6e rrors and tracin
1b00: 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 g information, a
1b10: 6e 64 0a 09 20 20 20 20 69 74 20 63 61 6e 20 61 nd.. it can a
1b20: 6c 6c 6f 77 20 54 63 6c 20 73 63 72 69 70 74 73 llow Tcl scripts
1b30: 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 69 to perform thei
1b40: 72 20 6f 77 6e 20 63 65 72 74 69 66 69 63 61 74 r own certificat
1b50: 65 0a 09 20 20 20 20 76 61 6c 69 64 61 74 69 6f e.. validatio
1b60: 6e 20 69 6e 20 70 6c 61 63 65 20 6f 66 20 74 68 n in place of th
1b70: 65 20 64 65 66 61 75 6c 74 20 76 61 6c 69 64 61 e default valida
1b80: 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 62 79 tion provided by
1b90: 0a 09 20 20 20 20 4f 70 65 6e 53 53 4c 2e 20 53 .. OpenSSL. S
1ba0: 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c ee <a href="#CAL
1bb0: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 LBACK OPTIONS">C
1bc0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c ALLBACK OPTIONS<
1bd0: 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 72 /a>.. for fur
1be0: 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e ther discussion.
1bf0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
1c00: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68 70 61 72 t><strong>-dhpar
1c10: 61 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d ams </strong><em
1c20: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f >filename</em></
1c30: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e dt>. <dd>
1c40: 53 70 65 63 69 66 79 20 74 68 65 20 44 69 66 66 Specify the Diff
1c50: 69 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 6d ie-Hellman param
1c60: 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 3e eters file.</dd>
1c70: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
1c80: 72 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f 73 rong>-keyfile</s
1c90: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e trong> <em>filen
1ca0: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ame</em></dt>.
1cb0: 20 20 20 20 20 20 3c 64 64 3e 53 70 65 63 69 66 <dd>Specif
1cc0: 79 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 y the private ke
1cd0: 79 20 66 69 6c 65 2e 20 28 64 65 66 61 75 6c 74 y file. (default
1ce0: 20 69 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 is.
1cf0: 76 61 6c 75 65 20 6f 66 20 2d 63 65 72 74 66 69 value of -certfi
1d00: 6c 65 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 le)</dd>.
1d10: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 <dt><strong>-ke
1d20: 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 y</strong> <em>f
1d30: 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 ilename</em></dt
1d40: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70 >. <dd>Sp
1d50: 65 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74 ecify the privat
1d60: 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73 20 e key to use as
1d70: 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 76 61 a DER encoded va
1d80: 6c 75 65 20 28 50 4b 43 53 23 31 20 44 45 52 29 lue (PKCS#1 DER)
1d90: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
1da0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6d 6f 64 65 6c t><strong>-model
1db0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
1dc0: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a annel</em></dt>.
1dd0: 20 20 20 20 20 20 20 20 3c 64 64 3e 46 6f 72 63 <dd>Forc
1de0: 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 e this channel t
1df0: 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 6d 65 o share the same
1e00: 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c <em><strong>SSL
1e10: 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65 _CTX</strong></e
1e20: 6d 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 m>. s
1e30: 74 72 75 63 74 75 72 65 20 61 73 20 74 68 65 20 tructure as the
1e40: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 68 specified <em>ch
1e50: 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 6e 64 0a annel</em>, and.
1e60: 20 20 20 20 20 20 20 20 20 20 20 20 74 68 65 72 ther
1e70: 65 66 6f 72 65 20 73 68 61 72 65 20 63 61 6c 6c efore share call
1e80: 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 3e 0a backs etc.</dd>.
1e90: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
1ea0: 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 ong>-password</s
1eb0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 trong> <em>callb
1ec0: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ack</em></dt>.
1ed0: 20 20 20 20 20 20 3c 64 64 3e 43 61 6c 6c 62 61 <dd>Callba
1ee0: 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 77 68 65 ck to invoke whe
1ef0: 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 20 n OpenSSL needs
1f00: 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73 to obtain a pass
1f10: 77 6f 72 64 2c 0a 09 20 20 20 20 74 79 70 69 63 word,.. typic
1f20: 61 6c 6c 79 20 74 6f 20 75 6e 6c 6f 63 6b 20 74 ally to unlock t
1f30: 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 6f he private key o
1f40: 66 20 61 20 63 65 72 74 69 66 69 63 61 74 65 2e f a certificate.
1f50: 20 54 68 65 0a 20 20 20 20 20 20 20 20 20 20 20 The.
1f60: 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 callback should
1f70: 20 72 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 return a string
1f80: 20 77 68 69 63 68 20 72 65 70 72 65 73 65 6e 74 which represent
1f90: 73 20 74 68 65 20 70 61 73 73 77 6f 72 64 0a 20 s the password.
1fa0: 20 20 20 20 20 20 20 20 20 20 20 74 6f 20 62 65 to be
1fb0: 20 75 73 65 64 2e 20 53 65 65 20 3c 61 20 68 72 used. See <a hr
1fc0: 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 ef="#CALLBACK OP
1fd0: 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 TIONS">CALLBACK
1fe0: 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 OPTIONS</a>..
1ff0: 20 66 6f 72 20 66 75 72 74 68 65 72 20 64 69 73 for further dis
2000: 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c cussion.</dd>..<
2010: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 6f 73 74 dt><strong>-post
2020: 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f _handshake</stro
2030: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
2040: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 6c 6c 6f ></dt>..<dd>Allo
2050: 77 20 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 w post-handshake
2060: 20 74 69 63 6b 65 74 20 75 70 64 61 74 65 73 2e ticket updates.
2070: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
2080: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 t><strong>-reque
2090: 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e st </strong><em>
20a0: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 bool</em></dt>.
20b0: 20 20 20 20 20 20 20 3c 64 64 3e 52 65 71 75 65 <dd>Reque
20c0: 73 74 20 61 20 63 65 72 74 69 66 69 63 61 74 65 st a certificate
20d0: 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e from peer durin
20e0: 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e g SSL handshake.
20f0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 28 64 65 . (de
2100: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 fault is <em>tru
2110: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 e</em>)</dd>.
2120: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
2130: 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74 72 6f 6e >-require</stron
2140: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e g> <em>bool</em>
2150: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
2160: 64 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c 69 d>Require a vali
2170: 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66 72 d certificate fr
2180: 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67 20 53 om peer during S
2190: 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 SL handshake...
21a0: 20 20 20 49 66 20 74 68 69 73 20 69 73 20 73 65 If this is se
21b0: 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 t to true, then
21c0: 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 <strong>-request
21d0: 3c 2f 73 74 72 6f 6e 67 3e 20 6d 75 73 74 0a 20 </strong> must.
21e0: 20 20 20 20 20 20 20 20 20 20 20 61 6c 73 6f 20 also
21f0: 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 2e 20 be set to true.
2200: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
2210: 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e false</em>)</dd>
2220: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
2230: 72 6f 6e 67 3e 2d 73 65 63 75 72 69 74 79 6c 65 rong>-securityle
2240: 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d vel</strong> <em
2250: 3e 69 6e 74 65 67 65 72 3c 2f 65 6d 3e 3c 2f 64 >integer</em></d
2260: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 t>. <dd>S
2270: 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 et security leve
2280: 6c 2e 20 4d 75 73 74 20 62 65 20 30 20 74 6f 20 l. Must be 0 to
2290: 35 2e 20 54 68 65 20 73 65 63 75 72 69 74 79 20 5. The security
22a0: 6c 65 76 65 6c 20 61 66 66 65 63 74 73 0a 09 20 level affects..
22b0: 20 20 20 63 69 70 68 65 72 20 73 75 69 74 65 20 cipher suite
22c0: 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c 67 6f 72 encryption algor
22d0: 69 74 68 6d 73 2c 20 73 75 70 70 6f 72 74 65 64 ithms, supported
22e0: 20 45 43 43 20 63 75 72 76 65 73 2c 0a 09 20 20 ECC curves,..
22f0: 20 20 73 75 70 70 6f 72 74 65 64 20 73 69 67 6e supported sign
2300: 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 ature algorithms
2310: 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72 20 73 , DH parameter s
2320: 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63 61 74 izes, certificat
2330: 65 0a 09 20 20 20 20 6b 65 79 20 73 69 7a 65 73 e.. key sizes
2340: 20 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61 and signature a
2350: 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64 lgorithms. The d
2360: 65 66 61 75 6c 74 20 69 73 20 31 2e 0a 09 20 20 efault is 1...
2370: 20 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 69 Level 3 and hi
2380: 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75 70 gher disable sup
2390: 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f 6e port for session
23a0: 20 74 69 63 6b 65 74 73 20 61 6e 64 20 6f 6e 6c tickets and onl
23b0: 79 0a 09 20 20 20 20 61 63 63 65 70 74 20 63 69 y.. accept ci
23c0: 70 68 65 72 20 73 75 69 74 65 73 20 74 68 61 74 pher suites that
23d0: 20 70 72 6f 76 69 64 65 20 66 6f 72 77 61 72 64 provide forward
23e0: 20 73 65 63 72 65 63 79 2e 3c 2f 64 64 3e 0a 20 secrecy.</dd>.
23f0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
2400: 6e 67 3e 2d 73 65 72 76 65 72 3c 2f 73 74 72 6f ng>-server</stro
2410: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
2420: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
2430: 64 64 3e 48 61 6e 64 73 68 61 6b 65 20 61 73 20 dd>Handshake as
2440: 73 65 72 76 65 72 20 69 66 20 74 72 75 65 2c 20 server if true,
2450: 65 6c 73 65 20 68 61 6e 64 73 68 61 6b 65 20 61 else handshake a
2460: 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 6c s. cl
2470: 69 65 6e 74 2e 20 28 64 65 66 61 75 6c 74 20 69 ient. (default i
2480: 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e s <em>false</em>
2490: 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c )</dd>. <
24a0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 dt><strong>-serv
24b0: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 ername</strong>
24c0: 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c 2f 64 <em>host</em></d
24d0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 t>. <dd>S
24e0: 70 65 63 69 66 79 20 73 65 72 76 65 72 20 68 6f pecify server ho
24f0: 73 74 6e 61 6d 65 2e 20 4f 6e 6c 79 20 61 76 61 stname. Only ava
2500: 69 6c 61 62 6c 65 20 69 66 20 74 68 65 20 4f 70 ilable if the Op
2510: 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 0a 09 20 enSSL library..
2520: 20 20 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 the package i
2530: 73 20 6c 69 6e 6b 65 64 20 61 67 61 69 6e 73 74 s linked against
2540: 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 54 4c supports the TL
2550: 53 20 68 6f 73 74 6e 61 6d 65 20 65 78 74 65 6e S hostname exten
2560: 73 69 6f 6e 0a 09 20 20 20 20 66 6f 72 20 27 53 sion.. for 'S
2570: 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 erver Name Indic
2580: 61 74 69 6f 6e 27 20 28 53 4e 49 29 2e 20 55 73 ation' (SNI). Us
2590: 65 20 74 6f 20 6e 61 6d 65 20 74 68 65 20 6c 6f e to name the lo
25a0: 67 69 63 61 6c 20 68 6f 73 74 0a 09 20 20 20 20 gical host..
25b0: 77 65 20 61 72 65 20 74 61 6c 6b 69 6e 67 20 74 we are talking t
25c0: 6f 20 61 6e 64 20 65 78 70 65 63 74 69 6e 67 20 o and expecting
25d0: 61 20 63 65 72 74 69 66 69 63 61 74 65 20 66 6f a certificate fo
25e0: 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 r.</dd>.
25f0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 73 <dt><strong>-ses
2600: 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e sion_id</strong>
2610: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e <em>string</em>
2620: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
2630: 64 3e 53 65 73 73 69 6f 6e 20 69 64 20 74 6f 20 d>Session id to
2640: 72 65 73 75 6d 65 20 73 65 73 73 69 6f 6e 2e 3c resume session.<
2650: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
2660: 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f ><strong>-ssl2</
2670: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c strong> <em>bool
2680: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
2690: 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 <dd>Enable us
26a0: 65 20 6f 66 20 53 53 4c 20 76 32 2e 20 28 64 65 e of SSL v2. (de
26b0: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c fault is <em>fal
26c0: 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 se</em>)</dd>.
26d0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
26e0: 67 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 g>-ssl3 </strong
26f0: 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f ><em>bool</em></
2700: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e dt>. <dd>
2710: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 Enable use of SS
2720: 4c 20 76 33 2e 20 28 64 65 66 61 75 6c 74 20 69 L v3. (default i
2730: 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e s <em>false</em>
2740: 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c )</dd>. <
2750: 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 dt>-<strong>tls1
2760: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
2770: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 ol</em></dt>.
2780: 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 <dd>Enable
2790: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 20 28 use of TLS v1. (
27a0: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 default is <em>t
27b0: 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 rue</em>)</dd>.
27c0: 20 20 20 20 20 20 20 3c 64 74 3e 2d 3c 73 74 72 <dt>-<str
27d0: 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73 74 72 6f ong>tls1.1</stro
27e0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
27f0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
2800: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 dd>Enable use of
2810: 20 54 4c 53 20 76 31 2e 31 20 28 64 65 66 61 75 TLS v1.1 (defau
2820: 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f lt is <em>true</
2830: 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 em>)</dd>.
2840: 20 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 <dt>-<strong>t
2850: 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c ls1.2</strong> <
2860: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 em>bool</em></dt
2870: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 45 6e >. <dd>En
2880: 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 able use of TLS
2890: 76 31 2e 32 20 28 64 65 66 61 75 6c 74 20 69 73 v1.2 (default is
28a0: 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c <em>true</em>)<
28b0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
28c0: 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 33 >-<strong>tls1.3
28d0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
28e0: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 ol</em></dt>.
28f0: 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 <dd>Enable
2900: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 20 use of TLS v1.3
2910: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
2920: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a true</em>)</dd>.
2930: 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 </dl>.</bloc
2940: 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 kquote>.. <dt
2950: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 75 ><a name="tls::u
2960: 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a nimport"><b>tls:
2970: 3a 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69 :unimport </b><i
2980: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e >channel</i></a>
2990: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 50 72 </dt>. <dd>Pr
29a0: 6f 76 69 64 65 64 20 66 6f 72 20 73 79 6d 6d 65 ovided for symme
29b0: 74 72 79 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 74 try to <strong>t
29c0: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f ls::import</stro
29d0: 6e 67 3e 2c 20 74 68 69 73 0a 20 20 20 20 20 20 ng>, this.
29e0: 75 6e 73 74 61 63 6b 73 20 74 68 65 20 53 53 4c unstacks the SSL
29f0: 2d 65 6e 61 62 6c 69 6e 67 20 6f 66 20 61 20 72 -enabling of a r
2a00: 65 67 75 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e egular Tcl chann
2a10: 65 6c 2e 20 20 41 6e 20 65 72 72 6f 72 0a 20 20 el. An error.
2a20: 20 20 20 20 69 73 20 74 68 72 6f 77 6e 20 69 66 is thrown if
2a30: 20 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 20 TLS is not the
2a40: 74 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 6e top stacked chan
2a50: 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 64 3e 0a 20 nel type.</dd>.
2a60: 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 <dt> </d
2a70: 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 t>. <dt><a na
2a80: 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 73 68 61 me="tls::handsha
2a90: 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a ke"><strong>tls:
2aa0: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f :handshake</stro
2ab0: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c ng> <em>channel<
2ac0: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 /em></a></dt>.
2ad0: 20 20 3c 64 64 3e 46 6f 72 63 65 73 20 68 61 6e <dd>Forces han
2ae0: 64 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 20 70 dshake to take p
2af0: 6c 61 63 65 2c 20 61 6e 64 20 72 65 74 75 72 6e lace, and return
2b00: 73 20 30 20 69 66 0a 20 20 20 20 20 20 20 20 68 s 0 if. h
2b10: 61 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c andshake is stil
2b20: 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e l in progress (n
2b30: 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 on-blocking), or
2b40: 20 31 20 69 66 0a 20 20 20 20 20 20 20 20 74 68 1 if. th
2b50: 65 20 68 61 6e 64 73 68 61 6b 65 20 77 61 73 20 e handshake was
2b60: 73 75 63 63 65 73 73 66 75 6c 2e 20 49 66 20 74 successful. If t
2b70: 68 65 20 68 61 6e 64 73 68 61 6b 65 20 66 61 69 he handshake fai
2b80: 6c 65 64 0a 20 20 20 20 20 20 20 20 74 68 69 73 led. this
2b90: 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 74 68 routine will th
2ba0: 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e 3c 2f 64 row an error.</d
2bb0: 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 d>. <dt> 
2bc0: 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c ;</dt>. <dt><
2bd0: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 74 61 a name="tls::sta
2be0: 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 tus"><strong>tls
2bf0: 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 ::status</strong
2c00: 3e 0a 20 20 20 20 3c 65 6d 3e 3f 2d 6c 6f 63 61 >. <em>?-loca
2c10: 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c l? channel</em><
2c20: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
2c30: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 72 >Returns the cur
2c40: 72 65 6e 74 20 63 65 72 74 69 66 69 63 61 74 65 rent certificate
2c50: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53 status of an SS
2c60: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 0a 20 L channel. The.
2c70: 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 69 73 result is
2c80: 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 a list of key-v
2c90: 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 63 72 alue pairs descr
2ca0: 69 62 69 6e 67 20 74 68 65 0a 20 20 20 20 20 20 ibing the.
2cb0: 20 20 63 6f 6e 6e 65 63 74 65 64 20 70 65 65 72 connected peer
2cc0: 2e 20 49 66 20 74 68 65 20 72 65 73 75 6c 74 20 . If the result
2cd0: 69 73 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 74 is an empty list
2ce0: 20 74 68 65 6e 20 74 68 65 0a 20 20 20 20 20 20 then the.
2cf0: 20 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 SSL handshake
2d00: 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70 has not yet comp
2d10: 6c 65 74 65 64 2e 0a 20 20 20 20 20 20 20 20 49 leted.. I
2d20: 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f 65 6d f <em>-local</em
2d30: 3e 20 69 73 20 67 69 76 65 6e 2c 20 74 68 65 6e > is given, then
2d40: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
2d50: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a 20 20 20 information.
2d60: 20 20 20 20 20 69 73 20 74 68 65 20 6f 6e 65 20 is the one
2d70: 75 73 65 64 20 6c 6f 63 61 6c 6c 79 2e 3c 2f 64 used locally.</d
2d80: 64 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e d>..<blockquote>
2d90: 0a 20 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20 . <dl>.
2da0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 <dt><strong>ve
2db0: 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c rsion</strong> <
2dc0: 65 6d 3e 76 61 6c 75 65 3c 2f 65 6d 3e 3c 2f 64 em>value</em></d
2dd0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 t>. <dd>T
2de0: 68 65 20 63 65 72 74 69 66 69 63 61 74 69 6f 6e he certification
2df0: 20 76 65 72 73 69 6f 6e 3c 2f 64 64 3e 0a 20 20 version</dd>.
2e00: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
2e10: 67 3e 73 69 67 6e 61 74 75 72 65 5f 61 6c 67 6f g>signature_algo
2e20: 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c rithm</strong> <
2e30: 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d em>algorithm</em
2e40: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
2e50: 64 64 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 dd>Cipher algori
2e60: 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 thm used for cer
2e70: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
2e80: 72 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 re.</dd>.
2e90: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 64 69 67 <dt><strong>dig
2ea0: 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d est</strong> <em
2eb0: 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 >version</em></d
2ec0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 43 t>. <dd>C
2ed0: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
2ee0: 74 75 72 65 20 64 69 67 65 73 74 2e 3c 2f 64 64 ture digest.</dd
2ef0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
2f00: 74 72 6f 6e 67 3e 70 75 62 6c 69 63 5f 6b 65 79 trong>public_key
2f10: 5f 61 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f _algorithm</stro
2f20: 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 ng> <em>algorith
2f30: 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 m</em></dt>.
2f40: 20 20 20 20 3c 64 64 3e 43 65 72 74 69 66 69 63 <dd>Certific
2f50: 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 ate signature pu
2f60: 62 6c 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 blic key algorit
2f70: 68 6d 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 hm.</dd>.
2f80: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74 <dt><strong>bit
2f90: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e s</strong> <em>n
2fa0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
2fb0: 20 20 20 3c 64 64 3e 4e 75 6d 62 65 72 20 6f 66 <dd>Number of
2fc0: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 bits used for c
2fd0: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
2fe0: 74 75 72 65 20 6b 65 79 3c 2f 64 64 3e 0a 20 20 ture key</dd>.
2ff0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
3000: 67 3e 73 65 6c 66 5f 73 69 67 6e 65 64 3c 2f 73 g>self_signed</s
3010: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 trong> <em>boole
3020: 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 an</em></dt>.
3030: 20 20 20 20 20 3c 64 64 3e 49 73 20 63 65 72 74 <dd>Is cert
3040: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 ificate signatur
3050: 65 20 73 65 6c 66 20 73 69 67 6e 65 64 2e 3c 2f e self signed.</
3060: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dd>. <dt>
3070: 3c 73 74 72 6f 6e 67 3e 73 68 61 31 5f 68 61 73 <strong>sha1_has
3080: 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 h</strong> <em>h
3090: 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ash</em></dt>.
30a0: 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 53 48 <dd>The SH
30b0: 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 A1 hash of the c
30c0: 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e ertificate.</dd>
30d0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
30e0: 72 6f 6e 67 3e 73 68 61 32 35 36 5f 68 61 73 68 rong>sha256_hash
30f0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61 </strong> <em>ha
3100: 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 sh</em></dt>.
3110: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 53 48 41 <dd>The SHA
3120: 32 35 36 20 68 61 73 68 20 6f 66 20 74 68 65 20 256 hash of the
3130: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 certificate.</dd
3140: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
3150: 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 3c 2f 73 trong>subject</s
3160: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 trong> <em>dn</e
3170: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
3180: 3c 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 <dd>The distingu
3190: 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 ished name (DN)
31a0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
31b0: 74 65 20 73 75 62 6a 65 63 74 2e 3c 2f 64 64 3e te subject.</dd>
31c0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
31d0: 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73 74 72 rong>issuer</str
31e0: 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e ong> <em>dn</em>
31f0: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
3200: 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 d>The distinguis
3210: 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 hed name (DN) of
3220: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
3230: 20 69 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 20 20 issuer.</dd>.
3240: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
3250: 67 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72 g>notBefore</str
3260: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 ong> <em>date</e
3270: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
3280: 3c 64 64 3e 54 68 65 20 62 65 67 69 6e 20 64 61 <dd>The begin da
3290: 74 65 20 66 6f 72 20 74 68 65 20 76 61 6c 69 64 te for the valid
32a0: 69 74 79 20 6f 66 20 74 68 65 20 63 65 72 74 69 ity of the certi
32b0: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 ficate.</dd>.
32c0: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
32d0: 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72 6f 6e >notAfter</stron
32e0: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e g> <em>date</em>
32f0: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
3300: 64 3e 54 68 65 20 65 78 70 69 72 79 20 64 61 74 d>The expiry dat
3310: 65 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 e for the certif
3320: 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 icate.</dd>.
3330: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
3340: 73 65 72 69 61 6c 3c 2f 73 74 72 6f 6e 67 3e 20 serial</strong>
3350: 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a <em>n</em></dt>.
3360: 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 <dd>The
3370: 73 65 72 69 61 6c 20 6e 75 6d 62 65 72 20 6f 66 serial number of
3380: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
3390: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
33a0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 65 72 74 69 dt><strong>certi
33b0: 66 69 63 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 ficate</strong>
33c0: 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 3c 2f 64 <em>cert</em></d
33d0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 t>. <dd>T
33e0: 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 he PEM encoded c
33f0: 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e ertificate.</dd>
3400: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
3410: 72 6f 6e 67 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 rong>num_extensi
3420: 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ons</strong> <em
3430: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 >n</em></dt>.
3440: 20 20 20 20 20 3c 64 64 3e 4e 75 6d 62 65 72 20 <dd>Number
3450: 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 65 of certificate e
3460: 78 74 65 6e 73 69 6f 6e 73 2e 3c 2f 64 64 3e 0a xtensions.</dd>.
3470: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
3480: 6f 6e 67 3e 65 78 74 65 6e 73 69 6f 6e 73 3c 2f ong>extensions</
3490: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 strong> <em>list
34a0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
34b0: 20 20 20 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 <dd>List of c
34c0: 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e ertificate exten
34d0: 73 69 6f 6e 20 6e 61 6d 65 73 2e 3c 2f 64 64 3e sion names.</dd>
34e0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
34f0: 72 6f 6e 67 3e 70 65 65 72 6e 61 6d 65 3c 2f 73 rong>peername</s
3500: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c trong> <em>name<
3510: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
3520: 20 20 3c 64 64 3e 54 68 65 20 70 65 65 72 6e 61 <dd>The peerna
3530: 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 72 74 me from the cert
3540: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 ificate.</dd>.
3550: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
3560: 67 3e 73 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e g>sbits</strong>
3570: 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e <em>n</em></dt>
3580: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 . <dd>The
3590: 20 6e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 20 number of bits
35a0: 75 73 65 64 20 66 6f 72 20 74 68 65 20 73 65 73 used for the ses
35b0: 73 69 6f 6e 20 6b 65 79 2e 3c 2f 64 64 3e 0a 20 sion key.</dd>.
35c0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
35d0: 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e ng>cipher</stron
35e0: 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 g> <em>cipher</e
35f0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
3600: 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74 20 <dd>The current
3610: 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 62 65 cipher in use be
3620: 74 77 65 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 tween the client
3630: 20 61 6e 64 0a 20 20 20 20 20 20 20 20 20 20 20 and.
3640: 20 73 65 72 76 65 72 20 63 68 61 6e 6e 65 6c 73 server channels
3650: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
3660: 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 dt><strong>verif
3670: 69 63 61 74 69 6f 6e 3c 65 6d 3e 72 65 73 75 6c ication<em>resul
3680: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 t</em></dt>.
3690: 20 20 20 20 3c 64 64 3e 43 65 72 74 69 66 69 63 <dd>Certific
36a0: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e ate verification
36b0: 20 72 65 73 75 6c 74 2e 3c 2f 64 64 3e 0a 20 20 result.</dd>.
36c0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
36d0: 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 g>alpn</strong>
36e0: 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d <em>protocol</em
36f0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
3700: 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 dd>The protocol
3710: 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 selected after A
3720: 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 pplication-Layer
3730: 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 4e Protocol.. N
3740: 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e egotiation (ALPN
3750: 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 ).</dd>.
3760: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 <dt><strong>prot
3770: 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ocol</strong> <e
3780: 6d 3e 76 61 6c 75 65 3c 2f 65 6d 3e 3c 2f 64 74 m>value</em></dt
3790: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 >. <dd>Th
37a0: 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 e protocol versi
37b0: 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 on used for the
37c0: 63 6f 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 53 connection:.. S
37d0: 53 4c 76 32 2c 20 53 53 4c 76 33 2c 20 54 4c 53 SLv2, SSLv3, TLS
37e0: 76 31 2c 20 54 4c 53 76 31 2e 31 2c 20 54 4c 53 v1, TLSv1.1, TLS
37f0: 76 31 2e 32 2c 20 54 4c 53 76 31 2e 33 2c 20 6f v1.2, TLSv1.3, o
3800: 72 20 75 6e 6b 6e 6f 77 6e 3c 2f 64 64 3e 0a 20 r unknown</dd>.
3810: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
3820: 6e 67 3e 73 69 67 6e 61 74 75 72 65 5f 68 61 73 ng>signature_has
3830: 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 h</strong> <em>s
3840: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
3850: 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 <dd>The
3860: 73 69 67 6e 61 74 75 72 65 20 68 61 73 68 20 76 signature hash v
3870: 61 6c 75 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 alue.</dd>.
3880: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 <dt><strong>s
3890: 69 67 6e 61 74 75 72 65 5f 74 79 70 65 3c 2f 73 ignature_type</s
38a0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79 70 65 3c trong> <em>type<
38b0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
38c0: 20 20 3c 64 64 3e 54 68 65 20 73 69 67 6e 61 74 <dd>The signat
38d0: 75 72 65 20 74 79 70 65 20 76 61 6c 75 65 2e 3c ure type value.<
38e0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
38f0: 3e 3c 73 74 72 6f 6e 67 3e 63 61 5f 6e 61 6d 65 ><strong>ca_name
3900: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c s</strong> <em>l
3910: 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ist</em></dt>.
3920: 20 20 20 20 20 20 3c 64 64 3e 4c 69 73 74 20 6f <dd>List o
3930: 66 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 f the Certificat
3940: 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 75 73 e Authorities us
3950: 65 64 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 ed to create the
3960: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
3970: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 d>. </dl>.</b
3980: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 lockquote>..
3990: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
39a0: 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 73 ::connection"><s
39b0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 trong>tls::conne
39c0: 63 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 0a 20 ction</strong>.
39d0: 20 20 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f <em>channel</
39e0: 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 em></a></dt>.
39f0: 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 <dd>Returns the
3a00: 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 current connect
3a10: 69 6f 6e 20 73 74 61 74 75 73 20 6f 66 20 61 6e ion status of an
3a20: 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 SSL channel. Th
3a30: 65 0a 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 e. result
3a40: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 is a list of ke
3a50: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 y-value pairs de
3a60: 73 63 72 69 62 69 6e 67 20 74 68 65 0a 20 20 20 scribing the.
3a70: 20 20 20 20 20 63 6f 6e 6e 65 63 74 65 64 20 70 connected p
3a80: 65 65 72 2e 3c 2f 64 64 3e 0a 0a 3c 62 6c 6f 63 eer.</dd>..<bloc
3a90: 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e kquote>. <dl>
3aa0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
3ab0: 72 6f 6e 67 3e 73 74 61 74 65 3c 2f 73 74 72 6f rong>state</stro
3ac0: 6e 67 3e 20 3c 65 6d 3e 73 74 61 74 65 3c 2f 65 ng> <em>state</e
3ad0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
3ae0: 3c 64 64 3e 53 74 61 74 65 20 6f 66 20 74 68 65 <dd>State of the
3af0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 connection.</dd
3b00: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
3b10: 74 72 6f 6e 67 3e 73 65 72 76 65 72 6e 61 6d 65 trong>servername
3b20: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 </strong> <em>na
3b30: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 me</em></dt>.
3b40: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 6e 61 6d <dd>The nam
3b50: 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 e of the connect
3b60: 65 64 20 74 6f 20 73 65 72 76 65 72 2e 3c 2f 64 ed to server.</d
3b70: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
3b80: 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c strong>protocol<
3b90: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 /strong> <em>ver
3ba0: 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 sion</em></dt>.
3bb0: 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 70 <dd>The p
3bc0: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 rotocol version
3bd0: 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e used for the con
3be0: 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 53 53 nection:.. SS
3bf0: 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 L2, SSL3, TLS1,
3c00: 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 TLS1.1, TLS1.2,
3c10: 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f TLS1.3, or unkno
3c20: 77 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 wn.</dd>.
3c30: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 65 6e <dt><strong>ren
3c40: 65 67 6f 74 69 61 74 69 6f 6e 3c 2f 73 74 72 6f egotiation</stro
3c50: 6e 67 3e 20 3c 65 6d 3e 73 74 61 74 65 3c 2f 65 ng> <em>state</e
3c60: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
3c70: 3c 64 64 3e 57 68 65 74 68 65 72 20 70 72 6f 74 <dd>Whether prot
3c80: 6f 63 6f 6c 20 72 65 6e 65 67 6f 74 69 61 74 69 ocol renegotiati
3c90: 6f 6e 20 69 73 20 61 6c 6c 6f 77 65 64 20 6f 72 on is allowed or
3ca0: 20 64 69 73 61 6c 6c 6f 77 65 64 2e 3c 2f 64 64 disallowed.</dd
3cb0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
3cc0: 74 72 6f 6e 67 3e 73 65 63 75 72 69 74 79 6c 65 trong>securityle
3cd0: 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d vel</strong> <em
3ce0: 3e 6c 65 76 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e >level</em></dt>
3cf0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 . <dd>The
3d00: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 security level
3d10: 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74 69 used for selecti
3d20: 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20 6b on of ciphers, k
3d30: 65 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f 64 ey size, etc.</d
3d40: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
3d50: 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 72 strong>session_r
3d60: 65 75 73 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c eused</strong> <
3d70: 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c em>boolean</em><
3d80: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
3d90: 3e 57 68 65 74 68 65 72 20 74 68 65 20 73 65 73 >Whether the ses
3da0: 73 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 72 65 sion has been re
3db0: 75 73 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 used or not.</dd
3dc0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
3dd0: 74 72 6f 6e 67 3e 69 73 5f 73 65 72 76 65 72 3c trong>is_server<
3de0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
3df0: 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 lean</em></dt>.
3e00: 20 20 20 20 20 20 20 3c 64 64 3e 57 68 65 74 68 <dd>Wheth
3e10: 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f er the connectio
3e20: 6e 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 n configured as
3e30: 61 20 73 65 72 76 65 72 20 6f 72 20 63 6c 69 65 a server or clie
3e40: 6e 74 20 28 66 61 6c 73 65 29 2e 3c 2f 64 64 3e nt (false).</dd>
3e50: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
3e60: 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 rong>cipher</str
3e70: 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c ong> <em>cipher<
3e80: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
3e90: 20 20 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e <dd>The curren
3ea0: 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 t cipher in use
3eb0: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
3ec0: 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 on.</dd>.
3ed0: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 <dt><strong>sta
3ee0: 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f 73 74 72 6f ndard_name</stro
3ef0: 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d ng> <em>name</em
3f00: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
3f10: 64 64 3e 54 68 65 20 73 74 61 6e 64 61 72 64 20 dd>The standard
3f20: 52 46 43 20 6e 61 6d 65 20 6f 66 20 63 69 70 68 RFC name of ciph
3f30: 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 er.</dd>.
3f40: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74 <dt><strong>bit
3f50: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e s</strong> <em>n
3f60: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
3f70: 20 20 20 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 <dd>The numbe
3f80: 72 20 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 r of processed b
3f90: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 its used for cip
3fa0: 68 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 her.</dd>.
3fb0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 <dt><strong>se
3fc0: 63 72 65 74 5f 62 69 74 73 3c 2f 73 74 72 6f 6e cret_bits</stron
3fd0: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 g> <em>n</em></d
3fe0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 t>. <dd>T
3ff0: 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 he number of sec
4000: 72 65 74 20 62 69 74 73 20 75 73 65 64 20 66 6f ret bits used fo
4010: 72 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 r cipher.</dd>.
4020: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
4030: 6e 67 3e 6d 69 6e 5f 76 65 72 73 69 6f 6e 3c 2f ng>min_version</
4040: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 strong> <em>vers
4050: 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ion</em></dt>.
4060: 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 6d 69 <dd>The mi
4070: 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 nimum protocol v
4080: 65 72 73 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 ersion for ciphe
4090: 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 r.</dd>.
40a0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 64 3c 2f <dt><strong>id</
40b0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69 64 3c 2f strong> <em>id</
40c0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
40d0: 20 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 4c <dd>The OpenSSL
40e0: 20 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 3e cipher id.</dd>
40f0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
4100: 72 6f 6e 67 3e 64 65 73 63 72 69 70 74 69 6f 6e rong>description
4110: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 </strong> <em>st
4120: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 ring</em></dt>.
4130: 20 20 20 20 20 20 20 3c 64 64 3e 41 20 74 65 78 <dd>A tex
4140: 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 t description of
4150: 20 74 68 65 20 63 69 70 68 65 72 2e 3c 2f 64 64 the cipher.</dd
4160: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
4170: 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f trong>alpn</stro
4180: 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c ng> <em>protocol
4190: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
41a0: 20 20 20 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f <dd>The proto
41b0: 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 col selected aft
41c0: 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c er Application-L
41d0: 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 ayer Protocol..
41e0: 20 20 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 Negotiation (
41f0: 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 ALPN).</dd>.
4200: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
4210: 72 65 73 75 6d 61 62 6c 65 3c 2f 73 74 72 6f 6e resumable</stron
4220: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f g> <em>boolean</
4230: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
4240: 20 3c 64 64 3e 43 61 6e 20 74 68 65 20 73 65 73 <dd>Can the ses
4250: 73 69 6f 6e 20 62 65 20 72 65 73 75 6d 65 64 20 sion be resumed
4260: 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 20 20 20 or not.</dd>.
4270: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
4280: 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f 73 74 72 >start_time</str
4290: 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64 73 ong> <em>seconds
42a0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
42b0: 20 20 20 3c 64 64 3e 54 69 6d 65 20 73 69 6e 63 <dd>Time sinc
42c0: 65 20 73 65 73 73 69 6f 6e 20 73 74 61 72 74 65 e session starte
42d0: 64 20 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 6e d in seconds sin
42e0: 63 65 20 65 70 6f 63 68 2e 3c 2f 64 64 3e 0a 20 ce epoch.</dd>.
42f0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
4300: 6e 67 3e 74 69 6d 65 6f 75 74 3c 2f 73 74 72 6f ng>timeout</stro
4310: 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64 73 3c ng> <em>seconds<
4320: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
4330: 20 20 3c 64 64 3e 4d 61 78 20 64 75 72 61 74 69 <dd>Max durati
4340: 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e on of session in
4350: 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 seconds before
4360: 74 69 6d 65 2d 6f 75 74 2e 3c 2f 64 64 3e 0a 20 time-out.</dd>.
4370: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
4380: 6e 67 3e 6c 69 66 65 74 69 6d 65 3c 2f 73 74 72 ng>lifetime</str
4390: 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64 73 ong> <em>seconds
43a0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
43b0: 20 20 20 3c 64 64 3e 53 65 73 73 69 6f 6e 20 74 <dd>Session t
43c0: 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 68 icket lifetime h
43d0: 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c int in seconds.<
43e0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
43f0: 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e ><strong>session
4400: 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d _id</strong> <em
4410: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 >string</em></dt
4420: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 55 6e >. <dd>Un
4430: 69 71 75 65 20 73 65 73 73 69 6f 6e 20 69 64 20 ique session id
4440: 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d for use in resum
4450: 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e ing the session.
4460: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
4470: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f t><strong>sessio
4480: 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 n_ticket</strong
4490: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
44a0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
44b0: 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f dd>Unique sessio
44c0: 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73 65 n ticket for use
44d0: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 in resuming the
44e0: 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 session.</dd>.
44f0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
4500: 6e 67 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 ng>ticket_app_da
4510: 74 61 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ta</strong> <em>
4520: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e string</em></dt>
4530: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 55 6e 69 . <dd>Uni
4540: 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b que session tick
4550: 65 74 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 et application d
4560: 61 74 61 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 ata.</dd>.
4570: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6d 61 <dt><strong>ma
4580: 73 74 65 72 5f 6b 65 79 3c 2f 73 74 72 6f 6e 67 ster_key</strong
4590: 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 74 72 > <em>binary_str
45a0: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ing</em></dt>.
45b0: 20 20 20 20 20 20 3c 64 64 3e 55 6e 69 71 75 65 <dd>Unique
45c0: 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 session master
45d0: 6b 65 79 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 key.</dd>.
45e0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 6f <dt><strong>co
45f0: 6d 70 72 65 73 73 69 6f 6e 3c 2f 73 74 72 6f 6e mpression</stron
4600: 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e g> <em>mode</em>
4610: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
4620: 64 3e 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 d>Compression me
4630: 74 68 6f 64 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 thod.</dd>.
4640: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 65 <dt><strong>e
4650: 78 70 61 6e 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 xpansion</strong
4660: 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c > <em>mode</em><
4670: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
4680: 3e 45 78 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f >Expansion metho
4690: 64 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 d.</dd>.
46a0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 <dt><strong>sess
46b0: 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f 64 65 3c 2f ion_cache_mode</
46c0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 strong> <em>mode
46d0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
46e0: 20 20 20 3c 64 64 3e 53 65 72 76 65 72 20 63 61 <dd>Server ca
46f0: 63 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e 74 che mode (client
4700: 2c 20 73 65 72 76 65 72 2c 20 6f 72 20 62 6f 74 , server, or bot
4710: 68 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 h).</dd>. </d
4720: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e l>.</blockquote>
4730: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d .. <dt><a nam
4740: 65 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 22 e="tls::ciphers"
4750: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 ><strong>tls::ci
4760: 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 20 0a phers</strong> .
4770: 20 20 20 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c <em>protocol
4780: 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 ?verbose? ?supp
4790: 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 61 3e 3c orted?</em></a><
47a0: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 /dt>. <dd>Ret
47b0: 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 73 urns a list of s
47c0: 75 70 70 6f 72 74 65 64 20 63 69 70 68 65 72 73 upported ciphers
47d0: 20 61 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 3c available for <
47e0: 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e em>protocol</em>
47f0: 2c 0a 20 20 20 20 20 20 20 20 77 68 65 72 65 20 ,. where
4800: 70 72 6f 74 6f 63 6f 6c 20 6d 75 73 74 20 62 65 protocol must be
4810: 20 6f 6e 65 20 6f 66 20 3c 62 3e 73 73 6c 32 2c one of <b>ssl2,
4820: 20 73 73 6c 33 2c 20 74 6c 73 31 2c 20 74 6c 73 ssl3, tls1, tls
4830: 31 2e 31 2c 0a 09 74 6c 73 31 2e 32 2c 3c 2f 62 1.1,..tls1.2,</b
4840: 3e 20 6f 72 20 3c 62 3e 74 6c 73 31 2e 33 3c 2f > or <b>tls1.3</
4850: 62 3e 2e 20 49 66 20 3c 65 6d 3e 76 65 72 62 6f b>. If <em>verbo
4860: 73 65 3c 2f 65 6d 3e 20 69 73 20 73 70 65 63 69 se</em> is speci
4870: 66 69 65 64 20 61 73 0a 09 74 72 75 65 20 74 68 fied as..true th
4880: 65 6e 20 61 20 76 65 72 62 6f 73 65 2c 20 68 75 en a verbose, hu
4890: 6d 61 6e 20 72 65 61 64 61 62 6c 65 20 6c 69 73 man readable lis
48a0: 74 20 69 73 20 72 65 74 75 72 6e 65 64 20 77 69 t is returned wi
48b0: 74 68 0a 09 61 64 64 69 74 69 6f 6e 61 6c 20 69 th..additional i
48c0: 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 nformation on th
48d0: 65 20 63 69 70 68 65 72 2e 20 49 66 20 3c 65 6d e cipher. If <em
48e0: 3e 73 75 70 70 6f 72 74 65 64 3c 2f 65 6d 3e 0a >supported</em>.
48f0: 09 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73 .is specified as
4900: 20 74 72 75 65 2c 20 74 68 65 6e 20 6f 6e 6c 79 true, then only
4910: 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 70 the ciphers sup
4920: 70 6f 72 74 65 64 20 66 6f 72 20 70 72 6f 74 6f ported for proto
4930: 63 6f 6c 0a 09 77 69 6c 6c 20 62 65 20 6c 69 73 col..will be lis
4940: 74 65 64 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c ted.</dd>.. <
4950: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
4960: 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e 3c 73 74 72 :protocols"><str
4970: 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f ong>tls::protoco
4980: 6c 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c ls</strong></a><
4990: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 /dt>. <dd>Ret
49a0: 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 73 urns a list of s
49b0: 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 6f upported protoco
49c0: 6c 73 2e 20 56 61 6c 69 64 20 76 61 6c 75 65 73 ls. Valid values
49d0: 20 61 72 65 3a 0a 09 3c 62 3e 73 73 6c 32 3c 2f are:..<b>ssl2</
49e0: 62 3e 2c 20 3c 62 3e 73 73 6c 33 3c 2f 62 3e 2c b>, <b>ssl3</b>,
49f0: 20 3c 62 3e 74 6c 73 31 3c 2f 62 3e 2c 20 3c 62 <b>tls1</b>, <b
4a00: 3e 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20 3c 62 3e >tls1.1</b>, <b>
4a10: 74 6c 73 31 2e 32 3c 2f 62 3e 2c 0a 09 61 6e 64 tls1.2</b>,..and
4a20: 20 3c 62 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 <b>tls1.3</b>.
4a30: 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 65 6e Exact list depen
4a40: 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76 65 ds on OpenSSL ve
4a50: 72 73 69 6f 6e 20 61 6e 64 0a 09 63 6f 6d 70 69 rsion and..compi
4a60: 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 2e 3c 2f le time flags.</
4a70: 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 dd>.. <dt><a
4a80: 6e 61 6d 65 3d 22 74 6c 73 3a 3a 76 65 72 73 69 name="tls::versi
4a90: 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a on"><strong>tls:
4aa0: 3a 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 :version</strong
4ab0: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c ></a></dt>. <
4ac0: 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 4f dd>Returns the O
4ad0: 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 73 penSSL version s
4ae0: 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c tring.</dd>.</dl
4af0: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
4b00: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
4b10: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f ">CALLBACK OPTIO
4b20: 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e NS</a></h3>..<p>
4b30: 0a 41 73 20 69 6e 64 69 63 61 74 65 64 20 61 62 .As indicated ab
4b40: 6f 76 65 2c 20 69 6e 64 69 76 69 64 75 61 6c 20 ove, individual
4b50: 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20 62 65 20 channels can be
4b60: 67 69 76 65 6e 20 74 68 65 69 72 20 6f 77 6e 20 given their own
4b70: 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 6e callbacks.to han
4b80: 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 74 65 dle intermediate
4b90: 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 74 processing by t
4ba0: 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 he OpenSSL libra
4bb0: 72 79 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c 65 ry, using the.<e
4bc0: 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 m>-command</em>
4bd0: 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 73 77 6f 72 and <em>-passwor
4be0: 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 73 20 70 d</em> options p
4bf0: 61 73 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 assed to either
4c00: 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a of.<strong>tls::
4c10: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 socket</strong>
4c20: 6f 72 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a or <strong>tls::
4c30: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 2e import</strong>.
4c40: 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f .</p>..<blockquo
4c50: 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 te>.<dl>.. <d
4c60: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 t><strong>-comma
4c70: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e nd</strong> <em>
4c80: 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 callback</em></d
4c90: 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 t>. <dd>..Inv
4ca0: 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 69 okes the specifi
4cb0: 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c ed <em>callback<
4cc0: 2f 65 6d 3e 20 73 63 72 69 70 74 20 61 74 0a 09 /em> script at..
4cd0: 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 several points d
4ce0: 75 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 53 uring the OpenSS
4cf0: 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 45 78 L handshake...Ex
4d00: 63 65 70 74 20 61 73 20 69 6e 64 69 63 61 74 65 cept as indicate
4d10: 64 20 62 65 6c 6f 77 2c 20 76 61 6c 75 65 73 20 d below, values
4d20: 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 returned from th
4d30: 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61 72 65 20 e..callback are
4d40: 69 67 6e 6f 72 65 64 2e 0a 09 41 72 67 75 6d 65 ignored...Argume
4d50: 6e 74 73 20 61 70 70 65 6e 64 65 64 20 74 6f 20 nts appended to
4d60: 74 68 65 20 73 63 72 69 70 74 20 75 70 6f 6e 20 the script upon
4d70: 63 61 6c 6c 62 61 63 6b 20 74 61 6b 65 20 6f 6e callback take on
4d80: 65 20 6f 66 20 74 68 65 0a 09 66 6f 6c 6c 6f 77 e of the..follow
4d90: 69 6e 67 20 66 6f 72 6d 73 3a 0a 0a 09 3c 62 72 ing forms:...<br
4da0: 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a >..<br>...<dl>..
4db0: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 .<dt>.. <strong
4dc0: 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c >alpn</strong> <
4dd0: 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e em>protocol</em>
4de0: 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 ..</dt>..<dd>..
4df0: 20 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 For servers, th
4e00: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 is form of callb
4e10: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 ack is invoked w
4e20: 68 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 hen the client A
4e30: 4c 50 4e 0a 09 20 20 68 65 61 64 65 72 20 69 73 LPN.. header is
4e40: 20 72 65 63 65 69 76 65 64 20 61 6e 64 20 74 68 received and th
4e50: 65 20 66 69 72 73 74 20 2d 61 6c 70 6e 20 73 70 e first -alpn sp
4e60: 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c ecified protocol
4e70: 20 63 6f 6d 6d 6f 6e 20 74 6f 0a 09 20 20 74 68 common to.. th
4e80: 65 20 62 6f 74 68 20 74 68 65 20 63 6c 69 65 6e e both the clien
4e90: 74 20 61 6e 64 20 73 65 72 76 65 72 20 69 73 20 t and server is
4ea0: 73 65 6c 65 63 74 65 64 2e 20 49 66 20 6e 6f 6e selected. If non
4eb0: 65 2c 20 74 68 65 20 66 69 72 73 74 0a 09 20 20 e, the first..
4ec0: 63 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65 64 client specified
4ed0: 20 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65 protocol is use
4ee0: 64 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e d...</dd>...<br>
4ef0: 0a 0a 3c 21 2d 2d 09 54 68 69 73 20 66 6f 72 6d ..<!--.This form
4f00: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
4f10: 64 69 73 61 62 6c 65 64 2e 0a 0a 09 3c 64 74 3e disabled....<dt>
4f20: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 65 72 72 6f .. <strong>erro
4f30: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 r</strong> <em>c
4f40: 68 61 6e 6e 65 6c 20 6d 65 73 73 61 67 65 3c 2f hannel message</
4f50: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e em>..</dt>..<dd>
4f60: 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 .. The <em>mess
4f70: 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e age</em> argumen
4f80: 74 20 63 6f 6e 74 61 69 6e 73 20 61 6e 20 65 72 t contains an er
4f90: 72 6f 72 20 6d 65 73 73 61 67 65 20 67 65 6e 65 ror message gene
4fa0: 72 61 74 65 64 0a 09 20 20 62 79 20 74 68 65 20 rated.. by the
4fb0: 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e OpenSSL function
4fc0: 0a 09 20 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65 .. <code>ERR_re
4fd0: 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e ason_error_strin
4fe0: 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f 64 g()</code>...</d
4ff0: 64 3e 0a 0a 09 3c 62 72 3e 0a 2d 2d 3e 0a 0a 09 d>...<br>.-->...
5000: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e <dt>.. <strong>
5010: 68 65 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c hello</strong> <
5020: 65 6d 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 em>servername</e
5030: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a m>..</dt>..<dd>.
5040: 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c 20 . For servers,
5050: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c this form of cal
5060: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 lback is invoked
5070: 20 64 75 72 69 6e 67 20 63 6c 69 65 6e 74 20 68 during client h
5080: 65 6c 6c 6f 0a 09 20 20 6d 65 73 73 61 67 65 20 ello.. message
5090: 70 72 6f 63 65 73 73 69 6e 67 2e 0a 09 3c 2f 64 processing...</d
50a0: 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e d>...<br>...<dt>
50b0: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e 66 6f .. <strong>info
50c0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
50d0: 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 6e 6f annel major mino
50e0: 72 20 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 r message</em>..
50f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 </dt>..<dd>.. T
5100: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c his form of call
5110: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 back is invoked
5120: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 by the OpenSSL f
5130: 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 unction.. <code
5140: 3e 53 53 4c 5f 43 54 58 5f 73 65 74 5f 69 6e 66 >SSL_CTX_set_inf
5150: 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 63 6f o_callback()</co
5160: 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 de>... <br>..
5170: 54 68 65 20 3c 65 6d 3e 6d 61 6a 6f 72 3c 2f 65 The <em>major</e
5180: 6d 3e 20 61 6e 64 20 3c 65 6d 3e 6d 69 6e 6f 72 m> and <em>minor
5190: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 73 20 </em> arguments
51a0: 61 72 65 20 75 73 65 64 20 74 6f 0a 09 20 20 72 are used to.. r
51b0: 65 70 72 65 73 65 6e 74 20 74 68 65 20 73 74 61 epresent the sta
51c0: 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 62 te information b
51d0: 69 74 6d 61 73 6b 2e 0a 09 20 20 3c 64 6c 3e 0a itmask... <dl>.
51e0: 09 20 20 3c 64 74 3e 50 6f 73 73 69 62 6c 65 20 . <dt>Possible
51f0: 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d values for <em>m
5200: 61 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 3c 2f ajor</em> are:</
5210: 64 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 6f 64 65 dt>.. <dd><code
5220: 3e 68 61 6e 64 73 68 61 6b 65 2c 20 61 6c 65 72 >handshake, aler
5230: 74 2c 20 63 6f 6e 6e 65 63 74 2c 20 61 63 63 65 t, connect, acce
5240: 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 64 3e 0a pt</code>.</dd>.
5250: 09 20 20 3c 64 74 3e 50 6f 73 73 69 62 6c 65 20 . <dt>Possible
5260: 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d values for <em>m
5270: 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 3c 2f inor</em> are:</
5280: 64 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 6f 64 65 dt>.. <dd><code
5290: 3e 73 74 61 72 74 2c 20 64 6f 6e 65 2c 20 72 65 >start, done, re
52a0: 61 64 2c 20 77 72 69 74 65 2c 20 6c 6f 6f 70 2c ad, write, loop,
52b0: 20 65 78 69 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 exit</code>.</d
52c0: 64 3e 0a 09 20 20 3c 2f 64 6c 3e 0a 09 20 20 54 d>.. </dl>.. T
52d0: 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f he <em>message</
52e0: 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 em> argument is
52f0: 61 20 64 65 73 63 72 69 70 74 69 76 65 20 73 74 a descriptive st
5300: 72 69 6e 67 20 77 68 69 63 68 20 6d 61 79 0a 09 ring which may..
5310: 20 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 65 be generated e
5320: 69 74 68 65 72 20 62 79 0a 09 20 20 3c 63 6f 64 ither by.. <cod
5330: 65 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 72 69 e>SSL_state_stri
5340: 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e ng_long()</code>
5350: 20 6f 72 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e or by.. <code>
5360: 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f 73 SSL_alert_desc_s
5370: 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f tring_long()</co
5380: 64 65 3e 2c 0a 09 20 20 64 65 70 65 6e 64 69 6e de>,.. dependin
5390: 67 20 6f 6e 20 63 6f 6e 74 65 78 74 2e 0a 09 3c g on context...<
53a0: 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 /dd>...<br>...<d
53b0: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 73 65 t>.. <strong>se
53c0: 73 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c ssion</strong> <
53d0: 65 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 20 74 69 em>session_id ti
53e0: 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f 65 cket lifetime</e
53f0: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a m>..</dt>..<dd>.
5400: 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 . This form of
5410: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
5420: 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 ked by the OpenS
5430: 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c SL function.. <
5440: 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 73 code>SSL_CTX_ses
5450: 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f s_set_new_cb()</
5460: 63 6f 64 65 3e 2e 0a 09 20 20 57 68 65 72 65 20 code>... Where
5470: 3c 65 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f <em>session_id</
5480: 65 6d 3e 20 69 73 20 74 68 65 20 63 75 72 72 65 em> is the curre
5490: 6e 74 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 nt session ident
54a0: 69 66 69 65 72 2c 0a 09 20 20 3c 65 6d 3e 74 69 ifier,.. <em>ti
54b0: 63 6b 65 74 3c 2f 65 6d 3e 20 69 73 20 74 68 65 cket</em> is the
54c0: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 session ticket
54d0: 69 6e 66 6f 2c 20 61 6e 64 20 3c 65 6d 3e 6c 69 info, and <em>li
54e0: 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 20 20 69 fetime</em>.. i
54f0: 73 20 74 68 65 20 74 68 65 20 74 69 63 6b 65 74 s the the ticket
5500: 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 73 65 63 lifetime in sec
5510: 6f 6e 64 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c onds...</dd>...<
5520: 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 br>...<dt>.. <s
5530: 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73 74 72 6f 6e trong>sni</stron
5540: 67 3e 20 3c 65 6d 3e 73 65 72 76 65 72 6e 61 6d g> <em>servernam
5550: 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c e</em>..</dt>..<
5560: 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 65 dd>.. For serve
5570: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 rs, this form of
5580: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
5590: 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 53 4e oked when the SN
55a0: 49 20 68 65 61 64 65 72 0a 09 20 20 66 72 6f 6d I header.. from
55b0: 20 74 68 65 20 63 6c 69 65 6e 74 20 69 73 20 72 the client is r
55c0: 65 63 65 69 76 65 64 2e 20 57 68 65 72 65 20 3c eceived. Where <
55d0: 69 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69 3e i>servername</i>
55e0: 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 09 is the client..
55f0: 20 20 73 70 65 63 69 66 69 65 64 20 73 65 72 76 specified serv
5600: 65 72 6e 61 6d 65 2e 20 54 68 69 73 20 69 73 20 ername. This is
5610: 75 73 65 64 20 77 68 65 6e 20 61 20 73 65 72 76 used when a serv
5620: 65 72 20 73 75 70 70 6f 72 74 73 20 6d 75 6c 74 er supports mult
5630: 69 70 6c 65 0a 09 20 20 6e 61 6d 65 73 2c 20 73 iple.. names, s
5640: 6f 20 74 68 65 20 72 69 67 68 74 20 63 65 72 74 o the right cert
5650: 69 66 69 63 61 74 65 20 63 61 6e 20 62 65 20 75 ificate can be u
5660: 73 65 64 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 sed...</dd>...<b
5670: 72 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a r>..<br>...<dt>.
5680: 09 20 20 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 . <strong>verif
5690: 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 y</strong> <em>c
56a0: 68 61 6e 6e 65 6c 20 64 65 70 74 68 20 63 65 72 hannel depth cer
56b0: 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 3c 2f t status error</
56c0: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e em>..</dt>..<dd>
56d0: 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 .. This form of
56e0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
56f0: 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 oked by OpenSSL
5700: 77 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69 when a new certi
5710: 66 69 63 61 74 65 0a 09 20 20 69 73 20 72 65 63 ficate.. is rec
5720: 65 69 76 65 64 20 66 72 6f 6d 20 74 68 65 20 70 eived from the p
5730: 65 65 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 eer. It allows t
5740: 68 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 he client to che
5750: 63 6b 20 74 68 65 0a 09 20 20 63 65 72 74 69 66 ck the.. certif
5760: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 icate verificati
5770: 6f 6e 20 72 65 73 75 6c 74 20 61 6e 64 20 63 68 on result and ch
5780: 6f 6f 73 65 20 77 68 65 74 68 65 72 20 74 6f 20 oose whether to
5790: 63 6f 6e 74 69 6e 75 65 20 6f 72 20 6e 6f 74 2e continue or not.
57a0: 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 .. <br>.. The
57b0: 3c 65 6d 3e 64 65 70 74 68 3c 2f 65 6d 3e 20 61 <em>depth</em> a
57c0: 72 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 69 6e rgument is an in
57d0: 74 65 67 65 72 20 72 65 70 72 65 73 65 6e 74 69 teger representi
57e0: 6e 67 20 74 68 65 0a 09 20 20 63 75 72 72 65 6e ng the.. curren
57f0: 74 20 64 65 70 74 68 20 6f 6e 20 74 68 65 20 63 t depth on the c
5800: 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e ertificate chain
5810: 2c 20 77 69 74 68 0a 09 20 20 3c 63 6f 64 65 3e , with.. <code>
5820: 30 3c 2f 63 6f 64 65 3e 20 61 73 20 74 68 65 20 0</code> as the
5830: 73 75 62 6a 65 63 74 20 63 65 72 74 69 66 69 63 subject certific
5840: 61 74 65 20 61 6e 64 20 68 69 67 68 65 72 20 76 ate and higher v
5850: 61 6c 75 65 73 0a 09 20 20 64 65 6e 6f 74 69 6e alues.. denotin
5860: 67 20 70 72 6f 67 72 65 73 73 69 76 65 6c 79 20 g progressively
5870: 6d 6f 72 65 20 69 6e 64 69 72 65 63 74 20 69 73 more indirect is
5880: 73 75 65 72 20 63 65 72 74 69 66 69 63 61 74 65 suer certificate
5890: 73 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 s... <br>.. Th
58a0: 65 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 20 e <em>cert</em>
58b0: 61 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 argument is a li
58c0: 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 st of key-value
58d0: 70 61 69 72 73 20 73 69 6d 69 6c 61 72 0a 09 20 pairs similar..
58e0: 20 74 6f 20 74 68 6f 73 65 20 72 65 74 75 72 6e to those return
58f0: 65 64 20 62 79 0a 09 20 20 3c 61 20 68 72 65 66 ed by.. <a href
5900: 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e ="#tls::status">
5910: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 <strong>tls::sta
5920: 74 75 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e tus</strong></a>
5930: 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 ... <br>.. The
5940: 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e <em>status</em>
5950: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 argument is an
5960: 69 6e 74 65 67 65 72 20 72 65 70 72 65 73 65 6e integer represen
5970: 74 69 6e 67 20 74 68 65 0a 09 20 20 63 75 72 72 ting the.. curr
5980: 65 6e 74 20 76 61 6c 69 64 69 74 79 20 6f 66 20 ent validity of
5990: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e the certificate.
59a0: 0a 09 20 20 41 20 76 61 6c 75 65 20 6f 66 20 3c .. A value of <
59b0: 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65 code>0</code> me
59c0: 61 6e 73 20 74 68 65 20 63 65 72 74 69 66 69 63 ans the certific
59d0: 61 74 65 20 69 73 20 64 65 65 6d 65 64 20 69 6e ate is deemed in
59e0: 76 61 6c 69 64 2e 0a 09 20 20 41 20 76 61 6c 75 valid... A valu
59f0: 65 20 6f 66 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f e of <code>1</co
5a00: 64 65 3e 20 6d 65 61 6e 73 20 74 68 65 20 63 65 de> means the ce
5a10: 72 74 69 66 69 63 61 74 65 20 69 73 20 64 65 65 rtificate is dee
5a20: 6d 65 64 20 76 61 6c 69 64 2e 0a 09 20 20 3c 62 med valid... <b
5a30: 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 65 72 r>.. The <em>er
5a40: 72 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e ror</em> argumen
5a50: 74 20 73 75 70 70 6c 69 65 73 20 74 68 65 20 6d t supplies the m
5a60: 65 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 essage, if any,
5a70: 67 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 0a generated.. by.
5a80: 09 20 20 3c 63 6f 64 65 3e 58 35 30 39 5f 53 54 . <code>X509_ST
5a90: 4f 52 45 5f 43 54 58 5f 67 65 74 5f 65 72 72 6f ORE_CTX_get_erro
5aa0: 72 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c r()</code>... <
5ab0: 62 72 3e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54 br>.. <br>.. T
5ac0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 6d 61 79 20 he callback may
5ad0: 6f 76 65 72 72 69 64 65 20 6e 6f 72 6d 61 6c 20 override normal
5ae0: 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 63 65 validation proce
5af0: 73 73 69 6e 67 20 62 79 20 65 78 70 6c 69 63 69 ssing by explici
5b00: 74 6c 79 0a 09 20 20 72 65 74 75 72 6e 69 6e 67 tly.. returning
5b10: 20 6f 6e 65 20 6f 66 20 74 68 65 20 61 62 6f 76 one of the abov
5b20: 65 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f 65 6d e <em>status</em
5b30: 3e 20 76 61 6c 75 65 73 2e 0a 09 3c 2f 64 64 3e > values...</dd>
5b40: 0a 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 ...</dl>. </d
5b50: 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 20 20 d>.. <br>..
5b60: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 <dt><strong>-p
5b70: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e assword</strong>
5b80: 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 <em>callback</e
5b90: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e m></dt>. <dd>
5ba0: 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 ..Invokes the sp
5bb0: 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c ecified <em>call
5bc0: 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 back</em> script
5bd0: 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 when OpenSSL ne
5be0: 65 64 73 20 74 6f 0a 09 6f 62 74 61 69 6e 20 61 eds to..obtain a
5bf0: 20 70 61 73 73 77 6f 72 64 2e 20 20 54 68 65 20 password. The
5c00: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 callback should
5c10: 72 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20 return a string
5c20: 77 68 69 63 68 0a 09 72 65 70 72 65 73 65 6e 74 which..represent
5c30: 73 20 74 68 65 20 70 61 73 73 77 6f 72 64 20 74 s the password t
5c40: 6f 20 62 65 20 75 73 65 64 2e 0a 09 4e 6f 20 61 o be used...No a
5c50: 72 67 75 6d 65 6e 74 73 20 61 72 65 20 61 70 70 rguments are app
5c60: 65 6e 64 65 64 20 74 6f 20 74 68 65 20 73 63 72 ended to the scr
5c70: 69 70 74 20 75 70 6f 6e 20 63 61 6c 6c 62 61 63 ipt upon callbac
5c80: 6b 2e 0a 20 20 20 20 3c 2f 64 64 3e 0a 3c 2f 64 k.. </dd>.</d
5c90: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e l>.</blockquote>
5ca0: 0a 0a 3c 70 3e 0a 52 65 66 65 72 65 6e 63 65 20 ..<p>.Reference
5cb0: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 implementations
5cc0: 6f 66 20 74 68 65 73 65 20 63 61 6c 6c 62 61 63 of these callbac
5cd0: 6b 73 20 61 72 65 20 70 72 6f 76 69 64 65 64 20 ks are provided
5ce0: 69 6e 20 74 68 65 0a 64 69 73 74 72 69 62 75 74 in the.distribut
5cf0: 69 6f 6e 20 61 73 20 3c 73 74 72 6f 6e 67 3e 74 ion as <strong>t
5d00: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 ls::callback</st
5d10: 72 6f 6e 67 3e 20 61 6e 64 0a 3c 73 74 72 6f 6e rong> and.<stron
5d20: 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c g>tls::password<
5d30: 2f 73 74 72 6f 6e 67 3e 20 72 65 73 70 65 63 74 /strong> respect
5d40: 69 76 65 6c 79 2e 20 20 4e 6f 74 65 20 74 68 61 ively. Note tha
5d50: 74 20 74 68 65 73 65 20 61 72 65 0a 3c 65 6d 3e t these are.<em>
5d60: 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c sample</em> impl
5d70: 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 ementations only
5d80: 2e 20 20 49 6e 20 61 20 6d 6f 72 65 20 72 65 61 . In a more rea
5d90: 6c 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e listic deploymen
5da0: 74 0a 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 t.you would spec
5db0: 69 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c ify your own cal
5dc0: 6c 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e lback scripts on
5dd0: 20 65 61 63 68 20 54 4c 53 20 63 68 61 6e 6e 65 each TLS channe
5de0: 6c 0a 75 73 69 6e 67 20 74 68 65 20 3c 65 6d 3e l.using the <em>
5df0: 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 61 6e -command</em> an
5e00: 64 20 3c 65 6d 3e 2d 70 61 73 73 77 6f 72 64 3c d <em>-password<
5e10: 2f 65 6d 3e 20 6f 70 74 69 6f 6e 73 2e 0a 3c 2f /em> options..</
5e20: 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 64 65 66 61 p>..<p>.The defa
5e30: 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 ult behavior whe
5e40: 6e 20 74 68 65 20 3c 65 6d 3e 2d 63 6f 6d 6d 61 n the <em>-comma
5e50: 6e 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 20 69 nd</em> option i
5e60: 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 20 s not specified
5e70: 69 73 20 66 6f 72 0a 54 4c 53 20 74 6f 20 70 72 is for.TLS to pr
5e80: 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 ocess the associ
5e90: 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c ated library cal
5ea0: 6c 62 61 63 6b 73 20 69 6e 74 65 72 6e 61 6c 6c lbacks internall
5eb0: 79 2e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 62 y..The default b
5ec0: 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 ehavior when the
5ed0: 20 3c 65 6d 3e 2d 70 61 73 73 77 6f 72 64 3c 2f <em>-password</
5ee0: 65 6d 3e 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f em> option is no
5ef0: 74 20 73 70 65 63 69 66 69 65 64 20 69 73 20 66 t specified is f
5f00: 6f 72 0a 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 or.TLS to proces
5f10: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 s the associated
5f20: 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 library callbac
5f30: 6b 73 20 62 79 20 61 74 74 65 6d 70 74 69 6e 67 ks by attempting
5f40: 20 74 6f 20 63 61 6c 6c 0a 3c 73 74 72 6f 6e 67 to call.<strong
5f50: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f >tls::password</
5f60: 73 74 72 6f 6e 67 3e 2e 0a 54 68 65 20 64 69 66 strong>..The dif
5f70: 66 65 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 ference between
5f80: 74 68 65 73 65 20 74 77 6f 20 62 65 68 61 76 69 these two behavi
5f90: 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 ors is a consequ
5fa0: 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e ence of maintain
5fb0: 69 6e 67 0a 63 6f 6d 70 61 74 69 62 69 6c 69 74 ing.compatibilit
5fc0: 79 20 77 69 74 68 20 65 61 72 6c 69 65 72 20 69 y with earlier i
5fd0: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a mplementations..
5fe0: 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 </p>..<p>.The <s
5ff0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 trong>tls::debug
6000: 3c 2f 73 74 72 6f 6e 67 3e 20 76 61 72 69 61 62 </strong> variab
6010: 6c 65 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 le provides some
6020: 20 61 64 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 additional.cont
6030: 72 6f 6c 20 6f 76 65 72 20 74 68 65 73 65 20 72 rol over these r
6040: 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 eference callbac
6050: 6b 73 2e 20 20 49 74 73 20 76 61 6c 75 65 20 69 ks. Its value i
6060: 73 20 7a 65 72 6f 20 62 79 20 64 65 66 61 75 6c s zero by defaul
6070: 74 2e 0a 48 69 67 68 65 72 20 76 61 6c 75 65 73 t..Higher values
6080: 20 70 72 6f 64 75 63 65 20 6d 6f 72 65 20 64 69 produce more di
6090: 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 2c agnostic output,
60a0: 20 61 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 and will also f
60b0: 6f 72 63 65 20 74 68 65 0a 76 65 72 69 66 79 20 orce the.verify
60c0: 6d 65 74 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e method in <stron
60d0: 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c g>tls::callback<
60e0: 2f 73 74 72 6f 6e 67 3e 20 74 6f 20 61 63 63 65 /strong> to acce
60f0: 70 74 20 74 68 65 0a 63 65 72 74 69 66 69 63 61 pt the.certifica
6100: 74 65 2c 20 65 76 65 6e 20 77 68 65 6e 20 69 74 te, even when it
6110: 20 69 73 20 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 is invalid..</p
6120: 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 >..<p>.<em>.The
6130: 75 73 65 20 6f 66 20 74 68 65 20 72 65 66 65 72 use of the refer
6140: 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c ence callbacks <
6150: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c strong>tls::call
6160: 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e back</strong> an
6170: 64 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 d.<strong>tls::p
6180: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e assword</strong>
6190: 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e is not recommen
61a0: 64 65 64 2e 20 20 54 68 65 79 20 6d 61 79 20 62 ded. They may b
61b0: 65 20 72 65 6d 6f 76 65 64 0a 66 72 6f 6d 20 66 e removed.from f
61c0: 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e 0a uture releases..
61d0: 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a </em>.</p>..<p>.
61e0: 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 6f 66 20 <em>.The use of
61f0: 74 68 65 20 76 61 72 69 61 62 6c 65 20 3c 73 74 the variable <st
6200: 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c rong>tls::debug<
6210: 2f 73 74 72 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 /strong> is not
6220: 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 recommended..It
6230: 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 may be removed f
6240: 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 rom future relea
6250: 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a ses..</em>.</p>.
6260: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 .<h3><a name="DE
6270: 42 55 47 22 3e 44 45 42 55 47 3c 2f 61 3e 3c 2f BUG">DEBUG</a></
6280: 68 33 3e 0a 0a 54 4c 53 20 6b 65 79 20 6c 6f 67 h3>..TLS key log
6290: 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 62 ging can be enab
62a0: 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67 20 74 led by setting t
62b0: 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 he environment v
62c0: 61 72 69 61 62 6c 65 0a 3c 62 3e 53 53 4c 4b 45 ariable.<b>SSLKE
62d0: 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 6f 20 YLOGFILE</b> to
62e0: 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 the name of the
62f0: 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 2e 20 file to log to.
6300: 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 54 4c Then whenever TL
6310: 53 0a 6b 65 79 20 6d 61 74 65 72 69 61 6c 20 69 S.key material i
6320: 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 20 72 s generated or r
6330: 65 63 65 69 76 65 64 20 69 74 20 77 69 6c 6c 20 eceived it will
6340: 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 68 65 be logged to the
6350: 20 66 69 6c 65 2e 0a 0a 3c 68 33 3e 3c 61 20 6e file...<h3><a n
6360: 61 6d 65 3d 22 48 54 54 50 53 20 45 58 41 4d 50 ame="HTTPS EXAMP
6370: 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c LE">HTTPS EXAMPL
6380: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 E</a></h3>..<p>T
6390: 68 69 73 20 65 78 61 6d 70 6c 65 20 75 73 65 73 his example uses
63a0: 20 61 20 73 61 6d 70 6c 65 20 73 65 72 76 65 72 a sample server
63b0: 2e 70 65 6d 20 70 72 6f 76 69 64 65 64 20 77 69 .pem provided wi
63c0: 74 68 20 74 68 65 20 54 4c 53 20 72 65 6c 65 61 th the TLS relea
63d0: 73 65 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 20 se,.courtesy of
63e0: 74 68 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e the <strong>Open
63f0: 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 6f SSL</strong> pro
6400: 6a 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e ject.</p>..<pre>
6410: 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 <code>.package r
6420: 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b equire http.pack
6430: 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a age require tls.
6440: 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 .http::register
6450: 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 https 443 [list
6460: 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 ::tls::socket -a
6470: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 72 utoservername tr
6480: 75 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 65 ue -require true
6490: 20 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 6c -cadir /etc/ssl
64a0: 2f 63 65 72 74 73 5d 0a 0a 73 65 74 20 74 6f 6b /certs]..set tok
64b0: 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 68 [http::geturl h
64c0: 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 ttps://www.tcl.t
64d0: 6b 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 k/].</code></pre
64e0: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
64f0: 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 SPECIAL CONSIDER
6500: 41 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c 20 ATIONS">SPECIAL
6510: 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f CONSIDERATIONS</
6520: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 20 a></h3>..<p>The
6530: 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 capabilities of
6540: 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e this package can
6550: 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 vary enormously
6560: 20 62 61 73 65 64 0a 75 70 6f 6e 20 68 6f 77 20 based.upon how
6570: 79 6f 75 72 20 4f 70 65 6e 53 53 4c 20 6c 69 62 your OpenSSL lib
6580: 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75 rary was configu
6590: 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 41 red and built. A
65a0: 74 20 74 68 65 0a 6d 6f 73 74 20 6d 61 63 72 6f t the.most macro
65b0: 2d 6c 65 76 65 6c 20 4f 70 65 6e 53 53 4c 20 73 -level OpenSSL s
65c0: 75 70 70 6f 72 74 73 20 61 20 26 71 75 6f 74 3b upports a "
65d0: 6e 6f 20 70 61 74 65 6e 74 73 26 71 75 6f 74 3b no patents"
65e0: 20 62 75 69 6c 64 2c 0a 77 68 69 63 68 20 64 69 build,.which di
65f0: 73 61 62 6c 65 73 20 52 53 41 2c 20 49 44 45 41 sables RSA, IDEA
6600: 2c 20 52 43 28 32 2c 34 2c 35 29 20 61 6e 64 20 , RC(2,4,5) and
6610: 53 53 4c 32 20 2d 20 69 66 20 79 6f 75 72 20 4f SSL2 - if your O
6620: 70 65 6e 53 53 4c 20 69 73 0a 63 6f 6e 66 69 67 penSSL is.config
6630: 75 72 65 64 20 74 68 69 73 20 77 61 79 20 74 68 ured this way th
6640: 65 6e 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 en you will need
6650: 20 74 6f 20 62 75 69 6c 64 20 54 4c 53 20 77 69 to build TLS wi
6660: 74 68 20 74 68 65 0a 2d 44 4e 4f 5f 50 41 54 45 th the.-DNO_PATE
6670: 4e 54 53 20 6f 70 74 69 6f 6e 20 2d 20 61 6e 64 NTS option - and
6680: 20 74 68 65 20 72 65 73 75 6c 74 61 6e 74 20 6d the resultant m
6690: 6f 64 75 6c 65 20 77 69 6c 6c 20 66 75 6e 63 74 odule will funct
66a0: 69 6f 6e 0a 63 6f 72 72 65 63 74 6c 79 20 61 6e ion.correctly an
66b0: 64 20 61 6c 73 6f 20 73 75 70 70 6f 72 74 20 41 d also support A
66c0: 44 48 20 63 65 72 74 69 66 69 63 61 74 65 2d 6c DH certificate-l
66d0: 65 73 73 20 65 6e 63 72 79 70 74 69 6f 6e 2c 0a ess encryption,.
66e0: 68 6f 77 65 76 65 72 20 79 6f 75 20 77 69 6c 6c however you will
66f0: 20 62 65 20 75 6e 61 62 6c 65 20 74 6f 20 75 74 be unable to ut
6700: 69 6c 69 7a 65 20 74 68 69 73 20 74 6f 20 73 70 ilize this to sp
6710: 65 61 6b 20 74 6f 20 6e 6f 72 6d 61 6c 20 57 65 eak to normal We
6720: 62 0a 53 65 72 76 65 72 73 2c 20 77 68 69 63 68 b.Servers, which
6730: 20 74 79 70 69 63 61 6c 6c 79 20 72 65 71 75 69 typically requi
6740: 72 65 20 52 53 41 20 73 75 70 70 6f 72 74 2e 20 re RSA support.
6750: 50 6c 65 61 73 65 20 73 65 65 20 3c 61 0a 68 72 Please see <a.hr
6760: 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f ef="http://www.o
6770: 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 68 74 74 penssl.org/">htt
6780: 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e p://www.openssl.
6790: 6f 72 67 2f 3c 2f 61 3e 20 66 6f 72 0a 6d 6f 72 org/</a> for.mor
67a0: 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e e information on
67b0: 20 74 68 65 20 77 68 6f 6c 65 20 69 73 73 75 65 the whole issue
67c0: 20 6f 66 20 70 61 74 65 6e 74 73 20 61 6e 64 20 of patents and
67d0: 55 53 20 65 78 70 6f 72 74 0a 72 65 73 74 72 69 US export.restri
67e0: 63 74 69 6f 6e 73 2e 20 3c 2f 70 3e 0a 0a 3c 68 ctions. </p>..<h
67f0: 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 20 41 3><a name="SEE A
6800: 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61 LSO">SEE ALSO</a
6810: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f ></h3>..<p><stro
6820: 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e ng>socket</stron
6830: 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 6c 65 g>, <strong>file
6840: 65 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67 3e event, </strong>
6850: 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f <a.href="http://
6860: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f www.openssl.org/
6870: 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 "><strong>OpenSS
6880: 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f L</strong></a></
6890: 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a p>..<hr>..<pre>.
68a0: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b Copyright ©
68b0: 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 1999 Matt Newma
68c0: 6e 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f n..Copyright &co
68d0: 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 69 73 py; 2004 Starfis
68e0: 68 20 53 79 73 74 65 6d 73 2e 0a 3c 2f 70 72 65 h Systems..</pre
68f0: 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c >.</body>.</html
6900: 3e 0a >.