Artifact
efffb774bc16d533d983a79c4d4a320020df511b:
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: 20 20 20 20 3c 64 64 3e 3c 73 74 72 6f 6e 67 3e <dd><strong>
0170: 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 2d 20 62 tls</strong> - b
0180: 69 6e 64 69 6e 67 20 74 6f 20 3c 73 74 72 6f 6e inding to <stron
0190: 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e g>OpenSSL</stron
01a0: 67 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 g>.
01b0: 20 20 20 74 6f 6f 6c 6b 69 74 2e 3c 2f 64 64 3e toolkit.</dd>
01c0: 0a 20 20 20 20 20 20 20 20 3c 2f 64 6c 3e 0a 20 . </dl>.
01d0: 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 </dd>. <dd
01e0: 3e 3c 61 20 68 72 65 66 3d 22 23 53 59 4e 4f 50 ><a href="#SYNOP
01f0: 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 SIS">SYNOPSIS</a
0200: 3e 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e > </dd>. <dd>
0210: 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 20 20 20 <dl>.
0220: 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 <dd><b>package
0230: 72 65 71 75 69 72 65 20 54 63 6c 20 3c 2f 62 3e require Tcl </b>
0240: 3c 65 6d 3e 3f 38 2e 32 3f 3c 2f 65 6d 3e 3c 2f <em>?8.2?</em></
0250: 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 dd>.
0260: 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 <dd><b>package r
0270: 65 71 75 69 72 65 20 74 6c 73 20 3c 2f 62 3e 3c equire tls </b><
0280: 65 6d 3e 3f 31 2e 35 3f 3c 2f 65 6d 3e 3c 2f 64 em>?1.5?</em></d
0290: 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c d>. <
02a0: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 dt> </dt>.
02b0: 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c <dd><
02c0: 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e b>tls::init </b>
02d0: 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e <i>?options?</i>
02e0: 20 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 </dd>.
02f0: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 <dd><b>tls::s
0300: 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f ocket </b><em>?o
0310: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 ptions? host por
0320: 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 t</em></dd>.
0330: 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 <dd><b>t
0340: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 ls::socket</b><e
0350: 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d m> ?-server comm
0360: 61 6e 64 3f 0a 20 20 20 20 20 20 20 20 20 20 20 and?.
0370: 20 20 20 20 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 ?options? p
0380: 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 ort</em></dd>.
0390: 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 <dd><b
03a0: 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c >tls::handshake<
03b0: 2f 62 3e 3c 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c /b><em> channel<
03c0: 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 /em></dd>.
03d0: 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 <dd><b>tls
03e0: 3a 3a 73 74 61 74 75 73 20 3c 2f 62 3e 3c 65 6d ::status </b><em
03f0: 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 >?-local? channe
0400: 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 l</em></dd>.
0410: 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 <dd><b>t
0420: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 3c 65 ls::import</b><e
0430: 6d 3e 20 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 m> channel ?opti
0440: 6f 6e 73 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 ons?</em></dd>.
0450: 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c <dd><
0460: 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c b>tls::unimport<
0470: 2f 62 3e 3c 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c /b><em> channel<
0480: 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 /em></dd>.
0490: 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 <dd><b>tls
04a0: 3a 3a 63 69 70 68 65 72 73 20 3c 2f 62 3e 3c 65 ::ciphers </b><e
04b0: 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 m>protocol ?verb
04c0: 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 ose?</em></dd>.
04d0: 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c <dd><
04e0: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f b>tls::version</
04f0: 62 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 b></dd>.
0500: 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a </dl>. </dd>.
0510: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d <dd><a href=
0520: 22 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d "#COMMANDS">COMM
0530: 41 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 ANDS</a></dd>.
0540: 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 <dd><a href="#
0550: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
0560: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f ">CALLBACK OPTIO
0570: 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 NS</a></dd>.
0580: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 <dd><a href="#HT
0590: 54 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 TPS EXAMPLE">HTT
05a0: 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f PS EXAMPLE</a></
05b0: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 dd>. <dd><a h
05c0: 72 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e ref="#SEE ALSO">
05d0: 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 SPECIAL CONSIDER
05e0: 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a ATIONS</a></dd>.
05f0: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d <dd><a href=
0600: 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 "#SEE ALSO">SEE
0610: 41 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f ALSO</a></dd>.</
0620: 64 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c dl>..<hr>..<h3><
0630: 61 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 a name="NAME">NA
0640: 4d 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e ME</a></h3>..<p>
0650: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 <strong>tls</str
0660: 6f 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 ong> - binding t
0670: 6f 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 o <strong>OpenSS
0680: 4c 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b L</strong>.toolk
0690: 69 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 it.</p>..<h3><a
06a0: 6e 61 6d 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e name="SYNOPSIS">
06b0: 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 SYNOPSIS</a></h3
06c0: 3e 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65 >..<p><b>package
06d0: 20 72 65 71 75 69 72 65 20 54 63 6c 20 38 2e 32 require Tcl 8.2
06e0: 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b </b><br>.<b>pack
06f0: 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 20 age require tls
0700: 31 2e 36 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 72 3e 1.6</b><br>.<br>
0710: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
0720: 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e init"><b>tls::in
0730: 69 74 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f it </b><i>?optio
0740: 6e 73 3f 3c 2f 69 3e 3c 62 72 3e 0a 3c 2f 61 3e ns?</i><br>.</a>
0750: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 <a href="#tls::s
0760: 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 ocket"><b>tls::s
0770: 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f ocket </b><em>?o
0780: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 0a 70 6f 72 ptions? host.por
0790: 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 62 3e 74 6c t</em><br>.<b>tl
07a0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d s::socket</b><em
07b0: 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 > ?-server comma
07c0: 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f nd? ?options? po
07d0: 72 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e rt</em><br>.</a>
07e0: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 <a href="#tls::s
07f0: 74 61 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 tatus"><b>tls::s
0800: 74 61 74 75 73 20 3c 2f 62 3e 3c 65 6d 3e 3f 2d tatus </b><em>?-
0810: 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f local? channel</
0820: 65 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e 3c 61 20 68 em><br>.</a><a h
0830: 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61 6e 64 73 ref="#tls::hands
0840: 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a 68 61 hake"><b>tls::ha
0850: 6e 64 73 68 61 6b 65 3c 2f 62 3e 3c 65 6d 3e 20 ndshake</b><em>
0860: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e channel</em></a>
0870: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 <br>.<br>.<a hre
0880: 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 f="#tls::import"
0890: 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 ><b>tls::import
08a0: 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f </b><i>channel ?
08b0: 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e options?</i></a>
08c0: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 <br>.<a href="#t
08d0: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 ls::unimport"><b
08e0: 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 3c >tls::unimport <
08f0: 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 /b><i>channel</i
0900: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 ></a><br>.<a hre
0910: 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 65 72 73 f="#tls::ciphers
0920: 20 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f protocol ?verbo
0930: 73 65 3f 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 se?"><strong>tls
0940: 3a 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e ::ciphers</stron
0950: 67 3e 0a 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 g>.<em>protocol
0960: 3f 76 65 72 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f ?verbose?</em></
0970: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 a><br>.<a href="
0980: 23 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c #tls::version"><
0990: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f b>tls::version</
09a0: 62 3e 3c 2f 61 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 b></a>.</p>..<h3
09b0: 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 53 43 52 49 ><a name="DESCRI
09c0: 50 54 49 4f 4e 22 3e 44 45 53 43 52 49 50 54 49 PTION">DESCRIPTI
09d0: 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e ON</a></h3>..<p>
09e0: 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 This extension p
09f0: 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65 72 69 rovides a generi
0a00: 63 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a c binding to <a.
0a10: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 href="http://www
0a20: 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f .openssl.org/">O
0a30: 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c penSSL</a>, util
0a40: 69 7a 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e izing the.<stron
0a50: 67 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e g>Tcl_StackChann
0a60: 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20 el</strong>.API
0a70: 66 6f 72 20 54 63 6c 20 38 2e 32 20 61 6e 64 20 for Tcl 8.2 and
0a80: 68 69 67 68 65 72 2e 20 54 68 65 20 73 6f 63 6b higher. The sock
0a90: 65 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74 ets behave exact
0aa0: 6c 79 20 74 68 65 20 73 61 6d 65 0a 61 73 20 63 ly the same.as c
0ab0: 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20 hannels created
0ac0: 75 73 69 6e 67 20 54 63 6c 27 73 20 62 75 69 6c using Tcl's buil
0ad0: 74 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 t-in <strong>soc
0ae0: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d ket</strong>.com
0af0: 6d 61 6e 64 20 77 69 74 68 20 61 64 64 69 74 69 mand with additi
0b00: 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 onal options for
0b10: 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 controlling the
0b20: 20 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 54 6f SSL session..To
0b30: 20 75 73 65 20 54 4c 53 20 77 69 74 68 20 61 6e use TLS with an
0b40: 20 65 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e earlier version
0b50: 20 6f 66 20 54 63 6c 20 74 68 61 6e 20 38 2e 32 of Tcl than 8.2
0b60: 2c 20 70 6c 65 61 73 65 20 6f 62 74 61 69 6e 0a , please obtain.
0b70: 54 4c 53 20 31 2e 33 2e 20 20 50 6c 65 61 73 65 TLS 1.3. Please
0b80: 20 6e 6f 74 65 20 74 68 61 74 20 74 68 65 72 65 note that there
0b90: 20 61 72 65 20 6b 6e 6f 77 6e 20 6c 69 6d 69 74 are known limit
0ba0: 61 74 69 6f 6e 73 20 77 69 74 68 20 74 68 65 0a ations with the.
0bb0: 73 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 stacked channel
0bc0: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 70 implementation p
0bd0: 72 69 6f 72 20 74 6f 20 38 2e 33 2e 32 2c 20 73 rior to 8.3.2, s
0be0: 6f 20 69 74 20 69 73 20 72 65 63 6f 6d 6d 65 6e o it is recommen
0bf0: 64 65 64 0a 74 68 61 74 20 54 4c 53 20 69 73 20 ded.that TLS is
0c00: 75 73 65 64 20 77 69 74 68 20 61 6e 20 38 2e 33 used with an 8.3
0c10: 2e 32 2b 20 69 6e 74 65 72 70 72 65 74 65 72 2e .2+ interpreter.
0c20: 20 20 54 68 65 20 63 75 72 72 65 6e 74 20 76 65 The current ve
0c30: 72 73 69 6f 6e 0a 6f 66 20 54 4c 53 20 77 69 6c rsion.of TLS wil
0c40: 6c 20 77 6f 72 6b 20 77 69 74 68 20 54 63 6c 20 l work with Tcl
0c50: 38 2e 32 2b 2c 20 69 74 20 69 73 20 6a 75 73 74 8.2+, it is just
0c60: 20 6d 6f 72 65 20 73 74 61 62 6c 65 20 77 69 74 more stable wit
0c70: 68 20 38 2e 33 2e 32 2b 2e 0a 3c 2f 70 3e 0a 0a h 8.3.2+..</p>..
0c80: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f 4d <h3><a name="COM
0c90: 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c MANDS">COMMANDS<
0ca0: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 70 /a></h3>..<p>Typ
0cb0: 69 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c 64 ically one would
0cc0: 20 75 73 65 20 74 68 65 20 3c 73 74 72 6f 6e 67 use the <strong
0cd0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 73 >tls::socket </s
0ce0: 74 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 68 trong>command.wh
0cf0: 69 63 68 20 70 72 6f 76 69 64 65 73 20 63 6f 6d ich provides com
0d00: 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 patibility with
0d10: 74 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c the native Tcl <
0d20: 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 strong>socket</s
0d30: 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e 20 trong>.command.
0d40: 49 6e 20 73 75 63 68 20 63 61 73 65 73 20 3c 73 In such cases <s
0d50: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 trong>tls::impor
0d60: 74 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f 75 6c t</strong> shoul
0d70: 64 20 6e 6f 74 20 62 65 0a 75 73 65 64 20 64 69 d not be.used di
0d80: 72 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 6c rectly.</p>..<dl
0d90: 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d >. <dt><a nam
0da0: 65 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 e="tls::init"><b
0db0: 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e 3c >tls::init </b><
0dc0: 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c i>?options?</i><
0dd0: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
0de0: 3e 54 68 69 73 20 72 6f 75 74 69 6e 65 20 73 65 >This routine se
0df0: 74 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f ts the default o
0e00: 70 74 69 6f 6e 73 20 75 73 65 64 20 62 79 20 3c ptions used by <
0e10: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b strong>tls::sock
0e20: 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 et</strong>.
0e30: 20 20 20 20 61 6e 64 20 69 73 20 3c 65 6d 3e 6f and is <em>o
0e40: 70 74 69 6f 6e 61 6c 3c 2f 65 6d 3e 2e 20 49 66 ptional</em>. If
0e50: 20 79 6f 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e you call <stron
0e60: 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 g>tls::import</s
0e70: 74 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 64 trong>. d
0e80: 69 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f 75 irectly this rou
0e90: 74 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 65 tine has no effe
0ea0: 63 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 6f ct. Any of the o
0eb0: 70 74 69 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 ptions. t
0ec0: 68 61 74 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a hat <strong>tls:
0ed0: 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e :socket</strong>
0ee0: 20 61 63 63 65 70 74 73 20 63 61 6e 20 62 65 20 accepts can be
0ef0: 73 65 74 0a 20 20 20 20 20 20 20 20 75 73 69 6e set. usin
0f00: 67 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 g this command,
0f10: 74 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c though you shoul
0f20: 64 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 d limit your opt
0f30: 69 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 6f 20 ions. to
0f40: 6f 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 only TLS related
0f50: 20 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 ones.</dd>.
0f60: 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a <dt> </dt>.
0f70: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
0f80: 22 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 "tls::socket"><b
0f90: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 >tls::socket </b
0fa0: 3e 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 20 ><em>?options?.
0fb0: 20 20 20 20 20 20 20 68 6f 73 74 20 70 6f 72 74 host port
0fc0: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
0fd0: 20 20 20 3c 64 74 3e 3c 62 3e 74 6c 73 3a 3a 73 <dt><b>tls::s
0fe0: 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e 20 3f 2d ocket</b><em> ?-
0ff0: 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 server command?
1000: 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f ?options? port</
1010: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 em></dt>. <dd
1020: 3e 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 >This is a helpe
1030: 72 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 r function that
1040: 75 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 utilizes the und
1050: 65 72 6c 79 69 6e 67 0a 20 20 20 20 20 20 20 20 erlying.
1060: 63 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e commands (<stron
1070: 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 g>tls::import</s
1080: 74 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 trong>). It beha
1090: 76 65 73 0a 20 20 20 20 20 20 20 20 65 78 61 63 ves. exac
10a0: 74 6c 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 tly the same as
10b0: 74 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c the native Tcl <
10c0: 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 strong>socket</s
10d0: 74 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 63 trong>. c
10e0: 6f 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 ommand except th
10f0: 61 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 at the options c
1100: 61 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f an include any o
1110: 66 20 74 68 65 0a 20 20 20 20 20 20 20 20 61 70 f the. ap
1120: 70 6c 69 63 61 62 6c 65 20 3c 61 20 68 72 65 66 plicable <a href
1130: 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e ="#tls::import">
1140: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f <strong>tls:impo
1150: 72 74 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a rt</strong></a>.
1160: 20 20 20 20 20 20 20 20 6f 70 74 69 6f 6e 73 2e options.
1170: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e </dd>. <dt>&n
1180: 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 bsp;</dt>. <d
1190: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
11a0: 68 61 6e 64 73 68 61 6b 65 22 3e 3c 73 74 72 6f handshake"><stro
11b0: 6e 67 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b ng>tls::handshak
11c0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 e</strong> <em>c
11d0: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c hannel</em></a><
11e0: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 /dt>. <dd>For
11f0: 63 65 73 20 68 61 6e 64 73 68 61 6b 65 20 74 6f ces handshake to
1200: 20 74 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 take place, and
1210: 20 72 65 74 75 72 6e 73 20 30 20 69 66 0a 20 20 returns 0 if.
1220: 20 20 20 20 20 20 68 61 6e 64 73 68 61 6b 65 20 handshake
1230: 69 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67 is still in prog
1240: 72 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 ress (non-blocki
1250: 6e 67 29 2c 20 6f 72 20 31 20 69 66 0a 20 20 20 ng), or 1 if.
1260: 20 20 20 20 20 74 68 65 20 68 61 6e 64 73 68 61 the handsha
1270: 6b 65 20 77 61 73 20 73 75 63 63 65 73 73 66 75 ke was successfu
1280: 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 68 l. If the handsh
1290: 61 6b 65 20 66 61 69 6c 65 64 0a 20 20 20 20 20 ake failed.
12a0: 20 20 20 74 68 69 73 20 72 6f 75 74 69 6e 65 20 this routine
12b0: 77 69 6c 6c 20 74 68 72 6f 77 20 61 6e 20 65 72 will throw an er
12c0: 72 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 ror.</dd>. <d
12d0: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 t> </dt>.
12e0: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
12f0: 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 ls::status"><str
1300: 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c ong>tls::status<
1310: 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d /strong>. <em
1320: 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 >?-local? channe
1330: 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a l</em></a></dt>.
1340: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 <dd>Returns
1350: 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 63 75 the current secu
1360: 72 69 74 79 20 73 74 61 74 75 73 20 6f 66 20 61 rity status of a
1370: 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 n SSL channel. T
1380: 68 65 0a 20 20 20 20 20 20 20 20 72 65 73 75 6c he. resul
1390: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b t is a list of k
13a0: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 ey-value pairs d
13b0: 65 73 63 72 69 62 69 6e 67 20 74 68 65 0a 20 20 escribing the.
13c0: 20 20 20 20 20 20 63 6f 6e 6e 65 63 74 65 64 20 connected
13d0: 70 65 65 72 2e 20 49 66 20 74 68 65 20 72 65 73 peer. If the res
13e0: 75 6c 74 20 69 73 20 61 6e 20 65 6d 70 74 79 20 ult is an empty
13f0: 6c 69 73 74 20 74 68 65 6e 20 74 68 65 0a 20 20 list then the.
1400: 20 20 20 20 20 20 53 53 4c 20 68 61 6e 64 73 68 SSL handsh
1410: 61 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20 ake has not yet
1420: 63 6f 6d 70 6c 65 74 65 64 2e 0a 20 20 20 20 20 completed..
1430: 20 20 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c If <em>-local
1440: 3c 2f 65 6d 3e 20 69 73 20 67 69 76 65 6e 2c 20 </em> is given,
1450: 74 68 65 6e 20 74 68 65 20 63 65 72 74 69 66 69 then the certifi
1460: 63 61 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e cate information
1470: 0a 20 20 20 20 20 20 20 20 69 73 20 74 68 65 20 . is the
1480: 6f 6e 65 20 75 73 65 64 20 6c 6f 63 61 6c 6c 79 one used locally
1490: 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 62 .</dd>.</dl>..<b
14a0: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c lockquote>. <
14b0: 64 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dl>. <dt>
14c0: 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f <strong>issuer</
14d0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f strong> <em>dn</
14e0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
14f0: 20 3c 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67 <dd>The disting
1500: 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 uished name (DN)
1510: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 of the certific
1520: 61 74 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 ate.
1530: 69 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 issuer.</dd>.
1540: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
1550: 3e 73 75 62 6a 65 63 74 3c 2f 73 74 72 6f 6e 67 >subject</strong
1560: 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 > <em>dn</em></d
1570: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 t>. <dd>T
1580: 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 he distinguished
1590: 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 name (DN) of th
15a0: 65 20 63 65 72 74 69 66 69 63 61 74 65 0a 20 20 e certificate.
15b0: 20 20 20 20 20 20 20 20 20 20 73 75 62 6a 65 63 subjec
15c0: 74 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 t.</dd>.
15d0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 42 <dt><strong>notB
15e0: 65 66 6f 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c efore</strong> <
15f0: 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 em>date</em></dt
1600: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 >. <dd>Th
1610: 65 20 62 65 67 69 6e 20 64 61 74 65 20 66 6f 72 e begin date for
1620: 20 74 68 65 20 76 61 6c 69 64 69 74 79 20 6f 66 the validity of
1630: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
1640: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
1650: 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 66 dt><strong>notAf
1660: 74 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ter</strong> <em
1670: 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >date</em></dt>.
1680: 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 <dd>The
1690: 65 78 70 69 72 79 20 64 61 74 65 20 66 6f 72 20 expiry date for
16a0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e the certificate.
16b0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
16c0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 69 61 6c t><strong>serial
16d0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c </strong> <em>n<
16e0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
16f0: 20 20 3c 64 64 3e 54 68 65 20 73 65 72 69 61 6c <dd>The serial
1700: 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 number of the c
1710: 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e ertificate.</dd>
1720: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
1730: 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 rong>cipher</str
1740: 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c ong> <em>cipher<
1750: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
1760: 20 20 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e <dd>The curren
1770: 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 t cipher in use
1780: 62 65 74 77 65 65 6e 20 74 68 65 20 63 6c 69 65 between the clie
1790: 6e 74 20 61 6e 64 0a 20 20 20 20 20 20 20 20 20 nt and.
17a0: 20 20 20 73 65 72 76 65 72 20 63 68 61 6e 6e 65 server channe
17b0: 6c 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 ls.</dd>.
17c0: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 62 69 <dt><strong>sbi
17d0: 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ts</strong> <em>
17e0: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 n</em></dt>.
17f0: 20 20 20 20 3c 64 64 3e 54 68 65 20 6e 75 6d 62 <dd>The numb
1800: 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 er of bits used
1810: 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 for the session
1820: 6b 65 79 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f key.</dd>. </
1830: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 dl>.</blockquote
1840: 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e >..<dl>. <dt>
1850: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d <a name="tls::im
1860: 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d port"><b>tls::im
1870: 70 6f 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e port </b><i>chan
1880: 6e 65 6c 0a 20 20 20 20 20 20 20 20 3f 6f 70 74 nel. ?opt
1890: 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 ions?</i></a></d
18a0: 74 3e 0a 20 20 20 20 3c 64 64 3e 53 53 4c 2d 65 t>. <dd>SSL-e
18b0: 6e 61 62 6c 65 20 61 20 72 65 67 75 6c 61 72 20 nable a regular
18c0: 54 63 6c 20 63 68 61 6e 6e 65 6c 20 2d 20 69 74 Tcl channel - it
18d0: 20 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 0a 20 need not be a.
18e0: 20 20 20 20 20 20 20 73 6f 63 6b 65 74 2c 20 62 socket, b
18f0: 75 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65 20 ut must provide
1900: 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 bi-directional f
1910: 6c 6f 77 2e 20 41 6c 73 6f 0a 20 20 20 20 20 20 low. Also.
1920: 20 20 73 65 74 74 69 6e 67 20 73 65 73 73 69 6f setting sessio
1930: 6e 20 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72 n parameters for
1940: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 3c SSL handshake.<
1950: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 62 6c 6f /dd>.</dl>..<blo
1960: 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c ckquote>. <dl
1970: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
1980: 74 72 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74 trong>-cadir</st
1990: 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 rong> <em>dir</e
19a0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
19b0: 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68 65 20 <dd>Provide the
19c0: 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 directory contai
19d0: 6e 69 6e 67 20 74 68 65 20 43 41 20 63 65 72 74 ning the CA cert
19e0: 69 66 69 63 61 74 65 73 2e 3c 2f 64 64 3e 0a 20 ificates.</dd>.
19f0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
1a00: 6e 67 3e 2d 63 61 66 69 6c 65 20 3c 2f 73 74 72 ng>-cafile </str
1a10: 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 ong><em>filename
1a20: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
1a30: 20 20 20 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 <dd>Provide t
1a40: 68 65 20 43 41 20 66 69 6c 65 2e 3c 2f 64 64 3e he CA file.</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 65 72 74 66 69 6c 65 3c 2f rong>-certfile</
1a70: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 strong> <em>file
1a80: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 name</em></dt>.
1a90: 20 20 20 20 20 20 20 3c 64 64 3e 50 72 6f 76 69 <dd>Provi
1aa0: 64 65 20 74 68 65 20 63 65 72 74 69 66 69 63 61 de the certifica
1ab0: 74 65 20 74 6f 20 75 73 65 2e 3c 2f 64 64 3e 0a te to use.</dd>.
1ac0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
1ad0: 6f 6e 67 3e 2d 63 69 70 68 65 72 20 3c 2f 73 74 ong>-cipher </st
1ae0: 72 6f 6e 67 3e 3c 65 6d 3e 73 74 72 69 6e 67 3c rong><em>string<
1af0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
1b00: 20 20 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68 <dd>Provide th
1b10: 65 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 e cipher suites
1b20: 74 6f 20 75 73 65 2e 20 53 79 6e 74 61 78 20 69 to use. Syntax i
1b30: 73 20 61 73 20 70 65 72 0a 20 20 20 20 20 20 20 s as per.
1b40: 20 20 20 20 20 4f 70 65 6e 53 53 4c 2e 3c 2f 64 OpenSSL.</d
1b50: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
1b60: 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c strong>-command<
1b70: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c /strong> <em>cal
1b80: 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a lback</em></dt>.
1b90: 20 20 20 20 20 20 20 20 3c 64 64 3e 49 66 20 73 <dd>If s
1ba0: 70 65 63 69 66 69 65 64 2c 20 74 68 69 73 20 63 pecified, this c
1bb0: 61 6c 6c 62 61 63 6b 20 77 69 6c 6c 20 62 65 20 allback will be
1bc0: 69 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72 invoked at sever
1bd0: 61 6c 20 70 6f 69 6e 74 73 0a 20 20 20 20 20 20 al points.
1be0: 20 20 20 20 20 20 64 75 72 69 6e 67 20 74 68 65 during the
1bf0: 20 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 OpenSSL handsha
1c00: 6b 65 2e 20 20 49 74 20 63 61 6e 20 70 61 73 73 ke. It can pass
1c10: 20 65 72 72 6f 72 73 20 61 6e 64 20 74 72 61 63 errors and trac
1c20: 69 6e 67 0a 20 20 20 20 20 20 20 20 20 20 20 20 ing.
1c30: 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 information, and
1c40: 20 69 74 20 63 61 6e 20 61 6c 6c 6f 77 20 54 63 it can allow Tc
1c50: 6c 20 73 63 72 69 70 74 73 20 74 6f 20 70 65 72 l scripts to per
1c60: 66 6f 72 6d 0a 20 20 20 20 20 20 20 20 20 20 20 form.
1c70: 20 74 68 65 69 72 20 6f 77 6e 20 76 61 6c 69 64 their own valid
1c80: 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 65 72 ation of the cer
1c90: 74 69 66 69 63 61 74 65 20 69 6e 20 70 6c 61 63 tificate in plac
1ca0: 65 20 6f 66 20 74 68 65 0a 20 20 20 20 20 20 20 e of the.
1cb0: 20 20 20 20 20 64 65 66 61 75 6c 74 20 76 61 6c default val
1cc0: 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 idation provided
1cd0: 20 62 79 20 4f 70 65 6e 53 53 4c 2e 0a 20 20 20 by OpenSSL..
1ce0: 20 20 20 20 20 20 20 20 20 3c 62 72 3e 0a 20 20 <br>.
1cf0: 20 20 20 20 20 20 20 20 20 20 53 65 65 20 3c 61 See <a
1d00: 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b href="#CALLBACK
1d10: 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 OPTIONS">CALLBA
1d20: 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 20 66 CK OPTIONS</a> f
1d30: 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 or. f
1d40: 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f urther discussio
1d50: 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 n.</dd>.
1d60: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 <dt><strong>-key
1d70: 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 file</strong> <e
1d80: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c m>filename</em><
1d90: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
1da0: 3e 50 72 6f 76 69 64 65 20 74 68 65 20 70 72 69 >Provide the pri
1db0: 76 61 74 65 20 6b 65 79 20 66 69 6c 65 2e 20 28 vate key file. (
1dc0: 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c <strong>default<
1dd0: 2f 73 74 72 6f 6e 67 3e 3a 0a 20 20 20 20 20 20 /strong>:.
1de0: 20 20 20 20 20 20 76 61 6c 75 65 20 6f 66 20 2d value of -
1df0: 63 65 72 74 66 69 6c 65 29 3c 2f 64 64 3e 0a 20 certfile)</dd>.
1e00: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
1e10: 6e 67 3e 2d 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e ng>-model</stron
1e20: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f g> <em>channel</
1e30: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
1e40: 20 3c 64 64 3e 54 68 69 73 20 77 69 6c 6c 20 66 <dd>This will f
1e50: 6f 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 orce this channe
1e60: 6c 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 l to share the s
1e70: 61 6d 65 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e ame <em><strong>
1e80: 53 53 4c 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e SSL_CTX</strong>
1e90: 3c 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 20 20 </em>.
1ea0: 20 20 73 74 72 75 63 74 75 72 65 20 61 73 20 74 structure as t
1eb0: 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d he specified <em
1ec0: 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 >channel</em>, a
1ed0: 6e 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 nd. t
1ee0: 68 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 63 herefore share c
1ef0: 61 6c 6c 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 allbacks etc.</d
1f00: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
1f10: 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 strong>-password
1f20: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 </strong> <em>ca
1f30: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e llback</em></dt>
1f40: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 49 66 20 . <dd>If
1f50: 73 75 70 70 6c 69 65 64 2c 20 74 68 69 73 20 63 supplied, this c
1f60: 61 6c 6c 62 61 63 6b 20 77 69 6c 6c 20 62 65 20 allback will be
1f70: 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 4f 70 65 invoked when Ope
1f80: 6e 53 53 4c 20 6e 65 65 64 73 0a 20 20 20 20 20 nSSL needs.
1f90: 20 20 20 20 20 20 20 74 6f 20 6f 62 74 61 69 6e to obtain
1fa0: 20 61 20 70 61 73 73 77 6f 72 64 2c 20 74 79 70 a password, typ
1fb0: 69 63 61 6c 6c 79 20 74 6f 20 75 6e 6c 6f 63 6b ically to unlock
1fc0: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 the private key
1fd0: 20 6f 66 0a 09 20 20 20 20 61 20 63 65 72 74 69 of.. a certi
1fe0: 66 69 63 61 74 65 2e 0a 20 20 20 20 20 20 20 20 ficate..
1ff0: 20 20 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b The callback
2000: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 should return a
2010: 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 72 65 string which re
2020: 70 72 65 73 65 6e 74 73 20 74 68 65 0a 20 20 20 presents the.
2030: 20 20 20 20 20 20 20 20 20 70 61 73 73 77 6f 72 passwor
2040: 64 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 20 20 d to be used..
2050: 20 20 20 20 20 20 20 20 20 20 3c 62 72 3e 0a 20 <br>.
2060: 20 20 20 20 20 20 20 20 20 20 20 53 65 65 20 3c See <
2070: 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 a href="#CALLBAC
2080: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 K OPTIONS">CALLB
2090: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 20 ACK OPTIONS</a>
20a0: 66 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 for.
20b0: 66 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69 further discussi
20c0: 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 on.</dd>.
20d0: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 <dt><strong>-re
20e0: 71 75 65 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c quest </strong><
20f0: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 em>bool</em></dt
2100: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 >. <dd>Re
2110: 71 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 quest a certific
2120: 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 ate from peer du
2130: 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68 61 ring SSL handsha
2140: 6b 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 ke..
2150: 28 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 (<strong>default
2160: 3c 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 74 </strong>: <em>t
2170: 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 rue</em>)</dd>.
2180: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
2190: 6e 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74 72 ng>-require</str
21a0: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 ong> <em>bool</e
21b0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
21c0: 3c 64 64 3e 52 65 71 75 69 72 65 20 61 20 76 61 <dd>Require a va
21d0: 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65 20 lid certificate
21e0: 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67 from peer during
21f0: 20 53 53 4c 0a 20 20 20 20 20 20 20 20 20 20 20 SSL.
2200: 20 68 61 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 handshake. If t
2210: 68 69 73 20 69 73 20 73 65 74 20 74 6f 20 74 72 his is set to tr
2220: 75 65 20 74 68 65 6e 20 3c 73 74 72 6f 6e 67 3e ue then <strong>
2230: 2d 72 65 71 75 65 73 74 3c 2f 73 74 72 6f 6e 67 -request</strong
2240: 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 75 >. mu
2250: 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 st also be set t
2260: 6f 20 74 72 75 65 2e 20 28 3c 73 74 72 6f 6e 67 o true. (<strong
2270: 3e 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 >default</strong
2280: 3e 3a 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d >: <em>false</em
2290: 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 >)</dd>.
22a0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 <dt><strong>-ser
22b0: 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ver</strong> <em
22c0: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
22d0: 20 20 20 20 20 20 20 20 3c 64 64 3e 48 61 6e 64 <dd>Hand
22e0: 73 68 61 6b 65 20 61 73 20 73 65 72 76 65 72 20 shake as server
22f0: 69 66 20 74 72 75 65 2c 20 65 6c 73 65 20 68 61 if true, else ha
2300: 6e 64 73 68 61 6b 65 20 61 73 0a 20 20 20 20 20 ndshake as.
2310: 20 20 20 20 20 20 20 63 6c 69 65 6e 74 2e 28 3c client.(<
2320: 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c 2f strong>default</
2330: 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 66 61 6c strong>: <em>fal
2340: 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 se</em>)</dd>.
2350: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
2360: 67 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 g>-servername</s
2370: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c trong> <em>host<
2380: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
2390: 20 20 3c 64 64 3e 4f 6e 6c 79 20 61 76 61 69 6c <dd>Only avail
23a0: 61 62 6c 65 20 69 66 20 74 68 65 20 4f 70 65 6e able if the Open
23b0: 53 53 4c 20 6c 69 62 72 61 72 79 20 74 68 65 20 SSL library the
23c0: 70 61 63 6b 61 67 65 20 69 73 20 6c 69 6e 6b 65 package is linke
23d0: 64 0a 09 20 20 20 20 61 67 61 69 6e 73 74 20 73 d.. against s
23e0: 75 70 70 6f 72 74 73 20 74 68 65 20 54 4c 53 20 upports the TLS
23f0: 68 6f 73 74 6e 61 6d 65 20 65 78 74 65 6e 73 69 hostname extensi
2400: 6f 6e 20 66 6f 72 20 27 53 65 72 76 65 72 20 4e on for 'Server N
2410: 61 6d 65 0a 09 20 20 20 20 49 6e 64 69 63 61 74 ame.. Indicat
2420: 69 6f 6e 27 20 28 53 4e 49 29 2e 20 55 73 65 20 ion' (SNI). Use
2430: 74 6f 20 6e 61 6d 65 20 74 68 65 20 6c 6f 67 69 to name the logi
2440: 63 61 6c 20 68 6f 73 74 20 77 65 20 61 72 65 20 cal host we are
2450: 74 61 6c 6b 69 6e 67 0a 09 20 20 20 20 74 6f 20 talking.. to
2460: 61 6e 64 20 65 78 70 65 63 74 69 6e 67 20 61 20 and expecting a
2470: 63 65 72 74 69 66 69 63 61 74 65 20 66 6f 72 3c certificate for<
2480: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
2490: 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f ><strong>-ssl2</
24a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c strong> <em>bool
24b0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
24c0: 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 <dd>Enable us
24d0: 65 20 6f 66 20 53 53 4c 20 76 32 2e 20 28 3c 73 e of SSL v2. (<s
24e0: 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c 2f 73 trong>default</s
24f0: 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 74 72 75 65 trong>: <em>true
2500: 3c 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 20 20 </em>.
2510: 20 20 75 6e 6c 65 73 73 20 2d 44 4e 4f 5f 50 41 unless -DNO_PA
2520: 54 45 4e 54 53 20 77 61 73 20 73 70 65 63 69 66 TENTS was specif
2530: 69 65 64 20 69 6e 20 62 75 69 6c 64 29 3c 2f 64 ied in build)</d
2540: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
2550: 73 74 72 6f 6e 67 3e 2d 73 73 6c 33 20 3c 2f 73 strong>-ssl3 </s
2560: 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f trong><em>bool</
2570: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
2580: 20 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 <dd>Enable use
2590: 6f 66 20 53 53 4c 20 76 33 2e 20 28 3c 73 74 72 of SSL v3. (<str
25a0: 6f 6e 67 3e 64 65 66 61 75 6c 74 3c 2f 73 74 72 ong>default</str
25b0: 6f 6e 67 3e 3a 20 3c 65 6d 3e 74 72 75 65 3c 2f ong>: <em>true</
25c0: 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 em>)</dd>.
25d0: 20 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 <dt>-<strong>t
25e0: 6c 73 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ls1</strong> <em
25f0: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
2600: 20 20 20 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 <dd>Enab
2610: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
2620: 2e 20 28 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 . (<strong>defau
2630: 6c 74 3c 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d lt</strong>: <em
2640: 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 >false</em>)</dd
2650: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c >. </dl>.</bl
2660: 6f 63 6b 71 75 6f 74 65 3e 0a 0a 3c 64 6c 3e 0a ockquote>..<dl>.
2670: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
2680: 22 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e "tls::unimport">
2690: 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 <b>tls::unimport
26a0: 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c </b><i>channel<
26b0: 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 /i></a></dt>.
26c0: 20 3c 64 64 3e 50 72 6f 76 69 64 65 64 20 66 6f <dd>Provided fo
26d0: 72 20 73 79 6d 6d 65 74 72 79 20 74 6f 20 3c 73 r symmetry to <s
26e0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 trong>tls::impor
26f0: 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 74 68 69 73 t</strong>, this
2700: 0a 20 20 20 20 20 20 75 6e 73 74 61 63 6b 73 20 . unstacks
2710: 74 68 65 20 53 53 4c 2d 65 6e 61 62 6c 69 6e 67 the SSL-enabling
2720: 20 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 63 of a regular Tc
2730: 6c 20 63 68 61 6e 6e 65 6c 2e 20 20 41 6e 20 65 l channel. An e
2740: 72 72 6f 72 0a 20 20 20 20 20 20 69 73 20 74 68 rror. is th
2750: 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e rown if TLS is n
2760: 6f 74 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b ot the top stack
2770: 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e ed channel type.
2780: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 64 6c </dd>.</dl>..<dl
2790: 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d >. <dt><a nam
27a0: 65 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 20 e="tls::ciphers
27b0: 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 protocol ?verbos
27c0: 65 3f 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a e?"><strong>tls:
27d0: 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 :ciphers</strong
27e0: 3e 0a 20 20 20 20 20 20 20 20 3c 65 6d 3e 70 72 >. <em>pr
27f0: 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f otocol ?verbose?
2800: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
2810: 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 6c <dd>Returns l
2820: 69 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 ist of supported
2830: 20 63 69 70 68 65 72 73 20 62 61 73 65 64 20 6f ciphers based o
2840: 6e 20 74 68 65 20 3c 65 6d 3e 70 72 6f 74 6f 63 n the <em>protoc
2850: 6f 6c 3c 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 ol</em>.
2860: 79 6f 75 20 73 75 70 70 6c 79 2c 20 77 68 69 63 you supply, whic
2870: 68 20 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 h must be one of
2880: 20 3c 65 6d 3e 73 73 6c 32 2c 20 73 73 6c 33 2c <em>ssl2, ssl3,
2890: 20 6f 72 20 74 6c 73 31 3c 2f 65 6d 3e 2e 0a 20 or tls1</em>..
28a0: 20 20 20 20 20 20 20 49 66 20 3c 65 6d 3e 76 65 If <em>ve
28b0: 72 62 6f 73 65 3c 2f 65 6d 3e 20 69 73 20 73 70 rbose</em> is sp
28c0: 65 63 69 66 69 65 64 20 61 73 20 74 72 75 65 20 ecified as true
28d0: 74 68 65 6e 20 61 20 76 65 72 62 6f 73 65 2c 0a then a verbose,.
28e0: 20 20 20 20 20 20 20 20 73 65 6d 69 2d 68 75 6d semi-hum
28f0: 61 6e 20 72 65 61 64 61 62 6c 65 20 6c 69 73 74 an readable list
2900: 20 69 73 20 72 65 74 75 72 6e 65 64 20 70 72 6f is returned pro
2910: 76 69 64 69 6e 67 20 61 64 64 69 74 69 6f 6e 61 viding additiona
2920: 6c 0a 20 20 20 20 20 20 20 20 69 6e 66 6f 72 6d l. inform
2930: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 6e 61 74 ation on the nat
2940: 75 72 65 20 6f 66 20 74 68 65 20 63 69 70 68 65 ure of the ciphe
2950: 72 20 73 75 70 70 6f 72 74 2e 20 49 6e 20 65 61 r support. In ea
2960: 63 68 0a 20 20 20 20 20 20 20 20 63 61 73 65 20 ch. case
2970: 74 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 the result is a
2980: 54 63 6c 20 6c 69 73 74 2e 3c 2f 64 64 3e 0a 3c Tcl list.</dd>.<
2990: 2f 64 6c 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c /dl>..<dl>. <
29a0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
29b0: 3a 76 65 72 73 69 6f 6e 22 3e 3c 73 74 72 6f 6e :version"><stron
29c0: 67 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f g>tls::version</
29d0: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e strong></a></dt>
29e0: 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 . <dd>Returns
29f0: 20 74 68 65 20 76 65 72 73 69 6f 6e 20 73 74 72 the version str
2a00: 69 6e 67 20 64 65 66 69 6e 65 64 20 62 79 20 4f ing defined by O
2a10: 70 65 6e 53 53 4c 2e 3c 2f 64 64 3e 0a 3c 2f 64 penSSL.</dd>.</d
2a20: 6c 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d l>..<h3><a name=
2a30: 22 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e "CALLBACK OPTION
2a40: 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 S">CALLBACK OPTI
2a50: 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 ONS</a></h3>..<p
2a60: 3e 0a 41 73 20 69 6e 64 69 63 61 74 65 64 20 61 >.As indicated a
2a70: 62 6f 76 65 2c 20 69 6e 64 69 76 69 64 75 61 6c bove, individual
2a80: 20 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20 62 65 channels can be
2a90: 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f 77 6e given their own
2aa0: 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 callbacks.to ha
2ab0: 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 74 ndle intermediat
2ac0: 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 e processing by
2ad0: 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 the OpenSSL libr
2ae0: 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c ary, using the.<
2af0: 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e em>-command</em>
2b00: 20 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 73 77 6f and <em>-passwo
2b10: 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 73 20 rd</em> options
2b20: 70 61 73 73 65 64 20 74 6f 20 65 69 74 68 65 72 passed to either
2b30: 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a of.<strong>tls:
2b40: 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e :socket</strong>
2b50: 20 6f 72 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a or <strong>tls:
2b60: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e :import</strong>
2b70: 2e 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 ..</p>..<blockqu
2b80: 6f 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 20 3c ote>.<dl>.. <
2b90: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d dt><strong>-comm
2ba0: 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d and</strong> <em
2bb0: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f >callback</em></
2bc0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e dt>. <dd>..In
2bd0: 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 vokes the specif
2be0: 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ied <em>callback
2bf0: 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 61 74 0a </em> script at.
2c00: 09 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 .several points
2c10: 64 75 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 during the OpenS
2c20: 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 45 SL handshake...E
2c30: 78 63 65 70 74 20 61 73 20 69 6e 64 69 63 61 74 xcept as indicat
2c40: 65 64 20 62 65 6c 6f 77 2c 20 76 61 6c 75 65 73 ed below, values
2c50: 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 returned from t
2c60: 68 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61 72 65 he..callback are
2c70: 20 69 67 6e 6f 72 65 64 2e 0a 09 41 72 67 75 6d ignored...Argum
2c80: 65 6e 74 73 20 61 70 70 65 6e 64 65 64 20 74 6f ents appended to
2c90: 20 74 68 65 20 73 63 72 69 70 74 20 75 70 6f 6e the script upon
2ca0: 20 63 61 6c 6c 62 61 63 6b 20 74 61 6b 65 20 6f callback take o
2cb0: 6e 65 20 6f 66 20 74 68 65 0a 09 66 6f 6c 6c 6f ne of the..follo
2cc0: 77 69 6e 67 20 66 6f 72 6d 73 3a 0a 0a 09 3c 62 wing forms:...<b
2cd0: 72 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a r>..<br>...<dl>.
2ce0: 0a 3c 21 2d 2d 09 54 68 69 73 20 66 6f 72 6d 20 .<!--.This form
2cf0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 64 of callback is d
2d00: 69 73 61 62 6c 65 64 2e 0a 0a 09 3c 64 74 3e 0a isabled....<dt>.
2d10: 09 20 20 3c 73 74 72 6f 6e 67 3e 65 72 72 6f 72 . <strong>error
2d20: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
2d30: 61 6e 6e 65 6c 20 6d 65 73 73 61 67 65 3c 2f 65 annel message</e
2d40: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a m>..</dt>..<dd>.
2d50: 09 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 . The <em>messa
2d60: 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 ge</em> argument
2d70: 20 63 6f 6e 74 61 69 6e 73 20 61 6e 20 65 72 72 contains an err
2d80: 6f 72 20 6d 65 73 73 61 67 65 20 67 65 6e 65 72 or message gener
2d90: 61 74 65 64 0a 09 20 20 62 79 20 74 68 65 20 4f ated.. by the O
2da0: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a penSSL function.
2db0: 09 20 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65 61 . <code>ERR_rea
2dc0: 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 son_error_string
2dd0: 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f 64 64 ()</code>...</dd
2de0: 3e 0a 0a 09 3c 62 72 3e 0a 2d 2d 3e 0a 0a 09 3c >...<br>.-->...<
2df0: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 dt>.. <strong>i
2e00: 6e 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d nfo</strong> <em
2e10: 3e 63 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d >channel major m
2e20: 69 6e 6f 72 20 6d 65 73 73 61 67 65 3c 2f 65 6d inor message</em
2e30: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 >..</dt>..<dd>..
2e40: 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 This form of c
2e50: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
2e60: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 ed by the OpenSS
2e70: 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 L function.. <c
2e80: 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 74 5f ode>SSL_CTX_set_
2e90: 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c info_callback()<
2ea0: 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a /code>... <br>.
2eb0: 09 20 20 54 68 65 20 3c 65 6d 3e 6d 61 6a 6f 72 . The <em>major
2ec0: 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e 6d 69 </em> and <em>mi
2ed0: 6e 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e nor</em> argumen
2ee0: 74 73 20 61 72 65 20 75 73 65 64 20 74 6f 0a 09 ts are used to..
2ef0: 20 20 72 65 70 72 65 73 65 6e 74 20 74 68 65 20 represent the
2f00: 73 74 61 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f state informatio
2f10: 6e 20 62 69 74 6d 61 73 6b 2e 0a 09 20 20 3c 64 n bitmask... <d
2f20: 6c 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 69 62 l>.. <dt>Possib
2f30: 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 le values for <e
2f40: 6d 3e 6d 61 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 m>major</em> are
2f50: 3a 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 :</dt>.. <dd><c
2f60: 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c 20 61 ode>handshake, a
2f70: 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c 20 61 lert, connect, a
2f80: 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 ccept</code>.</d
2f90: 64 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 69 62 d>.. <dt>Possib
2fa0: 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 le values for <e
2fb0: 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65 m>minor</em> are
2fc0: 3a 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 :</dt>.. <dd><c
2fd0: 6f 64 65 3e 73 74 61 72 74 2c 20 64 6f 6e 65 2c ode>start, done,
2fe0: 20 72 65 61 64 2c 20 77 72 69 74 65 2c 20 6c 6f read, write, lo
2ff0: 6f 70 2c 20 65 78 69 74 3c 2f 63 6f 64 65 3e 2e op, exit</code>.
3000: 3c 2f 64 64 3e 0a 09 20 20 3c 2f 64 6c 3e 0a 09 </dd>.. </dl>..
3010: 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67 The <em>messag
3020: 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 e</em> argument
3030: 69 73 20 61 20 64 65 73 63 72 69 70 74 69 76 65 is a descriptive
3040: 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61 string which ma
3050: 79 0a 09 20 20 62 65 20 67 65 6e 65 72 61 74 65 y.. be generate
3060: 64 20 65 69 74 68 65 72 20 62 79 0a 09 20 20 3c d either by.. <
3070: 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f 73 code>SSL_state_s
3080: 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f tring_long()</co
3090: 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c 63 6f de> or by.. <co
30a0: 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73 de>SSL_alert_des
30b0: 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c c_string_long()<
30c0: 2f 63 6f 64 65 3e 2c 0a 09 20 20 64 65 70 65 6e /code>,.. depen
30d0: 64 69 6e 67 20 6f 6e 20 63 6f 6e 74 65 78 74 2e ding on context.
30e0: 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a ..</dd>...<br>..
30f0: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 .<dt>.. <strong
3100: 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e 67 3e >verify</strong>
3110: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 65 70 <em>channel dep
3120: 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65 th cert status e
3130: 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e rror</em>..</dt>
3140: 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 ..<dd>.. This f
3150: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 orm of callback
3160: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 is invoked by th
3170: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 e OpenSSL functi
3180: 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f on.. <code>SSL_
3190: 73 65 74 5f 76 65 72 69 66 79 28 29 3c 2f 63 6f set_verify()</co
31a0: 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 de>... <br>..
31b0: 54 68 65 20 3c 65 6d 3e 64 65 70 74 68 3c 2f 65 The <em>depth</e
31c0: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 m> argument is a
31d0: 6e 20 69 6e 74 65 67 65 72 20 72 65 70 72 65 73 n integer repres
31e0: 65 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 63 75 enting the.. cu
31f0: 72 72 65 6e 74 20 64 65 70 74 68 20 6f 6e 20 74 rrent depth on t
3200: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 he certificate c
3210: 68 61 69 6e 2c 20 77 69 74 68 0a 09 20 20 3c 63 hain, with.. <c
3220: 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 61 73 20 ode>0</code> as
3230: 74 68 65 20 73 75 62 6a 65 63 74 20 63 65 72 74 the subject cert
3240: 69 66 69 63 61 74 65 20 61 6e 64 20 68 69 67 68 ificate and high
3250: 65 72 20 76 61 6c 75 65 73 0a 09 20 20 64 65 6e er values.. den
3260: 6f 74 69 6e 67 20 70 72 6f 67 72 65 73 73 69 76 oting progressiv
3270: 65 6c 79 20 6d 6f 72 65 20 69 6e 64 69 72 65 63 ely more indirec
3280: 74 20 69 73 73 75 65 72 20 63 65 72 74 69 66 69 t issuer certifi
3290: 63 61 74 65 73 2e 0a 09 20 20 3c 62 72 3e 0a 09 cates... <br>..
32a0: 20 20 54 68 65 20 3c 65 6d 3e 63 65 72 74 3c 2f The <em>cert</
32b0: 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 em> argument is
32c0: 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 a list of key-va
32d0: 6c 75 65 20 70 61 69 72 73 20 73 69 6d 69 6c 61 lue pairs simila
32e0: 72 0a 09 20 20 74 6f 20 74 68 6f 73 65 20 72 65 r.. to those re
32f0: 74 75 72 6e 65 64 20 62 79 0a 09 20 20 3c 61 20 turned by.. <a
3300: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 href="#tls::stat
3310: 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a us"><strong>tls:
3320: 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 3e :status</strong>
3330: 3c 2f 61 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 </a>... <br>..
3340: 20 54 68 65 20 3c 65 6d 3e 73 74 61 74 75 73 3c The <em>status<
3350: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 /em> argument is
3360: 20 61 6e 20 69 6e 74 65 67 65 72 20 72 65 70 72 an integer repr
3370: 65 73 65 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 esenting the..
3380: 63 75 72 72 65 6e 74 20 76 61 6c 69 64 69 74 79 current validity
3390: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 of the certific
33a0: 61 74 65 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 ate... A value
33b0: 6f 66 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 of <code>0</code
33c0: 3e 20 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 > means the cert
33d0: 69 66 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 ificate is deeme
33e0: 64 20 69 6e 76 61 6c 69 64 2e 0a 09 20 20 41 20 d invalid... A
33f0: 76 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e 31 value of <code>1
3400: 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 68 </code> means th
3410: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 e certificate is
3420: 20 64 65 65 6d 65 64 20 76 61 6c 69 64 2e 0a 09 deemed valid...
3430: 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c 65 <br>.. The <e
3440: 6d 3e 65 72 72 6f 72 3c 2f 65 6d 3e 20 61 72 67 m>error</em> arg
3450: 75 6d 65 6e 74 20 73 75 70 70 6c 69 65 73 20 74 ument supplies t
3460: 68 65 20 6d 65 73 73 61 67 65 2c 20 69 66 20 61 he message, if a
3470: 6e 79 2c 20 67 65 6e 65 72 61 74 65 64 0a 09 20 ny, generated..
3480: 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e 58 35 30 by.. <code>X50
3490: 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 5f 9_STORE_CTX_get_
34a0: 65 72 72 6f 72 28 29 3c 2f 63 6f 64 65 3e 2e 0a error()</code>..
34b0: 09 20 20 3c 62 72 3e 0a 09 20 20 3c 62 72 3e 0a . <br>.. <br>.
34c0: 09 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 . The callback
34d0: 6d 61 79 20 6f 76 65 72 72 69 64 65 20 6e 6f 72 may override nor
34e0: 6d 61 6c 20 76 61 6c 69 64 61 74 69 6f 6e 20 70 mal validation p
34f0: 72 6f 63 65 73 73 69 6e 67 20 62 79 20 65 78 70 rocessing by exp
3500: 6c 69 63 69 74 6c 79 0a 09 20 20 72 65 74 75 72 licitly.. retur
3510: 6e 69 6e 67 20 6f 6e 65 20 6f 66 20 74 68 65 20 ning one of the
3520: 61 62 6f 76 65 20 3c 65 6d 3e 73 74 61 74 75 73 above <em>status
3530: 3c 2f 65 6d 3e 20 76 61 6c 75 65 73 2e 0a 09 3c </em> values...<
3540: 2f 64 64 3e 0a 0a 09 3c 2f 64 6c 3e 0a 20 20 20 /dd>...</dl>.
3550: 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e </dd>.. <br>
3560: 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e .. <dt><stron
3570: 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 g>-password</str
3580: 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 ong> <em>callbac
3590: 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 k</em></dt>.
35a0: 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 <dd>..Invokes th
35b0: 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e e specified <em>
35c0: 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 callback</em> sc
35d0: 72 69 70 74 20 77 68 65 6e 20 4f 70 65 6e 53 53 ript when OpenSS
35e0: 4c 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62 74 61 L needs to..obta
35f0: 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 20 20 in a password.
3600: 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f The callback sho
3610: 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73 74 72 uld return a str
3620: 69 6e 67 20 77 68 69 63 68 0a 09 72 65 70 72 65 ing which..repre
3630: 73 65 6e 74 73 20 74 68 65 20 70 61 73 73 77 6f sents the passwo
3640: 72 64 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 09 rd to be used...
3650: 4e 6f 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 No arguments are
3660: 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68 65 appended to the
3670: 20 73 63 72 69 70 74 20 75 70 6f 6e 20 63 61 6c script upon cal
3680: 6c 62 61 63 6b 2e 0a 20 20 20 20 3c 2f 64 64 3e lback.. </dd>
3690: 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 .</dl>.</blockqu
36a0: 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 72 65 ote>..<p>.Refere
36b0: 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 nce implementati
36c0: 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61 6c ons of these cal
36d0: 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76 69 lbacks are provi
36e0: 64 65 64 20 69 6e 20 74 68 65 0a 64 69 73 74 72 ded in the.distr
36f0: 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 74 72 6f ibution as <stro
3700: 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b ng>tls::callback
3710: 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 0a 3c 73 </strong> and.<s
3720: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 trong>tls::passw
3730: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 72 65 73 ord</strong> res
3740: 70 65 63 74 69 76 65 6c 79 2e 20 20 4e 6f 74 65 pectively. Note
3750: 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 0a that these are.
3760: 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 <em>sample</em>
3770: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 implementations
3780: 6f 6e 6c 79 2e 20 20 49 6e 20 61 20 6d 6f 72 65 only. In a more
3790: 20 72 65 61 6c 69 73 74 69 63 20 64 65 70 6c 6f realistic deplo
37a0: 79 6d 65 6e 74 0a 79 6f 75 20 77 6f 75 6c 64 20 yment.you would
37b0: 73 70 65 63 69 66 79 20 79 6f 75 72 20 6f 77 6e specify your own
37c0: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 callback script
37d0: 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 20 63 68 s on each TLS ch
37e0: 61 6e 6e 65 6c 0a 75 73 69 6e 67 20 74 68 65 20 annel.using the
37f0: 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d <em>-command</em
3800: 3e 20 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 73 77 > and <em>-passw
3810: 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 73 ord</em> options
3820: 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 ..</p>..<p>.The
3830: 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 default behavior
3840: 20 77 68 65 6e 20 74 68 65 20 3c 65 6d 3e 2d 63 when the <em>-c
3850: 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 6f 70 74 69 ommand</em> opti
3860: 6f 6e 20 69 73 20 6e 6f 74 20 73 70 65 63 69 66 on is not specif
3870: 69 65 64 20 69 73 20 66 6f 72 0a 54 4c 53 20 74 ied is for.TLS t
3880: 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 o process the as
3890: 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 sociated library
38a0: 20 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74 65 72 callbacks inter
38b0: 6e 61 6c 6c 79 2e 0a 54 68 65 20 64 65 66 61 75 nally..The defau
38c0: 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e lt behavior when
38d0: 20 74 68 65 20 3c 65 6d 3e 2d 70 61 73 73 77 6f the <em>-passwo
38e0: 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 20 69 rd</em> option i
38f0: 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 20 s not specified
3900: 69 73 20 66 6f 72 0a 54 4c 53 20 74 6f 20 70 72 is for.TLS to pr
3910: 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 ocess the associ
3920: 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c ated library cal
3930: 6c 62 61 63 6b 73 20 62 79 20 61 74 74 65 6d 70 lbacks by attemp
3940: 74 69 6e 67 20 74 6f 20 63 61 6c 6c 0a 3c 73 74 ting to call.<st
3950: 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f rong>tls::passwo
3960: 72 64 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 54 68 65 rd</strong>..The
3970: 20 64 69 66 66 65 72 65 6e 63 65 20 62 65 74 77 difference betw
3980: 65 65 6e 20 74 68 65 73 65 20 74 77 6f 20 62 65 een these two be
3990: 68 61 76 69 6f 72 73 20 69 73 20 61 20 63 6f 6e haviors is a con
39a0: 73 65 71 75 65 6e 63 65 20 6f 66 20 6d 61 69 6e sequence of main
39b0: 74 61 69 6e 69 6e 67 0a 63 6f 6d 70 61 74 69 62 taining.compatib
39c0: 69 6c 69 74 79 20 77 69 74 68 20 65 61 72 6c 69 ility with earli
39d0: 65 72 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f er implementatio
39e0: 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 ns..</p>..<p>.Th
39f0: 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 e <strong>tls::d
3a00: 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 76 61 ebug</strong> va
3a10: 72 69 61 62 6c 65 20 70 72 6f 76 69 64 65 73 20 riable provides
3a20: 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c 0a some additional.
3a30: 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 control over the
3a40: 73 65 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c se reference cal
3a50: 6c 62 61 63 6b 73 2e 20 20 49 74 73 20 76 61 6c lbacks. Its val
3a60: 75 65 20 69 73 20 7a 65 72 6f 20 62 79 20 64 65 ue is zero by de
3a70: 66 61 75 6c 74 2e 0a 48 69 67 68 65 72 20 76 61 fault..Higher va
3a80: 6c 75 65 73 20 70 72 6f 64 75 63 65 20 6d 6f 72 lues produce mor
3a90: 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f 75 74 e diagnostic out
3aa0: 70 75 74 2c 20 61 6e 64 20 77 69 6c 6c 20 61 6c put, and will al
3ab0: 73 6f 20 66 6f 72 63 65 20 74 68 65 0a 76 65 72 so force the.ver
3ac0: 69 66 79 20 6d 65 74 68 6f 64 20 69 6e 20 3c 73 ify method in <s
3ad0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 trong>tls::callb
3ae0: 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 74 6f 20 ack</strong> to
3af0: 61 63 63 65 70 74 20 74 68 65 0a 63 65 72 74 69 accept the.certi
3b00: 66 69 63 61 74 65 2c 20 65 76 65 6e 20 77 68 65 ficate, even whe
3b10: 6e 20 69 74 20 69 73 20 69 6e 76 61 6c 69 64 2e n it is invalid.
3b20: 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a .</p>..<p>.<em>.
3b30: 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 72 The use of the r
3b40: 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 eference callbac
3b50: 6b 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a ks <strong>tls::
3b60: 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 callback</strong
3b70: 3e 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e 74 6c > and.<strong>tl
3b80: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 s::password</str
3b90: 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f ong> is not reco
3ba0: 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 79 20 6d mmended. They m
3bb0: 61 79 20 62 65 20 72 65 6d 6f 76 65 64 0a 66 72 ay be removed.fr
3bc0: 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 om future releas
3bd0: 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a es..</em>.</p>..
3be0: 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 <p>.<em>.The use
3bf0: 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c 65 of the variable
3c00: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 <strong>tls::de
3c10: 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 73 20 bug</strong> is
3c20: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e not recommended.
3c30: 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 .It may be remov
3c40: 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 ed from future r
3c50: 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c eleases..</em>.<
3c60: 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 /p>..<h3><a name
3c70: 3d 22 48 54 54 50 53 20 45 58 41 4d 50 4c 45 22 ="HTTPS EXAMPLE"
3c80: 3e 48 54 54 50 53 20 45 58 41 4d 50 4c 45 3c 2f >HTTPS EXAMPLE</
3c90: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 a></h3>..<p>This
3ca0: 20 65 78 61 6d 70 6c 65 20 72 65 71 75 69 72 65 example require
3cb0: 73 20 61 20 70 61 74 63 68 20 74 6f 20 74 68 65 s a patch to the
3cc0: 20 3c 73 74 72 6f 6e 67 3e 68 74 74 70 3c 2f 73 <strong>http</s
3cd0: 74 72 6f 6e 67 3e 0a 6d 6f 64 75 6c 65 20 74 68 trong>.module th
3ce0: 61 74 20 73 68 69 70 73 20 77 69 74 68 20 54 63 at ships with Tc
3cf0: 6c 20 2d 20 74 68 69 73 20 70 61 74 63 68 20 68 l - this patch h
3d00: 61 73 20 62 65 65 6e 20 73 75 62 6d 69 74 74 65 as been submitte
3d10: 64 20 66 6f 72 0a 69 6e 63 6c 75 73 69 6f 6e 20 d for.inclusion
3d20: 69 6e 20 54 63 6c 20 38 2e 32 2e 31 2c 20 62 75 in Tcl 8.2.1, bu
3d30: 74 20 69 73 20 61 6c 73 6f 20 70 72 6f 76 69 64 t is also provid
3d40: 65 64 20 69 6e 20 74 68 65 20 74 6c 73 20 64 69 ed in the tls di
3d50: 72 65 63 74 6f 72 79 0a 69 66 20 6e 65 65 64 65 rectory.if neede
3d60: 64 2e 20 41 20 73 61 6d 70 6c 65 20 73 65 72 76 d. A sample serv
3d70: 65 72 2e 70 65 6d 20 69 73 20 70 72 6f 76 69 64 er.pem is provid
3d80: 65 64 20 77 69 74 68 20 74 68 65 20 54 4c 53 20 ed with the TLS
3d90: 72 65 6c 65 61 73 65 2c 0a 63 6f 75 72 74 65 73 release,.courtes
3da0: 79 20 6f 66 20 74 68 65 20 3c 73 74 72 6f 6e 67 y of the <strong
3db0: 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 >OpenSSL</strong
3dc0: 3e 20 70 72 6f 6a 65 63 74 2e 3c 2f 70 3e 0a 0a > project.</p>..
3dd0: 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 63 6b <pre><code>.pack
3de0: 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74 70 age require http
3df0: 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 .package require
3e00: 20 74 6c 73 0a 0a 68 74 74 70 3a 3a 72 65 67 69 tls..http::regi
3e10: 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 5b ster https 443 [
3e20: 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b list ::tls::sock
3e30: 65 74 20 2d 72 65 71 75 69 72 65 20 31 20 2d 63 et -require 1 -c
3e40: 61 66 69 6c 65 20 2e 2f 73 65 72 76 65 72 2e 70 afile ./server.p
3e50: 65 6d 5d 0a 0a 73 65 74 20 74 6f 6b 20 5b 68 74 em]..set tok [ht
3e60: 74 70 3a 3a 67 65 74 75 72 6c 20 68 74 74 70 73 tp::geturl https
3e70: 3a 2f 2f 64 65 76 65 6c 6f 70 65 72 2e 6e 65 74 ://developer.net
3e80: 73 63 61 70 65 2e 63 6f 6d 2f 5d 0a 3c 2f 63 6f scape.com/].</co
3e90: 64 65 3e 3c 2f 70 72 65 3e 0a 0a 3c 68 33 3e 3c de></pre>..<h3><
3ea0: 61 20 6e 61 6d 65 3d 22 53 50 45 43 49 41 4c 20 a name="SPECIAL
3eb0: 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 22 3e CONSIDERATIONS">
3ec0: 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 SPECIAL CONSIDER
3ed0: 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a ATIONS</a></h3>.
3ee0: 0a 3c 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69 .<p>The capabili
3ef0: 74 69 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 ties of this pac
3f00: 6b 61 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e kage can vary en
3f10: 6f 72 6d 6f 75 73 6c 79 20 62 61 73 65 64 0a 75 ormously based.u
3f20: 70 6f 6e 20 68 6f 77 20 79 6f 75 72 20 4f 70 65 pon how your Ope
3f30: 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 nSSL library was
3f40: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 configured and
3f50: 62 75 69 6c 74 2e 20 41 74 20 74 68 65 0a 6d 6f built. At the.mo
3f60: 73 74 20 6d 61 63 72 6f 2d 6c 65 76 65 6c 20 4f st macro-level O
3f70: 70 65 6e 53 53 4c 20 73 75 70 70 6f 72 74 73 20 penSSL supports
3f80: 61 20 26 71 75 6f 74 3b 6e 6f 20 70 61 74 65 6e a "no paten
3f90: 74 73 26 71 75 6f 74 3b 20 62 75 69 6c 64 2c 0a ts" build,.
3fa0: 77 68 69 63 68 20 64 69 73 61 62 6c 65 73 20 52 which disables R
3fb0: 53 41 2c 20 49 44 45 41 2c 20 52 43 28 32 2c 34 SA, IDEA, RC(2,4
3fc0: 2c 35 29 20 61 6e 64 20 53 53 4c 32 20 2d 20 69 ,5) and SSL2 - i
3fd0: 66 20 79 6f 75 72 20 4f 70 65 6e 53 53 4c 20 69 f your OpenSSL i
3fe0: 73 0a 63 6f 6e 66 69 67 75 72 65 64 20 74 68 69 s.configured thi
3ff0: 73 20 77 61 79 20 74 68 65 6e 20 79 6f 75 20 77 s way then you w
4000: 69 6c 6c 20 6e 65 65 64 20 74 6f 20 62 75 69 6c ill need to buil
4010: 64 20 54 4c 53 20 77 69 74 68 20 74 68 65 0a 2d d TLS with the.-
4020: 44 4e 4f 5f 50 41 54 45 4e 54 53 20 6f 70 74 69 DNO_PATENTS opti
4030: 6f 6e 20 2d 20 61 6e 64 20 74 68 65 20 72 65 73 on - and the res
4040: 75 6c 74 61 6e 74 20 6d 6f 64 75 6c 65 20 77 69 ultant module wi
4050: 6c 6c 20 66 75 6e 63 74 69 6f 6e 0a 63 6f 72 72 ll function.corr
4060: 65 63 74 6c 79 20 61 6e 64 20 61 6c 73 6f 20 73 ectly and also s
4070: 75 70 70 6f 72 74 20 41 44 48 20 63 65 72 74 69 upport ADH certi
4080: 66 69 63 61 74 65 2d 6c 65 73 73 20 65 6e 63 72 ficate-less encr
4090: 79 70 74 69 6f 6e 2c 0a 68 6f 77 65 76 65 72 20 yption,.however
40a0: 79 6f 75 20 77 69 6c 6c 20 62 65 20 75 6e 61 62 you will be unab
40b0: 6c 65 20 74 6f 20 75 74 69 6c 69 7a 65 20 74 68 le to utilize th
40c0: 69 73 20 74 6f 20 73 70 65 61 6b 20 74 6f 20 6e is to speak to n
40d0: 6f 72 6d 61 6c 20 57 65 62 0a 53 65 72 76 65 72 ormal Web.Server
40e0: 73 2c 20 77 68 69 63 68 20 74 79 70 69 63 61 6c s, which typical
40f0: 6c 79 20 72 65 71 75 69 72 65 20 52 53 41 20 73 ly require RSA s
4100: 75 70 70 6f 72 74 2e 20 50 6c 65 61 73 65 20 73 upport. Please s
4110: 65 65 20 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 ee <a.href="http
4120: 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f ://www.openssl.o
4130: 72 67 2f 22 3e 68 74 74 70 3a 2f 2f 77 77 77 2e rg/">http://www.
4140: 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 3c 2f 61 3e openssl.org/</a>
4150: 20 66 6f 72 0a 6d 6f 72 65 20 69 6e 66 6f 72 6d for.more inform
4160: 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 77 68 6f ation on the who
4170: 6c 65 20 69 73 73 75 65 20 6f 66 20 70 61 74 65 le issue of pate
4180: 6e 74 73 20 61 6e 64 20 55 53 20 65 78 70 6f 72 nts and US expor
4190: 74 0a 72 65 73 74 72 69 63 74 69 6f 6e 73 2e 20 t.restrictions.
41a0: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d </p>..<h3><a nam
41b0: 65 3d 22 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 e="SEE ALSO">SEE
41c0: 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a ALSO</a></h3>..
41d0: 3c 70 3e 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 <p><strong>socke
41e0: 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 t</strong>, <str
41f0: 6f 6e 67 3e 66 69 6c 65 65 76 65 6e 74 2c 20 3c ong>fileevent, <
4200: 2f 73 74 72 6f 6e 67 3e 3c 61 0a 68 72 65 66 3d /strong><a.href=
4210: 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e "http://www.open
4220: 73 73 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72 6f 6e ssl.org/"><stron
4230: 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e g>OpenSSL</stron
4240: 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68 72 3e g></a></p>..<hr>
4250: 0a 0a 3c 70 72 65 3e 0a 43 6f 70 79 72 69 67 68 ..<pre>.Copyrigh
4260: 74 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 t © 1999 Ma
4270: 74 74 20 4e 65 77 6d 61 6e 2e 0a 43 6f 70 79 72 tt Newman..Copyr
4280: 69 67 68 74 20 26 63 6f 70 79 3b 20 32 30 30 34 ight © 2004
4290: 20 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d Starfish System
42a0: 73 2e 0a 3c 2f 70 72 65 3e 0a 3c 2f 62 6f 64 79 s..</pre>.</body
42b0: 3e 0a 3c 2f 68 74 6d 6c 3e 0a >.</html>.