Artifact
a45796fce3d3b22e28003850e9021375f7fd4421:
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 34 3f 3c 2f 65 6d 3e 3c 2f <em>?8.4?</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 36 3f 3c 2f 65 6d 3e 3c 2f 64 em>?1.6?</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 34 require Tcl 8.4
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 34 of Tcl than 8.4
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 0a 3c 2f 70 3e 0a 0a 3c TLS 1.3..</p>..<
0b80: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f 4d 4d h3><a name="COMM
0b90: 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f ANDS">COMMANDS</
0ba0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 70 69 a></h3>..<p>Typi
0bb0: 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c 64 20 cally one would
0bc0: 75 73 65 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e use the <strong>
0bd0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 73 74 tls::socket </st
0be0: 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 68 69 rong>command.whi
0bf0: 63 68 20 70 72 6f 76 69 64 65 73 20 63 6f 6d 70 ch provides comp
0c00: 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 74 atibility with t
0c10: 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 he native Tcl <s
0c20: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 trong>socket</st
0c30: 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e 20 49 rong>.command. I
0c40: 6e 20 73 75 63 68 20 63 61 73 65 73 20 3c 73 74 n such cases <st
0c50: 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 rong>tls::import
0c60: 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f 75 6c 64 </strong> should
0c70: 20 6e 6f 74 20 62 65 0a 75 73 65 64 20 64 69 72 not be.used dir
0c80: 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 6c 3e ectly.</p>..<dl>
0c90: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
0ca0: 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e ="tls::init"><b>
0cb0: 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e 3c 69 tls::init </b><i
0cc0: 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f >?options?</i></
0cd0: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e a></dt>. <dd>
0ce0: 54 68 69 73 20 72 6f 75 74 69 6e 65 20 73 65 74 This routine set
0cf0: 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 s the default op
0d00: 74 69 6f 6e 73 20 75 73 65 64 20 62 79 20 3c 73 tions used by <s
0d10: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 trong>tls::socke
0d20: 74 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 20 t</strong>.
0d30: 20 20 20 61 6e 64 20 69 73 20 3c 65 6d 3e 6f 70 and is <em>op
0d40: 74 69 6f 6e 61 6c 3c 2f 65 6d 3e 2e 20 49 66 20 tional</em>. If
0d50: 79 6f 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 you call <strong
0d60: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 >tls::import</st
0d70: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 64 69 rong>. di
0d80: 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f 75 74 rectly this rout
0d90: 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 65 63 ine has no effec
0da0: 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 6f 70 t. Any of the op
0db0: 74 69 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 68 tions. th
0dc0: 61 74 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a at <strong>tls::
0dd0: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 socket</strong>
0de0: 61 63 63 65 70 74 73 20 63 61 6e 20 62 65 20 73 accepts can be s
0df0: 65 74 0a 20 20 20 20 20 20 20 20 75 73 69 6e 67 et. using
0e00: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 74 this command, t
0e10: 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c 64 hough you should
0e20: 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69 limit your opti
0e30: 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 6f 20 6f ons. to o
0e40: 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20 nly TLS related
0e50: 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c ones.</dd>. <
0e60: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 dt> </dt>.
0e70: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 <dt><a name="
0e80: 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e tls::socket"><b>
0e90: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e tls::socket </b>
0ea0: 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 20 20 <em>?options?.
0eb0: 20 20 20 20 20 20 68 6f 73 74 20 70 6f 72 74 3c host port<
0ec0: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 /em></a></dt>.
0ed0: 20 20 3c 64 74 3e 3c 62 3e 74 6c 73 3a 3a 73 6f <dt><b>tls::so
0ee0: 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e 20 3f 2d 73 cket</b><em> ?-s
0ef0: 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f erver command? ?
0f00: 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 options? port</e
0f10: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e m></dt>. <dd>
0f20: 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 72 This is a helper
0f30: 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 function that u
0f40: 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65 tilizes the unde
0f50: 72 6c 79 69 6e 67 0a 20 20 20 20 20 20 20 20 63 rlying. c
0f60: 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 ommands (<strong
0f70: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 >tls::import</st
0f80: 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76 rong>). It behav
0f90: 65 73 0a 20 20 20 20 20 20 20 20 65 78 61 63 74 es. exact
0fa0: 6c 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 ly the same as t
0fb0: 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 he native Tcl <s
0fc0: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 trong>socket</st
0fd0: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 63 6f rong>. co
0fe0: 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 61 mmand except tha
0ff0: 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 t the options ca
1000: 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66 n include any of
1010: 20 74 68 65 0a 20 20 20 20 20 20 20 20 61 70 70 the. app
1020: 6c 69 63 61 62 6c 65 20 3c 61 20 68 72 65 66 3d licable <a href=
1030: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c "#tls::import"><
1040: 73 74 72 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 strong>tls:impor
1050: 74 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 20 t</strong></a>.
1060: 20 20 20 20 20 20 20 6f 70 74 69 6f 6e 73 2e 3c options.<
1070: 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 /dd>. <dt>&nb
1080: 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 sp;</dt>. <dt
1090: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 ><a name="tls::h
10a0: 61 6e 64 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e andshake"><stron
10b0: 67 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 g>tls::handshake
10c0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
10d0: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f annel</em></a></
10e0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63 dt>. <dd>Forc
10f0: 65 73 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 es handshake to
1100: 74 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 20 take place, and
1110: 72 65 74 75 72 6e 73 20 30 20 69 66 0a 20 20 20 returns 0 if.
1120: 20 20 20 20 20 68 61 6e 64 73 68 61 6b 65 20 69 handshake i
1130: 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 s still in progr
1140: 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e ess (non-blockin
1150: 67 29 2c 20 6f 72 20 31 20 69 66 0a 20 20 20 20 g), or 1 if.
1160: 20 20 20 20 74 68 65 20 68 61 6e 64 73 68 61 6b the handshak
1170: 65 20 77 61 73 20 73 75 63 63 65 73 73 66 75 6c e was successful
1180: 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 68 61 . If the handsha
1190: 6b 65 20 66 61 69 6c 65 64 0a 20 20 20 20 20 20 ke failed.
11a0: 20 20 74 68 69 73 20 72 6f 75 74 69 6e 65 20 77 this routine w
11b0: 69 6c 6c 20 74 68 72 6f 77 20 61 6e 20 65 72 72 ill throw an err
11c0: 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 or.</dd>. <dt
11d0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 > </dt>.
11e0: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
11f0: 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f s::status"><stro
1200: 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f ng>tls::status</
1210: 73 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e strong>. <em>
1220: 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c ?-local? channel
1230: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
1240: 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 <dd>Returns t
1250: 68 65 20 63 75 72 72 65 6e 74 20 73 65 63 75 72 he current secur
1260: 69 74 79 20 73 74 61 74 75 73 20 6f 66 20 61 6e ity status of an
1270: 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 SSL channel. Th
1280: 65 0a 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 e. result
1290: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 is a list of ke
12a0: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 y-value pairs de
12b0: 73 63 72 69 62 69 6e 67 20 74 68 65 0a 20 20 20 scribing the.
12c0: 20 20 20 20 20 63 6f 6e 6e 65 63 74 65 64 20 70 connected p
12d0: 65 65 72 2e 20 49 66 20 74 68 65 20 72 65 73 75 eer. If the resu
12e0: 6c 74 20 69 73 20 61 6e 20 65 6d 70 74 79 20 6c lt is an empty l
12f0: 69 73 74 20 74 68 65 6e 20 74 68 65 0a 20 20 20 ist then the.
1300: 20 20 20 20 20 53 53 4c 20 68 61 6e 64 73 68 61 SSL handsha
1310: 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 ke has not yet c
1320: 6f 6d 70 6c 65 74 65 64 2e 0a 20 20 20 20 20 20 ompleted..
1330: 20 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c If <em>-local<
1340: 2f 65 6d 3e 20 69 73 20 67 69 76 65 6e 2c 20 74 /em> is given, t
1350: 68 65 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 hen the certific
1360: 61 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a ate information.
1370: 20 20 20 20 20 20 20 20 69 73 20 74 68 65 20 6f is the o
1380: 6e 65 20 75 73 65 64 20 6c 6f 63 61 6c 6c 79 2e ne used locally.
1390: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 62 6c </dd>.</dl>..<bl
13a0: 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 ockquote>. <d
13b0: 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c l>. <dt><
13c0: 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73 strong>issuer</s
13d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 trong> <em>dn</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 54 68 65 20 64 69 73 74 69 6e 67 75 <dd>The distingu
1400: 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 ished name (DN)
1410: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
1420: 74 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 te. i
1430: 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 ssuer.</dd>.
1440: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
1450: 73 75 62 6a 65 63 74 3c 2f 73 74 72 6f 6e 67 3e subject</strong>
1460: 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 <em>dn</em></dt
1470: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 >. <dd>Th
1480: 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 e distinguished
1490: 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 name (DN) of the
14a0: 20 63 65 72 74 69 66 69 63 61 74 65 0a 20 20 20 certificate.
14b0: 20 20 20 20 20 20 20 20 20 73 75 62 6a 65 63 74 subject
14c0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
14d0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 42 65 dt><strong>notBe
14e0: 66 6f 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 fore</strong> <e
14f0: 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>date</em></dt>
1500: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 . <dd>The
1510: 20 62 65 67 69 6e 20 64 61 74 65 20 66 6f 72 20 begin date for
1520: 74 68 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20 the validity of
1530: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e the certificate.
1540: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
1550: 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 66 74 t><strong>notAft
1560: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e er</strong> <em>
1570: 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 date</em></dt>.
1580: 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 65 <dd>The e
1590: 78 70 69 72 79 20 64 61 74 65 20 66 6f 72 20 74 xpiry date for t
15a0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c he certificate.<
15b0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
15c0: 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 69 61 6c 3c ><strong>serial<
15d0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f /strong> <em>n</
15e0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
15f0: 20 3c 64 64 3e 54 68 65 20 73 65 72 69 61 6c 20 <dd>The serial
1600: 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 number of the ce
1610: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
1620: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
1630: 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f ong>cipher</stro
1640: 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f ng> <em>cipher</
1650: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
1660: 20 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74 <dd>The current
1670: 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 62 cipher in use b
1680: 65 74 77 65 65 6e 20 74 68 65 20 63 6c 69 65 6e etween the clien
1690: 74 20 61 6e 64 0a 20 20 20 20 20 20 20 20 20 20 t and.
16a0: 20 20 73 65 72 76 65 72 20 63 68 61 6e 6e 65 6c server channel
16b0: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 s.</dd>.
16c0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 62 69 74 <dt><strong>sbit
16d0: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e s</strong> <em>n
16e0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
16f0: 20 20 20 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 <dd>The numbe
1700: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 r of bits used f
1710: 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b or the session k
1720: 65 79 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 ey.</dd>. </d
1730: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e l>.</blockquote>
1740: 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c ..<dl>. <dt><
1750: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d 70 a name="tls::imp
1760: 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 ort"><b>tls::imp
1770: 6f 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e ort </b><i>chann
1780: 65 6c 0a 20 20 20 20 20 20 20 20 3f 6f 70 74 69 el. ?opti
1790: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 ons?</i></a></dt
17a0: 3e 0a 20 20 20 20 3c 64 64 3e 53 53 4c 2d 65 6e >. <dd>SSL-en
17b0: 61 62 6c 65 20 61 20 72 65 67 75 6c 61 72 20 54 able a regular T
17c0: 63 6c 20 63 68 61 6e 6e 65 6c 20 2d 20 69 74 20 cl channel - it
17d0: 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 0a 20 20 need not be a.
17e0: 20 20 20 20 20 20 73 6f 63 6b 65 74 2c 20 62 75 socket, bu
17f0: 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62 t must provide b
1800: 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c i-directional fl
1810: 6f 77 2e 20 41 6c 73 6f 0a 20 20 20 20 20 20 20 ow. Also.
1820: 20 73 65 74 74 69 6e 67 20 73 65 73 73 69 6f 6e setting session
1830: 20 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72 20 parameters for
1840: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f SSL handshake.</
1850: 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 62 6c 6f 63 dd>.</dl>..<bloc
1860: 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e kquote>. <dl>
1870: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
1880: 72 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74 72 rong>-cadir</str
1890: 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 6d ong> <em>dir</em
18a0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
18b0: 64 64 3e 50 72 6f 76 69 64 65 20 74 68 65 20 64 dd>Provide the d
18c0: 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e irectory contain
18d0: 69 6e 67 20 74 68 65 20 43 41 20 63 65 72 74 69 ing the CA certi
18e0: 66 69 63 61 74 65 73 2e 3c 2f 64 64 3e 0a 20 20 ficates.</dd>.
18f0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
1900: 67 3e 2d 63 61 66 69 6c 65 20 3c 2f 73 74 72 6f g>-cafile </stro
1910: 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c ng><em>filename<
1920: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
1930: 20 20 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68 <dd>Provide th
1940: 65 20 43 41 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a e CA file.</dd>.
1950: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
1960: 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 73 ong>-certfile</s
1970: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e trong> <em>filen
1980: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ame</em></dt>.
1990: 20 20 20 20 20 20 3c 64 64 3e 50 72 6f 76 69 64 <dd>Provid
19a0: 65 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 e the certificat
19b0: 65 20 74 6f 20 75 73 65 2e 3c 2f 64 64 3e 0a 20 e to use.</dd>.
19c0: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
19d0: 6e 67 3e 2d 63 69 70 68 65 72 20 3c 2f 73 74 72 ng>-cipher </str
19e0: 6f 6e 67 3e 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ong><em>string</
19f0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
1a00: 20 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68 65 <dd>Provide the
1a10: 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74 cipher suites t
1a20: 6f 20 75 73 65 2e 20 53 79 6e 74 61 78 20 69 73 o use. Syntax is
1a30: 20 61 73 20 70 65 72 0a 20 20 20 20 20 20 20 20 as per.
1a40: 20 20 20 20 4f 70 65 6e 53 53 4c 2e 3c 2f 64 64 OpenSSL.</dd
1a50: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
1a60: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f trong>-command</
1a70: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c strong> <em>call
1a80: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 back</em></dt>.
1a90: 20 20 20 20 20 20 20 3c 64 64 3e 49 66 20 73 70 <dd>If sp
1aa0: 65 63 69 66 69 65 64 2c 20 74 68 69 73 20 63 61 ecified, this ca
1ab0: 6c 6c 62 61 63 6b 20 77 69 6c 6c 20 62 65 20 69 llback will be i
1ac0: 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72 61 nvoked at severa
1ad0: 6c 20 70 6f 69 6e 74 73 0a 20 20 20 20 20 20 20 l points.
1ae0: 20 20 20 20 20 64 75 72 69 6e 67 20 74 68 65 20 during the
1af0: 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b OpenSSL handshak
1b00: 65 2e 20 20 49 74 20 63 61 6e 20 70 61 73 73 20 e. It can pass
1b10: 65 72 72 6f 72 73 20 61 6e 64 20 74 72 61 63 69 errors and traci
1b20: 6e 67 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 ng. i
1b30: 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 20 nformation, and
1b40: 69 74 20 63 61 6e 20 61 6c 6c 6f 77 20 54 63 6c it can allow Tcl
1b50: 20 73 63 72 69 70 74 73 20 74 6f 20 70 65 72 66 scripts to perf
1b60: 6f 72 6d 0a 20 20 20 20 20 20 20 20 20 20 20 20 orm.
1b70: 74 68 65 69 72 20 6f 77 6e 20 76 61 6c 69 64 61 their own valida
1b80: 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 65 72 74 tion of the cert
1b90: 69 66 69 63 61 74 65 20 69 6e 20 70 6c 61 63 65 ificate in place
1ba0: 20 6f 66 20 74 68 65 0a 20 20 20 20 20 20 20 20 of the.
1bb0: 20 20 20 20 64 65 66 61 75 6c 74 20 76 61 6c 69 default vali
1bc0: 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 dation provided
1bd0: 62 79 20 4f 70 65 6e 53 53 4c 2e 0a 20 20 20 20 by OpenSSL..
1be0: 20 20 20 20 20 20 20 20 3c 62 72 3e 0a 20 20 20 <br>.
1bf0: 20 20 20 20 20 20 20 20 20 53 65 65 20 3c 61 20 See <a
1c00: 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 href="#CALLBACK
1c10: 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 OPTIONS">CALLBAC
1c20: 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 20 66 6f K OPTIONS</a> fo
1c30: 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 75 r. fu
1c40: 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e rther discussion
1c50: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
1c60: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 66 dt><strong>-keyf
1c70: 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ile</strong> <em
1c80: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f >filename</em></
1c90: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e dt>. <dd>
1ca0: 50 72 6f 76 69 64 65 20 74 68 65 20 70 72 69 76 Provide the priv
1cb0: 61 74 65 20 6b 65 79 20 66 69 6c 65 2e 20 28 3c ate key file. (<
1cc0: 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c 2f strong>default</
1cd0: 73 74 72 6f 6e 67 3e 3a 0a 20 20 20 20 20 20 20 strong>:.
1ce0: 20 20 20 20 20 76 61 6c 75 65 20 6f 66 20 2d 63 value of -c
1cf0: 65 72 74 66 69 6c 65 29 3c 2f 64 64 3e 0a 20 20 ertfile)</dd>.
1d00: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
1d10: 67 3e 2d 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e 67 g>-model</strong
1d20: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 > <em>channel</e
1d30: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
1d40: 3c 64 64 3e 54 68 69 73 20 77 69 6c 6c 20 66 6f <dd>This will fo
1d50: 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c rce this channel
1d60: 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 to share the sa
1d70: 6d 65 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53 me <em><strong>S
1d80: 53 4c 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c SL_CTX</strong><
1d90: 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 20 20 20 /em>.
1da0: 20 73 74 72 75 63 74 75 72 65 20 61 73 20 74 68 structure as th
1db0: 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e e specified <em>
1dc0: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 6e channel</em>, an
1dd0: 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 d. th
1de0: 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 63 61 erefore share ca
1df0: 6c 6c 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 llbacks etc.</dd
1e00: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
1e10: 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c trong>-password<
1e20: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c /strong> <em>cal
1e30: 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a lback</em></dt>.
1e40: 20 20 20 20 20 20 20 20 3c 64 64 3e 49 66 20 73 <dd>If s
1e50: 75 70 70 6c 69 65 64 2c 20 74 68 69 73 20 63 61 upplied, this ca
1e60: 6c 6c 62 61 63 6b 20 77 69 6c 6c 20 62 65 20 69 llback will be i
1e70: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 4f 70 65 6e nvoked when Open
1e80: 53 53 4c 20 6e 65 65 64 73 0a 20 20 20 20 20 20 SSL needs.
1e90: 20 20 20 20 20 20 74 6f 20 6f 62 74 61 69 6e 20 to obtain
1ea0: 61 20 70 61 73 73 77 6f 72 64 2c 20 74 79 70 69 a password, typi
1eb0: 63 61 6c 6c 79 20 74 6f 20 75 6e 6c 6f 63 6b 20 cally to unlock
1ec0: 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 the private key
1ed0: 6f 66 0a 09 20 20 20 20 61 20 63 65 72 74 69 66 of.. a certif
1ee0: 69 63 61 74 65 2e 0a 20 20 20 20 20 20 20 20 20 icate..
1ef0: 20 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 The callback
1f00: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20 should return a
1f10: 73 74 72 69 6e 67 20 77 68 69 63 68 20 72 65 70 string which rep
1f20: 72 65 73 65 6e 74 73 20 74 68 65 0a 20 20 20 20 resents the.
1f30: 20 20 20 20 20 20 20 20 70 61 73 73 77 6f 72 64 password
1f40: 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 20 20 20 to be used..
1f50: 20 20 20 20 20 20 20 20 20 3c 62 72 3e 0a 20 20 <br>.
1f60: 20 20 20 20 20 20 20 20 20 20 53 65 65 20 3c 61 See <a
1f70: 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b href="#CALLBACK
1f80: 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 OPTIONS">CALLBA
1f90: 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 20 66 CK OPTIONS</a> f
1fa0: 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 or. f
1fb0: 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f urther discussio
1fc0: 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 n.</dd>.
1fd0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 <dt><strong>-req
1fe0: 75 65 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 uest </strong><e
1ff0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e m>bool</em></dt>
2000: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 71 . <dd>Req
2010: 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 uest a certifica
2020: 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 te from peer dur
2030: 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b ing SSL handshak
2040: 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 28 e.. (
2050: 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c <strong>default<
2060: 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 74 72 /strong>: <em>tr
2070: 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 ue</em>)</dd>.
2080: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
2090: 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74 72 6f g>-require</stro
20a0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
20b0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
20c0: 64 64 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c dd>Require a val
20d0: 69 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66 id certificate f
20e0: 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67 20 rom peer during
20f0: 53 53 4c 0a 20 20 20 20 20 20 20 20 20 20 20 20 SSL.
2100: 68 61 6e 64 73 68 61 6b 65 2e 20 49 66 20 74 68 handshake. If th
2110: 69 73 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 is is set to tru
2120: 65 20 74 68 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d e then <strong>-
2130: 72 65 71 75 65 73 74 3c 2f 73 74 72 6f 6e 67 3e request</strong>
2140: 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 75 73 . mus
2150: 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f t also be set to
2160: 20 74 72 75 65 2e 20 28 3c 73 74 72 6f 6e 67 3e true. (<strong>
2170: 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e default</strong>
2180: 3a 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e : <em>false</em>
2190: 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c )</dd>. <
21a0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 dt><strong>-serv
21b0: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e er</strong> <em>
21c0: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 bool</em></dt>.
21d0: 20 20 20 20 20 20 20 3c 64 64 3e 48 61 6e 64 73 <dd>Hands
21e0: 68 61 6b 65 20 61 73 20 73 65 72 76 65 72 20 69 hake as server i
21f0: 66 20 74 72 75 65 2c 20 65 6c 73 65 20 68 61 6e f true, else han
2200: 64 73 68 61 6b 65 20 61 73 0a 20 20 20 20 20 20 dshake as.
2210: 20 20 20 20 20 20 63 6c 69 65 6e 74 2e 28 3c 73 client.(<s
2220: 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c 2f 73 trong>default</s
2230: 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 66 61 6c 73 trong>: <em>fals
2240: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 e</em>)</dd>.
2250: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
2260: 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 >-servername</st
2270: 72 6f 6e 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c 2f rong> <em>host</
2280: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
2290: 20 3c 64 64 3e 4f 6e 6c 79 20 61 76 61 69 6c 61 <dd>Only availa
22a0: 62 6c 65 20 69 66 20 74 68 65 20 4f 70 65 6e 53 ble if the OpenS
22b0: 53 4c 20 6c 69 62 72 61 72 79 20 74 68 65 20 70 SL library the p
22c0: 61 63 6b 61 67 65 20 69 73 20 6c 69 6e 6b 65 64 ackage is linked
22d0: 0a 09 20 20 20 20 61 67 61 69 6e 73 74 20 73 75 .. against su
22e0: 70 70 6f 72 74 73 20 74 68 65 20 54 4c 53 20 68 pports the TLS h
22f0: 6f 73 74 6e 61 6d 65 20 65 78 74 65 6e 73 69 6f ostname extensio
2300: 6e 20 66 6f 72 20 27 53 65 72 76 65 72 20 4e 61 n for 'Server Na
2310: 6d 65 0a 09 20 20 20 20 49 6e 64 69 63 61 74 69 me.. Indicati
2320: 6f 6e 27 20 28 53 4e 49 29 2e 20 55 73 65 20 74 on' (SNI). Use t
2330: 6f 20 6e 61 6d 65 20 74 68 65 20 6c 6f 67 69 63 o name the logic
2340: 61 6c 20 68 6f 73 74 20 77 65 20 61 72 65 20 74 al host we are t
2350: 61 6c 6b 69 6e 67 0a 09 20 20 20 20 74 6f 20 61 alking.. to a
2360: 6e 64 20 65 78 70 65 63 74 69 6e 67 20 61 20 63 nd expecting a c
2370: 65 72 74 69 66 69 63 61 74 65 20 66 6f 72 3c 2f ertificate for</
2380: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dd>. <dt>
2390: 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f 73 <strong>-ssl2</s
23a0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
23b0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
23c0: 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 <dd>Enable use
23d0: 20 6f 66 20 53 53 4c 20 76 32 2e 20 28 3c 73 74 of SSL v2. (<st
23e0: 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c 2f 73 74 rong>default</st
23f0: 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 74 72 75 65 3c rong>: <em>true<
2400: 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 20 20 20 /em>.
2410: 20 75 6e 6c 65 73 73 20 2d 44 4e 4f 5f 50 41 54 unless -DNO_PAT
2420: 45 4e 54 53 20 77 61 73 20 73 70 65 63 69 66 69 ENTS was specifi
2430: 65 64 20 69 6e 20 62 75 69 6c 64 29 3c 2f 64 64 ed in build)</dd
2440: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
2450: 74 72 6f 6e 67 3e 2d 73 73 6c 33 20 3c 2f 73 74 trong>-ssl3 </st
2460: 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 rong><em>bool</e
2470: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
2480: 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f <dd>Enable use o
2490: 66 20 53 53 4c 20 76 33 2e 20 28 3c 73 74 72 6f f SSL v3. (<stro
24a0: 6e 67 3e 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f ng>default</stro
24b0: 6e 67 3e 3a 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 ng>: <em>true</e
24c0: 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 m>)</dd>.
24d0: 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c <dt>-<strong>tl
24e0: 73 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e s1</strong> <em>
24f0: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 bool</em></dt>.
2500: 20 20 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 6c <dd>Enabl
2510: 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e e use of TLS v1.
2520: 20 28 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c (<strong>defaul
2530: 74 3c 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e t</strong>: <em>
2540: 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e false</em>)</dd>
2550: 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f . </dl>.</blo
2560: 63 6b 71 75 6f 74 65 3e 0a 0a 3c 64 6c 3e 0a 20 ckquote>..<dl>.
2570: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 <dt><a name="
2580: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c tls::unimport"><
2590: 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 b>tls::unimport
25a0: 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f </b><i>channel</
25b0: 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 i></a></dt>.
25c0: 3c 64 64 3e 50 72 6f 76 69 64 65 64 20 66 6f 72 <dd>Provided for
25d0: 20 73 79 6d 6d 65 74 72 79 20 74 6f 20 3c 73 74 symmetry to <st
25e0: 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 rong>tls::import
25f0: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 74 68 69 73 0a </strong>, this.
2600: 20 20 20 20 20 20 75 6e 73 74 61 63 6b 73 20 74 unstacks t
2610: 68 65 20 53 53 4c 2d 65 6e 61 62 6c 69 6e 67 20 he SSL-enabling
2620: 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 63 6c of a regular Tcl
2630: 20 63 68 61 6e 6e 65 6c 2e 20 20 41 6e 20 65 72 channel. An er
2640: 72 6f 72 0a 20 20 20 20 20 20 69 73 20 74 68 72 ror. is thr
2650: 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f own if TLS is no
2660: 74 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65 t the top stacke
2670: 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c d channel type.<
2680: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 64 6c 3e /dd>.</dl>..<dl>
2690: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
26a0: 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 20 70 ="tls::ciphers p
26b0: 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 rotocol ?verbose
26c0: 3f 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a ?"><strong>tls::
26d0: 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e ciphers</strong>
26e0: 0a 20 20 20 20 20 20 20 20 3c 65 6d 3e 70 72 6f . <em>pro
26f0: 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 3c tocol ?verbose?<
2700: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 /em></a></dt>.
2710: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 6c 69 <dd>Returns li
2720: 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20 st of supported
2730: 63 69 70 68 65 72 73 20 62 61 73 65 64 20 6f 6e ciphers based on
2740: 20 74 68 65 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f the <em>protoco
2750: 6c 3c 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 79 l</em>. y
2760: 6f 75 20 73 75 70 70 6c 79 2c 20 77 68 69 63 68 ou supply, which
2770: 20 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 must be one of
2780: 3c 65 6d 3e 73 73 6c 32 2c 20 73 73 6c 33 2c 20 <em>ssl2, ssl3,
2790: 6f 72 20 74 6c 73 31 3c 2f 65 6d 3e 2e 0a 20 20 or tls1</em>..
27a0: 20 20 20 20 20 20 49 66 20 3c 65 6d 3e 76 65 72 If <em>ver
27b0: 62 6f 73 65 3c 2f 65 6d 3e 20 69 73 20 73 70 65 bose</em> is spe
27c0: 63 69 66 69 65 64 20 61 73 20 74 72 75 65 20 74 cified as true t
27d0: 68 65 6e 20 61 20 76 65 72 62 6f 73 65 2c 0a 20 hen a verbose,.
27e0: 20 20 20 20 20 20 20 73 65 6d 69 2d 68 75 6d 61 semi-huma
27f0: 6e 20 72 65 61 64 61 62 6c 65 20 6c 69 73 74 20 n readable list
2800: 69 73 20 72 65 74 75 72 6e 65 64 20 70 72 6f 76 is returned prov
2810: 69 64 69 6e 67 20 61 64 64 69 74 69 6f 6e 61 6c iding additional
2820: 0a 20 20 20 20 20 20 20 20 69 6e 66 6f 72 6d 61 . informa
2830: 74 69 6f 6e 20 6f 6e 20 74 68 65 20 6e 61 74 75 tion on the natu
2840: 72 65 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 re of the cipher
2850: 20 73 75 70 70 6f 72 74 2e 20 49 6e 20 65 61 63 support. In eac
2860: 68 0a 20 20 20 20 20 20 20 20 63 61 73 65 20 74 h. case t
2870: 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 20 54 he result is a T
2880: 63 6c 20 6c 69 73 74 2e 3c 2f 64 64 3e 0a 3c 2f cl list.</dd>.</
2890: 64 6c 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 dl>..<dl>. <d
28a0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
28b0: 76 65 72 73 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 version"><strong
28c0: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 73 >tls::version</s
28d0: 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a trong></a></dt>.
28e0: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 <dd>Returns
28f0: 74 68 65 20 76 65 72 73 69 6f 6e 20 73 74 72 69 the version stri
2900: 6e 67 20 64 65 66 69 6e 65 64 20 62 79 20 4f 70 ng defined by Op
2910: 65 6e 53 53 4c 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c enSSL.</dd>.</dl
2920: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
2930: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
2940: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f ">CALLBACK OPTIO
2950: 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e NS</a></h3>..<p>
2960: 0a 41 73 20 69 6e 64 69 63 61 74 65 64 20 61 62 .As indicated ab
2970: 6f 76 65 2c 20 69 6e 64 69 76 69 64 75 61 6c 20 ove, individual
2980: 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20 62 65 20 channels can be
2990: 67 69 76 65 6e 20 74 68 65 69 72 20 6f 77 6e 20 given their own
29a0: 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 6e callbacks.to han
29b0: 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 74 65 dle intermediate
29c0: 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 74 processing by t
29d0: 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 he OpenSSL libra
29e0: 72 79 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c 65 ry, using the.<e
29f0: 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 m>-command</em>
2a00: 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 73 77 6f 72 and <em>-passwor
2a10: 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 73 20 70 d</em> options p
2a20: 61 73 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 assed to either
2a30: 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a of.<strong>tls::
2a40: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 socket</strong>
2a50: 6f 72 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a or <strong>tls::
2a60: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 2e import</strong>.
2a70: 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f .</p>..<blockquo
2a80: 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 te>.<dl>.. <d
2a90: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 t><strong>-comma
2aa0: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e nd</strong> <em>
2ab0: 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 callback</em></d
2ac0: 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 t>. <dd>..Inv
2ad0: 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 69 okes the specifi
2ae0: 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c ed <em>callback<
2af0: 2f 65 6d 3e 20 73 63 72 69 70 74 20 61 74 0a 09 /em> script at..
2b00: 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 several points d
2b10: 75 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 53 uring the OpenSS
2b20: 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 45 78 L handshake...Ex
2b30: 63 65 70 74 20 61 73 20 69 6e 64 69 63 61 74 65 cept as indicate
2b40: 64 20 62 65 6c 6f 77 2c 20 76 61 6c 75 65 73 20 d below, values
2b50: 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 returned from th
2b60: 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61 72 65 20 e..callback are
2b70: 69 67 6e 6f 72 65 64 2e 0a 09 41 72 67 75 6d 65 ignored...Argume
2b80: 6e 74 73 20 61 70 70 65 6e 64 65 64 20 74 6f 20 nts appended to
2b90: 74 68 65 20 73 63 72 69 70 74 20 75 70 6f 6e 20 the script upon
2ba0: 63 61 6c 6c 62 61 63 6b 20 74 61 6b 65 20 6f 6e callback take on
2bb0: 65 20 6f 66 20 74 68 65 0a 09 66 6f 6c 6c 6f 77 e of the..follow
2bc0: 69 6e 67 20 66 6f 72 6d 73 3a 0a 0a 09 3c 62 72 ing forms:...<br
2bd0: 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a >..<br>...<dl>..
2be0: 3c 21 2d 2d 09 54 68 69 73 20 66 6f 72 6d 20 6f <!--.This form o
2bf0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 64 69 f callback is di
2c00: 73 61 62 6c 65 64 2e 0a 0a 09 3c 64 74 3e 0a 09 sabled....<dt>..
2c10: 20 20 3c 73 74 72 6f 6e 67 3e 65 72 72 6f 72 3c <strong>error<
2c20: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 /strong> <em>cha
2c30: 6e 6e 65 6c 20 6d 65 73 73 61 67 65 3c 2f 65 6d nnel message</em
2c40: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 >..</dt>..<dd>..
2c50: 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67 The <em>messag
2c60: 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 e</em> argument
2c70: 63 6f 6e 74 61 69 6e 73 20 61 6e 20 65 72 72 6f contains an erro
2c80: 72 20 6d 65 73 73 61 67 65 20 67 65 6e 65 72 61 r message genera
2c90: 74 65 64 0a 09 20 20 62 79 20 74 68 65 20 4f 70 ted.. by the Op
2ca0: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 enSSL function..
2cb0: 20 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65 61 73 <code>ERR_reas
2cc0: 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 on_error_string(
2cd0: 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f 64 64 3e )</code>...</dd>
2ce0: 0a 0a 09 3c 62 72 3e 0a 2d 2d 3e 0a 0a 09 3c 64 ...<br>.-->...<d
2cf0: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e t>.. <strong>in
2d00: 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e fo</strong> <em>
2d10: 63 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 channel major mi
2d20: 6e 6f 72 20 6d 65 73 73 61 67 65 3c 2f 65 6d 3e nor message</em>
2d30: 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 ..</dt>..<dd>..
2d40: 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 This form of ca
2d50: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 llback is invoke
2d60: 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c d by the OpenSSL
2d70: 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f function.. <co
2d80: 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 74 5f 69 de>SSL_CTX_set_i
2d90: 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f nfo_callback()</
2da0: 63 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 code>... <br>..
2db0: 20 20 54 68 65 20 3c 65 6d 3e 6d 61 6a 6f 72 3c The <em>major<
2dc0: 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e 6d 69 6e /em> and <em>min
2dd0: 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 or</em> argument
2de0: 73 20 61 72 65 20 75 73 65 64 20 74 6f 0a 09 20 s are used to..
2df0: 20 72 65 70 72 65 73 65 6e 74 20 74 68 65 20 73 represent the s
2e00: 74 61 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e tate information
2e10: 20 62 69 74 6d 61 73 6b 2e 0a 09 20 20 3c 64 6c bitmask... <dl
2e20: 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 69 62 6c >.. <dt>Possibl
2e30: 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d e values for <em
2e40: 3e 6d 61 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a >major</em> are:
2e50: 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 6f </dt>.. <dd><co
2e60: 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c 20 61 6c de>handshake, al
2e70: 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c 20 61 63 ert, connect, ac
2e80: 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 64 cept</code>.</dd
2e90: 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 69 62 6c >.. <dt>Possibl
2ea0: 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d e values for <em
2eb0: 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a >minor</em> are:
2ec0: 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 6f </dt>.. <dd><co
2ed0: 64 65 3e 73 74 61 72 74 2c 20 64 6f 6e 65 2c 20 de>start, done,
2ee0: 72 65 61 64 2c 20 77 72 69 74 65 2c 20 6c 6f 6f read, write, loo
2ef0: 70 2c 20 65 78 69 74 3c 2f 63 6f 64 65 3e 2e 3c p, exit</code>.<
2f00: 2f 64 64 3e 0a 09 20 20 3c 2f 64 6c 3e 0a 09 20 /dd>.. </dl>..
2f10: 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67 65 The <em>message
2f20: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 </em> argument i
2f30: 73 20 61 20 64 65 73 63 72 69 70 74 69 76 65 20 s a descriptive
2f40: 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61 79 string which may
2f50: 0a 09 20 20 62 65 20 67 65 6e 65 72 61 74 65 64 .. be generated
2f60: 20 65 69 74 68 65 72 20 62 79 0a 09 20 20 3c 63 either by.. <c
2f70: 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 ode>SSL_state_st
2f80: 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 ring_long()</cod
2f90: 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c 63 6f 64 e> or by.. <cod
2fa0: 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 e>SSL_alert_desc
2fb0: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f _string_long()</
2fc0: 63 6f 64 65 3e 2c 0a 09 20 20 64 65 70 65 6e 64 code>,.. depend
2fd0: 69 6e 67 20 6f 6e 20 63 6f 6e 74 65 78 74 2e 0a ing on context..
2fe0: 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 .</dd>...<br>...
2ff0: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e <dt>.. <strong>
3000: 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e 67 3e 20 verify</strong>
3010: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 65 70 74 <em>channel dept
3020: 68 20 63 65 72 74 20 73 74 61 74 75 73 20 65 72 h cert status er
3030: 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a ror</em>..</dt>.
3040: 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f .<dd>.. This fo
3050: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 rm of callback i
3060: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 s invoked by the
3070: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f OpenSSL functio
3080: 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 n.. <code>SSL_s
3090: 65 74 5f 76 65 72 69 66 79 28 29 3c 2f 63 6f 64 et_verify()</cod
30a0: 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54 e>... <br>.. T
30b0: 68 65 20 3c 65 6d 3e 64 65 70 74 68 3c 2f 65 6d he <em>depth</em
30c0: 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e > argument is an
30d0: 20 69 6e 74 65 67 65 72 20 72 65 70 72 65 73 65 integer represe
30e0: 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 63 75 72 nting the.. cur
30f0: 72 65 6e 74 20 64 65 70 74 68 20 6f 6e 20 74 68 rent depth on th
3100: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 63 68 e certificate ch
3110: 61 69 6e 2c 20 77 69 74 68 0a 09 20 20 3c 63 6f ain, with.. <co
3120: 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 61 73 20 74 de>0</code> as t
3130: 68 65 20 73 75 62 6a 65 63 74 20 63 65 72 74 69 he subject certi
3140: 66 69 63 61 74 65 20 61 6e 64 20 68 69 67 68 65 ficate and highe
3150: 72 20 76 61 6c 75 65 73 0a 09 20 20 64 65 6e 6f r values.. deno
3160: 74 69 6e 67 20 70 72 6f 67 72 65 73 73 69 76 65 ting progressive
3170: 6c 79 20 6d 6f 72 65 20 69 6e 64 69 72 65 63 74 ly more indirect
3180: 20 69 73 73 75 65 72 20 63 65 72 74 69 66 69 63 issuer certific
3190: 61 74 65 73 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 ates... <br>..
31a0: 20 54 68 65 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 The <em>cert</e
31b0: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 m> argument is a
31c0: 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c list of key-val
31d0: 75 65 20 70 61 69 72 73 20 73 69 6d 69 6c 61 72 ue pairs similar
31e0: 0a 09 20 20 74 6f 20 74 68 6f 73 65 20 72 65 74 .. to those ret
31f0: 75 72 6e 65 64 20 62 79 0a 09 20 20 3c 61 20 68 urned by.. <a h
3200: 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75 ref="#tls::statu
3210: 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a s"><strong>tls::
3220: 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 3e 3c status</strong><
3230: 2f 61 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 /a>... <br>..
3240: 54 68 65 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f The <em>status</
3250: 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 em> argument is
3260: 61 6e 20 69 6e 74 65 67 65 72 20 72 65 70 72 65 an integer repre
3270: 73 65 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 63 senting the.. c
3280: 75 72 72 65 6e 74 20 76 61 6c 69 64 69 74 79 20 urrent validity
3290: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
32a0: 74 65 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 6f te... A value o
32b0: 66 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e f <code>0</code>
32c0: 20 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 69 means the certi
32d0: 66 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 64 ficate is deemed
32e0: 20 69 6e 76 61 6c 69 64 2e 0a 09 20 20 41 20 76 invalid... A v
32f0: 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e 31 3c alue of <code>1<
3300: 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 68 65 /code> means the
3310: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20 certificate is
3320: 64 65 65 6d 65 64 20 76 61 6c 69 64 2e 0a 09 20 deemed valid...
3330: 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d <br>.. The <em
3340: 3e 65 72 72 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 >error</em> argu
3350: 6d 65 6e 74 20 73 75 70 70 6c 69 65 73 20 74 68 ment supplies th
3360: 65 20 6d 65 73 73 61 67 65 2c 20 69 66 20 61 6e e message, if an
3370: 79 2c 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20 y, generated..
3380: 62 79 0a 09 20 20 3c 63 6f 64 65 3e 58 35 30 39 by.. <code>X509
3390: 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 5f 65 _STORE_CTX_get_e
33a0: 72 72 6f 72 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 rror()</code>...
33b0: 20 20 3c 62 72 3e 0a 09 20 20 3c 62 72 3e 0a 09 <br>.. <br>..
33c0: 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 6d The callback m
33d0: 61 79 20 6f 76 65 72 72 69 64 65 20 6e 6f 72 6d ay override norm
33e0: 61 6c 20 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 al validation pr
33f0: 6f 63 65 73 73 69 6e 67 20 62 79 20 65 78 70 6c ocessing by expl
3400: 69 63 69 74 6c 79 0a 09 20 20 72 65 74 75 72 6e icitly.. return
3410: 69 6e 67 20 6f 6e 65 20 6f 66 20 74 68 65 20 61 ing one of the a
3420: 62 6f 76 65 20 3c 65 6d 3e 73 74 61 74 75 73 3c bove <em>status<
3430: 2f 65 6d 3e 20 76 61 6c 75 65 73 2e 0a 09 3c 2f /em> values...</
3440: 64 64 3e 0a 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 dd>...</dl>.
3450: 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a </dd>.. <br>.
3460: 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 . <dt><strong
3470: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f >-password</stro
3480: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ng> <em>callback
3490: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c </em></dt>. <
34a0: 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 dd>..Invokes the
34b0: 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 specified <em>c
34c0: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 allback</em> scr
34d0: 69 70 74 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c ipt when OpenSSL
34e0: 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62 74 61 69 needs to..obtai
34f0: 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 20 20 54 n a password. T
3500: 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 he callback shou
3510: 6c 64 20 72 65 74 75 72 6e 20 61 20 73 74 72 69 ld return a stri
3520: 6e 67 20 77 68 69 63 68 0a 09 72 65 70 72 65 73 ng which..repres
3530: 65 6e 74 73 20 74 68 65 20 70 61 73 73 77 6f 72 ents the passwor
3540: 64 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 09 4e d to be used...N
3550: 6f 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65 20 o arguments are
3560: 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68 65 20 appended to the
3570: 73 63 72 69 70 74 20 75 70 6f 6e 20 63 61 6c 6c script upon call
3580: 62 61 63 6b 2e 0a 20 20 20 20 3c 2f 64 64 3e 0a back.. </dd>.
3590: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f </dl>.</blockquo
35a0: 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 72 65 6e te>..<p>.Referen
35b0: 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f ce implementatio
35c0: 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61 6c 6c ns of these call
35d0: 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76 69 64 backs are provid
35e0: 65 64 20 69 6e 20 74 68 65 0a 64 69 73 74 72 69 ed in the.distri
35f0: 62 75 74 69 6f 6e 20 61 73 20 3c 73 74 72 6f 6e bution as <stron
3600: 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c g>tls::callback<
3610: 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 0a 3c 73 74 /strong> and.<st
3620: 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f rong>tls::passwo
3630: 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 72 65 73 70 rd</strong> resp
3640: 65 63 74 69 76 65 6c 79 2e 20 20 4e 6f 74 65 20 ectively. Note
3650: 74 68 61 74 20 74 68 65 73 65 20 61 72 65 0a 3c that these are.<
3660: 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 em>sample</em> i
3670: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f mplementations o
3680: 6e 6c 79 2e 20 20 49 6e 20 61 20 6d 6f 72 65 20 nly. In a more
3690: 72 65 61 6c 69 73 74 69 63 20 64 65 70 6c 6f 79 realistic deploy
36a0: 6d 65 6e 74 0a 79 6f 75 20 77 6f 75 6c 64 20 73 ment.you would s
36b0: 70 65 63 69 66 79 20 79 6f 75 72 20 6f 77 6e 20 pecify your own
36c0: 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 73 callback scripts
36d0: 20 6f 6e 20 65 61 63 68 20 54 4c 53 20 63 68 61 on each TLS cha
36e0: 6e 6e 65 6c 0a 75 73 69 6e 67 20 74 68 65 20 3c nnel.using the <
36f0: 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e em>-command</em>
3700: 20 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 73 77 6f and <em>-passwo
3710: 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 73 2e rd</em> options.
3720: 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 64 .</p>..<p>.The d
3730: 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 efault behavior
3740: 77 68 65 6e 20 74 68 65 20 3c 65 6d 3e 2d 63 6f when the <em>-co
3750: 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f mmand</em> optio
3760: 6e 20 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 n is not specifi
3770: 65 64 20 69 73 20 66 6f 72 0a 54 4c 53 20 74 6f ed is for.TLS to
3780: 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 process the ass
3790: 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 20 ociated library
37a0: 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74 65 72 6e callbacks intern
37b0: 61 6c 6c 79 2e 0a 54 68 65 20 64 65 66 61 75 6c ally..The defaul
37c0: 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 t behavior when
37d0: 74 68 65 20 3c 65 6d 3e 2d 70 61 73 73 77 6f 72 the <em>-passwor
37e0: 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 20 69 73 d</em> option is
37f0: 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 20 69 not specified i
3800: 73 20 66 6f 72 0a 54 4c 53 20 74 6f 20 70 72 6f s for.TLS to pro
3810: 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 61 cess the associa
3820: 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c 6c ted library call
3830: 62 61 63 6b 73 20 62 79 20 61 74 74 65 6d 70 74 backs by attempt
3840: 69 6e 67 20 74 6f 20 63 61 6c 6c 0a 3c 73 74 72 ing to call.<str
3850: 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 ong>tls::passwor
3860: 64 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 54 68 65 20 d</strong>..The
3870: 64 69 66 66 65 72 65 6e 63 65 20 62 65 74 77 65 difference betwe
3880: 65 6e 20 74 68 65 73 65 20 74 77 6f 20 62 65 68 en these two beh
3890: 61 76 69 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 aviors is a cons
38a0: 65 71 75 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 equence of maint
38b0: 61 69 6e 69 6e 67 0a 63 6f 6d 70 61 74 69 62 69 aining.compatibi
38c0: 6c 69 74 79 20 77 69 74 68 20 65 61 72 6c 69 65 lity with earlie
38d0: 72 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e r implementation
38e0: 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 s..</p>..<p>.The
38f0: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 <strong>tls::de
3900: 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 76 61 72 bug</strong> var
3910: 69 61 62 6c 65 20 70 72 6f 76 69 64 65 73 20 73 iable provides s
3920: 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c 0a 63 ome additional.c
3930: 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 73 ontrol over thes
3940: 65 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c e reference call
3950: 62 61 63 6b 73 2e 20 20 49 74 73 20 76 61 6c 75 backs. Its valu
3960: 65 20 69 73 20 7a 65 72 6f 20 62 79 20 64 65 66 e is zero by def
3970: 61 75 6c 74 2e 0a 48 69 67 68 65 72 20 76 61 6c ault..Higher val
3980: 75 65 73 20 70 72 6f 64 75 63 65 20 6d 6f 72 65 ues produce more
3990: 20 64 69 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 diagnostic outp
39a0: 75 74 2c 20 61 6e 64 20 77 69 6c 6c 20 61 6c 73 ut, and will als
39b0: 6f 20 66 6f 72 63 65 20 74 68 65 0a 76 65 72 69 o force the.veri
39c0: 66 79 20 6d 65 74 68 6f 64 20 69 6e 20 3c 73 74 fy method in <st
39d0: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 rong>tls::callba
39e0: 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 74 6f 20 61 ck</strong> to a
39f0: 63 63 65 70 74 20 74 68 65 0a 63 65 72 74 69 66 ccept the.certif
3a00: 69 63 61 74 65 2c 20 65 76 65 6e 20 77 68 65 6e icate, even when
3a10: 20 69 74 20 69 73 20 69 6e 76 61 6c 69 64 2e 0a it is invalid..
3a20: 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 </p>..<p>.<em>.T
3a30: 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 72 65 he use of the re
3a40: 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b ference callback
3a50: 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 s <strong>tls::c
3a60: 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e allback</strong>
3a70: 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 and.<strong>tls
3a80: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f ::password</stro
3a90: 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d ng> is not recom
3aa0: 6d 65 6e 64 65 64 2e 20 20 54 68 65 79 20 6d 61 mended. They ma
3ab0: 79 20 62 65 20 72 65 6d 6f 76 65 64 0a 66 72 6f y be removed.fro
3ac0: 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 m future release
3ad0: 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c s..</em>.</p>..<
3ae0: 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 p>.<em>.The use
3af0: 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 of the variable
3b00: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 <strong>tls::deb
3b10: 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 73 20 6e ug</strong> is n
3b20: 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a ot recommended..
3b30: 49 74 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 It may be remove
3b40: 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 d from future re
3b50: 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f leases..</em>.</
3b60: 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d p>..<h3><a name=
3b70: 22 48 54 54 50 53 20 45 58 41 4d 50 4c 45 22 3e "HTTPS EXAMPLE">
3b80: 48 54 54 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61 HTTPS EXAMPLE</a
3b90: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 ></h3>..<p>This
3ba0: 65 78 61 6d 70 6c 65 20 75 73 65 73 20 61 20 73 example uses a s
3bb0: 61 6d 70 6c 65 20 73 65 72 76 65 72 2e 70 65 6d ample server.pem
3bc0: 20 70 72 6f 76 69 64 65 64 20 77 69 74 68 20 74 provided with t
3bd0: 68 65 20 54 4c 53 20 72 65 6c 65 61 73 65 2c 0a he TLS release,.
3be0: 63 6f 75 72 74 65 73 79 20 6f 66 20 74 68 65 20 courtesy of the
3bf0: 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c <strong>OpenSSL<
3c00: 2f 73 74 72 6f 6e 67 3e 20 70 72 6f 6a 65 63 74 /strong> project
3c10: 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e 3c 63 6f 64 .</p>..<pre><cod
3c20: 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 e>.package requi
3c30: 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 re http.package
3c40: 72 65 71 75 69 72 65 20 74 6c 73 0a 0a 68 74 74 require tls..htt
3c50: 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 p::register http
3c60: 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c s 443 [list ::tl
3c70: 73 3a 3a 73 6f 63 6b 65 74 20 2d 72 65 71 75 69 s::socket -requi
3c80: 72 65 20 31 20 2d 63 61 66 69 6c 65 20 2e 2f 73 re 1 -cafile ./s
3c90: 65 72 76 65 72 2e 70 65 6d 5d 0a 0a 73 65 74 20 erver.pem]..set
3ca0: 74 6f 6b 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 tok [http::getur
3cb0: 6c 20 68 74 74 70 73 3a 2f 2f 64 65 76 65 6c 6f l https://develo
3cc0: 70 65 72 2e 6e 65 74 73 63 61 70 65 2e 63 6f 6d per.netscape.com
3cd0: 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e /].</code></pre>
3ce0: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 ..<h3><a name="S
3cf0: 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 PECIAL CONSIDERA
3d00: 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c 20 43 TIONS">SPECIAL C
3d10: 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61 ONSIDERATIONS</a
3d20: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 20 63 ></h3>..<p>The c
3d30: 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 74 apabilities of t
3d40: 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e 20 his package can
3d50: 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 vary enormously
3d60: 62 61 73 65 64 0a 75 70 6f 6e 20 68 6f 77 20 79 based.upon how y
3d70: 6f 75 72 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 our OpenSSL libr
3d80: 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75 72 ary was configur
3d90: 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 41 74 ed and built. At
3da0: 20 74 68 65 0a 6d 6f 73 74 20 6d 61 63 72 6f 2d the.most macro-
3db0: 6c 65 76 65 6c 20 4f 70 65 6e 53 53 4c 20 73 75 level OpenSSL su
3dc0: 70 70 6f 72 74 73 20 61 20 26 71 75 6f 74 3b 6e pports a "n
3dd0: 6f 20 70 61 74 65 6e 74 73 26 71 75 6f 74 3b 20 o patents"
3de0: 62 75 69 6c 64 2c 0a 77 68 69 63 68 20 64 69 73 build,.which dis
3df0: 61 62 6c 65 73 20 52 53 41 2c 20 49 44 45 41 2c ables RSA, IDEA,
3e00: 20 52 43 28 32 2c 34 2c 35 29 20 61 6e 64 20 53 RC(2,4,5) and S
3e10: 53 4c 32 20 2d 20 69 66 20 79 6f 75 72 20 4f 70 SL2 - if your Op
3e20: 65 6e 53 53 4c 20 69 73 0a 63 6f 6e 66 69 67 75 enSSL is.configu
3e30: 72 65 64 20 74 68 69 73 20 77 61 79 20 74 68 65 red this way the
3e40: 6e 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 20 n you will need
3e50: 74 6f 20 62 75 69 6c 64 20 54 4c 53 20 77 69 74 to build TLS wit
3e60: 68 20 74 68 65 0a 2d 44 4e 4f 5f 50 41 54 45 4e h the.-DNO_PATEN
3e70: 54 53 20 6f 70 74 69 6f 6e 20 2d 20 61 6e 64 20 TS option - and
3e80: 74 68 65 20 72 65 73 75 6c 74 61 6e 74 20 6d 6f the resultant mo
3e90: 64 75 6c 65 20 77 69 6c 6c 20 66 75 6e 63 74 69 dule will functi
3ea0: 6f 6e 0a 63 6f 72 72 65 63 74 6c 79 20 61 6e 64 on.correctly and
3eb0: 20 61 6c 73 6f 20 73 75 70 70 6f 72 74 20 41 44 also support AD
3ec0: 48 20 63 65 72 74 69 66 69 63 61 74 65 2d 6c 65 H certificate-le
3ed0: 73 73 20 65 6e 63 72 79 70 74 69 6f 6e 2c 0a 68 ss encryption,.h
3ee0: 6f 77 65 76 65 72 20 79 6f 75 20 77 69 6c 6c 20 owever you will
3ef0: 62 65 20 75 6e 61 62 6c 65 20 74 6f 20 75 74 69 be unable to uti
3f00: 6c 69 7a 65 20 74 68 69 73 20 74 6f 20 73 70 65 lize this to spe
3f10: 61 6b 20 74 6f 20 6e 6f 72 6d 61 6c 20 57 65 62 ak to normal Web
3f20: 0a 53 65 72 76 65 72 73 2c 20 77 68 69 63 68 20 .Servers, which
3f30: 74 79 70 69 63 61 6c 6c 79 20 72 65 71 75 69 72 typically requir
3f40: 65 20 52 53 41 20 73 75 70 70 6f 72 74 2e 20 50 e RSA support. P
3f50: 6c 65 61 73 65 20 73 65 65 20 3c 61 0a 68 72 65 lease see <a.hre
3f60: 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 f="http://www.op
3f70: 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 68 74 74 70 enssl.org/">http
3f80: 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f ://www.openssl.o
3f90: 72 67 2f 3c 2f 61 3e 20 66 6f 72 0a 6d 6f 72 65 rg/</a> for.more
3fa0: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 information on
3fb0: 74 68 65 20 77 68 6f 6c 65 20 69 73 73 75 65 20 the whole issue
3fc0: 6f 66 20 70 61 74 65 6e 74 73 20 61 6e 64 20 55 of patents and U
3fd0: 53 20 65 78 70 6f 72 74 0a 72 65 73 74 72 69 63 S export.restric
3fe0: 74 69 6f 6e 73 2e 20 3c 2f 70 3e 0a 0a 3c 68 33 tions. </p>..<h3
3ff0: 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 20 41 4c ><a name="SEE AL
4000: 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61 3e SO">SEE ALSO</a>
4010: 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e </h3>..<p><stron
4020: 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 g>socket</strong
4030: 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 6c 65 65 >, <strong>filee
4040: 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67 3e 3c vent, </strong><
4050: 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 a.href="http://w
4060: 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 ww.openssl.org/"
4070: 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c ><strong>OpenSSL
4080: 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 70 </strong></a></p
4090: 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a 43 >..<hr>..<pre>.C
40a0: 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 opyright ©
40b0: 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 1999 Matt Newman
40c0: 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 ..Copyright &cop
40d0: 79 3b 20 32 30 30 34 20 53 74 61 72 66 69 73 68 y; 2004 Starfish
40e0: 20 53 79 73 74 65 6d 73 2e 0a 3c 2f 70 72 65 3e Systems..</pre>
40f0: 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c 3e .</body>.</html>
4100: 0a .