Artifact
38878958c508171822230ae2f0af6816a7e598fd:
Wiki page
[
Documentation] by
rkeene on
2016-12-13 21:37:16.
0000: 44 20 32 30 31 36 2d 31 32 2d 31 33 54 32 31 3a D 2016-12-13T21:
0010: 33 37 3a 31 36 2e 39 34 34 0a 4c 20 44 6f 63 75 37:16.944.L Docu
0020: 6d 65 6e 74 61 74 69 6f 6e 0a 50 20 32 30 31 32 mentation.P 2012
0030: 63 61 34 37 34 32 61 39 35 32 65 38 33 66 38 38 ca4742a952e83f88
0040: 31 34 34 33 31 37 64 30 35 61 31 35 38 63 39 62 144317d05a158c9b
0050: 38 64 30 66 0a 55 20 72 6b 65 65 6e 65 0a 57 20 8d0f.U rkeene.W
0060: 31 36 34 36 31 0a 0a 3c 64 6c 3e 0a 20 20 20 20 16461..<dl>.
0070: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 4e 41 <dd><a href="#NA
0080: 4d 45 22 3e 4e 41 4d 45 3c 2f 61 3e 20 3c 64 6c ME">NAME</a> <dl
0090: 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 >. <d
00a0: 64 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 d><strong>tls</s
00b0: 74 72 6f 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 trong> - binding
00c0: 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e to <strong>Open
00d0: 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 SSL</strong>.
00e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 6f too
00f0: 6c 6b 69 74 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 lkit.</dd>.
0100: 20 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 </dl>. </d
0110: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 d>. <dd><a hr
0120: 65 66 3d 22 23 53 59 4e 4f 50 53 49 53 22 3e 53 ef="#SYNOPSIS">S
0130: 59 4e 4f 50 53 49 53 3c 2f 61 3e 20 3c 2f 64 64 YNOPSIS</a> </dd
0140: 3e 0a 20 20 20 20 3c 64 64 3e 3c 64 6c 3e 0a 20 >. <dd><dl>.
0150: 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c <dd><
0160: 62 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 b>package requir
0170: 65 20 54 63 6c 20 3c 2f 62 3e 3c 65 6d 3e 3f 38 e Tcl </b><em>?8
0180: 2e 34 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 .4?</em></dd>.
0190: 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 <dd><b
01a0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 >package require
01b0: 20 74 6c 73 20 3c 2f 62 3e 3c 65 6d 3e 3f 31 2e tls </b><em>?1.
01c0: 37 2e 31 30 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 7.10?</em></dd>.
01d0: 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 74 3e <dt>
01e0: 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 </dt>.
01f0: 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 <dd><b>t
0200: 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e 3c 69 3e ls::init </b><i>
0210: 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 20 3c 2f ?options?</i> </
0220: 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 dd>.
0230: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b <dd><b>tls::sock
0240: 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f 70 74 69 et </b><em>?opti
0250: 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f ons? host port</
0260: 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 em></dd>.
0270: 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a <dd><b>tls:
0280: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e 20 :socket</b><em>
0290: 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 ?-server command
02a0: 3f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ?.
02b0: 20 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 ?options? port
02c0: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 </em></dd>.
02d0: 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c <dd><b>tl
02e0: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e s::handshake</b>
02f0: 3c 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d <em> channel</em
0300: 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 ></dd>.
0310: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 <dd><b>tls::s
0320: 74 61 74 75 73 20 3c 2f 62 3e 3c 65 6d 3e 3f 2d tatus </b><em>?-
0330: 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f local? channel</
0340: 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 em></dd>.
0350: 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a <dd><b>tls:
0360: 3a 69 6d 70 6f 72 74 3c 2f 62 3e 3c 65 6d 3e 20 :import</b><em>
0370: 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e 73 channel ?options
0380: 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 ?</em></dd>.
0390: 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 <dd><b>t
03a0: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e ls::unimport</b>
03b0: 3c 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d <em> channel</em
03c0: 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 ></dd>.
03d0: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 <dd><b>tls::c
03e0: 69 70 68 65 72 73 20 3c 2f 62 3e 3c 65 6d 3e 70 iphers </b><em>p
03f0: 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 rotocol ?verbose
0400: 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 ?</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 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c ls::version</b><
0430: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 2f 64 /dd>. </d
0440: 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20 l>. </dd>.
0450: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 <dd><a href="#C
0460: 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 OMMANDS">COMMAND
0470: 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c S</a></dd>. <
0480: 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 41 4c dd><a href="#CAL
0490: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 LBACK OPTIONS">C
04a0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c ALLBACK OPTIONS<
04b0: 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 /a></dd>. <dd
04c0: 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 54 50 53 ><a href="#HTTPS
04d0: 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 EXAMPLE">HTTPS
04e0: 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 64 3e EXAMPLE</a></dd>
04f0: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 . <dd><a href
0500: 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 50 45 ="#SEE ALSO">SPE
0510: 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 CIAL CONSIDERATI
0520: 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 ONS</a></dd>.
0530: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 <dd><a href="#S
0540: 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 EE ALSO">SEE ALS
0550: 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e O</a></dd>.</dl>
0560: 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e ..<hr>..<h3><a n
0570: 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d 45 3c ame="NAME">NAME<
0580: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 /a></h3>..<p><st
0590: 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f 6e 67 rong>tls</strong
05a0: 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c > - binding to <
05b0: 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f strong>OpenSSL</
05c0: 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 74 2e strong>.toolkit.
05d0: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d </p>..<h3><a nam
05e0: 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e e="SYNOPSIS">SYN
05f0: 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a OPSIS</a></h3>..
0600: 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 <p><b>package re
0610: 71 75 69 72 65 20 54 63 6c 20 38 2e 34 3c 2f 62 quire Tcl 8.4</b
0620: 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 67 65 ><br>.<b>package
0630: 20 72 65 71 75 69 72 65 20 74 6c 73 20 31 2e 37 require tls 1.7
0640: 2e 31 30 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 72 3e .10</b><br>.<br>
0650: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
0660: 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e init"><b>tls::in
0670: 69 74 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f it </b><i>?optio
0680: 6e 73 3f 3c 2f 69 3e 3c 62 72 3e 0a 3c 2f 61 3e ns?</i><br>.</a>
0690: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 <a href="#tls::s
06a0: 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 ocket"><b>tls::s
06b0: 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f ocket </b><em>?o
06c0: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 0a 70 6f 72 ptions? host.por
06d0: 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 62 3e 74 6c t</em><br>.<b>tl
06e0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d s::socket</b><em
06f0: 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 > ?-server comma
0700: 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f nd? ?options? po
0710: 72 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e rt</em><br>.</a>
0720: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 <a href="#tls::s
0730: 74 61 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 tatus"><b>tls::s
0740: 74 61 74 75 73 20 3c 2f 62 3e 3c 65 6d 3e 3f 2d tatus </b><em>?-
0750: 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f local? channel</
0760: 65 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e 3c 61 20 68 em><br>.</a><a h
0770: 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61 6e 64 73 ref="#tls::hands
0780: 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a 68 61 hake"><b>tls::ha
0790: 6e 64 73 68 61 6b 65 3c 2f 62 3e 3c 65 6d 3e 20 ndshake</b><em>
07a0: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e channel</em></a>
07b0: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 <br>.<br>.<a hre
07c0: 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 f="#tls::import"
07d0: 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 ><b>tls::import
07e0: 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f </b><i>channel ?
07f0: 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e options?</i></a>
0800: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 <br>.<a href="#t
0810: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 ls::unimport"><b
0820: 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 3c >tls::unimport <
0830: 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 /b><i>channel</i
0840: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 ></a><br>.<a hre
0850: 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 65 72 73 f="#tls::ciphers
0860: 20 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f protocol ?verbo
0870: 73 65 3f 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 se?"><strong>tls
0880: 3a 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e ::ciphers</stron
0890: 67 3e 0a 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 g>.<em>protocol
08a0: 3f 76 65 72 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f ?verbose?</em></
08b0: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 a><br>.<a href="
08c0: 23 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c #tls::version"><
08d0: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f b>tls::version</
08e0: 62 3e 3c 2f 61 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 b></a>.</p>..<h3
08f0: 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 53 43 52 49 ><a name="DESCRI
0900: 50 54 49 4f 4e 22 3e 44 45 53 43 52 49 50 54 49 PTION">DESCRIPTI
0910: 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e ON</a></h3>..<p>
0920: 54 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 This extension p
0930: 72 6f 76 69 64 65 73 20 61 20 67 65 6e 65 72 69 rovides a generi
0940: 63 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a c binding to <a.
0950: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 href="http://www
0960: 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f .openssl.org/">O
0970: 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c penSSL</a>, util
0980: 69 7a 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e izing the.<stron
0990: 67 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e g>Tcl_StackChann
09a0: 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20 el</strong>.API
09b0: 66 6f 72 20 54 63 6c 20 38 2e 32 20 61 6e 64 20 for Tcl 8.2 and
09c0: 68 69 67 68 65 72 2e 20 54 68 65 20 73 6f 63 6b higher. The sock
09d0: 65 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74 ets behave exact
09e0: 6c 79 20 74 68 65 20 73 61 6d 65 0a 61 73 20 63 ly the same.as c
09f0: 68 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20 hannels created
0a00: 75 73 69 6e 67 20 54 63 6c 27 73 20 62 75 69 6c using Tcl's buil
0a10: 74 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 t-in <strong>soc
0a20: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d ket</strong>.com
0a30: 6d 61 6e 64 20 77 69 74 68 20 61 64 64 69 74 69 mand with additi
0a40: 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 onal options for
0a50: 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 controlling the
0a60: 20 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 54 6f SSL session..To
0a70: 20 75 73 65 20 54 4c 53 20 77 69 74 68 20 61 6e use TLS with an
0a80: 20 65 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e earlier version
0a90: 20 6f 66 20 54 63 6c 20 74 68 61 6e 20 38 2e 34 of Tcl than 8.4
0aa0: 2c 20 70 6c 65 61 73 65 20 6f 62 74 61 69 6e 0a , please obtain.
0ab0: 54 4c 53 20 31 2e 33 2e 0a 3c 2f 70 3e 0a 0a 3c TLS 1.3..</p>..<
0ac0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f 4d 4d h3><a name="COMM
0ad0: 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f ANDS">COMMANDS</
0ae0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 70 69 a></h3>..<p>Typi
0af0: 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c 64 20 cally one would
0b00: 75 73 65 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e use the <strong>
0b10: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 73 74 tls::socket </st
0b20: 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 68 69 rong>command.whi
0b30: 63 68 20 70 72 6f 76 69 64 65 73 20 63 6f 6d 70 ch provides comp
0b40: 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 74 atibility with t
0b50: 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 he native Tcl <s
0b60: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 trong>socket</st
0b70: 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e 20 49 rong>.command. I
0b80: 6e 20 73 75 63 68 20 63 61 73 65 73 20 3c 73 74 n such cases <st
0b90: 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 rong>tls::import
0ba0: 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f 75 6c 64 </strong> should
0bb0: 20 6e 6f 74 20 62 65 0a 75 73 65 64 20 64 69 72 not be.used dir
0bc0: 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 6c 3e ectly.</p>..<dl>
0bd0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
0be0: 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e ="tls::init"><b>
0bf0: 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e 3c 69 tls::init </b><i
0c00: 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f >?options?</i></
0c10: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e a></dt>. <dd>
0c20: 54 68 69 73 20 72 6f 75 74 69 6e 65 20 73 65 74 This routine set
0c30: 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 s the default op
0c40: 74 69 6f 6e 73 20 75 73 65 64 20 62 79 20 3c 73 tions used by <s
0c50: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 trong>tls::socke
0c60: 74 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 20 t</strong>.
0c70: 20 20 20 61 6e 64 20 69 73 20 3c 65 6d 3e 6f 70 and is <em>op
0c80: 74 69 6f 6e 61 6c 3c 2f 65 6d 3e 2e 20 49 66 20 tional</em>. If
0c90: 79 6f 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 you call <strong
0ca0: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 >tls::import</st
0cb0: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 64 69 rong>. di
0cc0: 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f 75 74 rectly this rout
0cd0: 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 65 63 ine has no effec
0ce0: 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 6f 70 t. Any of the op
0cf0: 74 69 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 68 tions. th
0d00: 61 74 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a at <strong>tls::
0d10: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 socket</strong>
0d20: 61 63 63 65 70 74 73 20 63 61 6e 20 62 65 20 73 accepts can be s
0d30: 65 74 0a 20 20 20 20 20 20 20 20 75 73 69 6e 67 et. using
0d40: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 74 this command, t
0d50: 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c 64 hough you should
0d60: 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69 limit your opti
0d70: 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 6f 20 6f ons. to o
0d80: 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20 nly TLS related
0d90: 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c ones.</dd>. <
0da0: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 dt> </dt>.
0db0: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 <dt><a name="
0dc0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e tls::socket"><b>
0dd0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e tls::socket </b>
0de0: 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 20 20 <em>?options?.
0df0: 20 20 20 20 20 20 68 6f 73 74 20 70 6f 72 74 3c host port<
0e00: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 /em></a></dt>.
0e10: 20 20 3c 64 74 3e 3c 62 3e 74 6c 73 3a 3a 73 6f <dt><b>tls::so
0e20: 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e 20 3f 2d 73 cket</b><em> ?-s
0e30: 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f erver command? ?
0e40: 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 options? port</e
0e50: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e m></dt>. <dd>
0e60: 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 72 This is a helper
0e70: 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 function that u
0e80: 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65 tilizes the unde
0e90: 72 6c 79 69 6e 67 0a 20 20 20 20 20 20 20 20 63 rlying. c
0ea0: 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 ommands (<strong
0eb0: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 >tls::import</st
0ec0: 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76 rong>). It behav
0ed0: 65 73 0a 20 20 20 20 20 20 20 20 65 78 61 63 74 es. exact
0ee0: 6c 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 ly the same as t
0ef0: 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 he native Tcl <s
0f00: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 trong>socket</st
0f10: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 63 6f rong>. co
0f20: 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 61 mmand except tha
0f30: 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 t the options ca
0f40: 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66 n include any of
0f50: 20 74 68 65 0a 20 20 20 20 20 20 20 20 61 70 70 the. app
0f60: 6c 69 63 61 62 6c 65 20 3c 61 20 68 72 65 66 3d licable <a href=
0f70: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c "#tls::import"><
0f80: 73 74 72 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 strong>tls:impor
0f90: 74 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 20 t</strong></a>.
0fa0: 20 20 20 20 20 20 20 6f 70 74 69 6f 6e 73 2e 3c options.<
0fb0: 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 /dd>. <dt>&nb
0fc0: 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 sp;</dt>. <dt
0fd0: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 ><a name="tls::h
0fe0: 61 6e 64 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e andshake"><stron
0ff0: 67 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 g>tls::handshake
1000: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
1010: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f annel</em></a></
1020: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63 dt>. <dd>Forc
1030: 65 73 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 es handshake to
1040: 74 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 20 take place, and
1050: 72 65 74 75 72 6e 73 20 30 20 69 66 0a 20 20 20 returns 0 if.
1060: 20 20 20 20 20 68 61 6e 64 73 68 61 6b 65 20 69 handshake i
1070: 73 20 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 s still in progr
1080: 65 73 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e ess (non-blockin
1090: 67 29 2c 20 6f 72 20 31 20 69 66 0a 20 20 20 20 g), or 1 if.
10a0: 20 20 20 20 74 68 65 20 68 61 6e 64 73 68 61 6b the handshak
10b0: 65 20 77 61 73 20 73 75 63 63 65 73 73 66 75 6c e was successful
10c0: 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 68 61 . If the handsha
10d0: 6b 65 20 66 61 69 6c 65 64 0a 20 20 20 20 20 20 ke failed.
10e0: 20 20 74 68 69 73 20 72 6f 75 74 69 6e 65 20 77 this routine w
10f0: 69 6c 6c 20 74 68 72 6f 77 20 61 6e 20 65 72 72 ill throw an err
1100: 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 or.</dd>. <dt
1110: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 > </dt>.
1120: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
1130: 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f s::status"><stro
1140: 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f ng>tls::status</
1150: 73 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e strong>. <em>
1160: 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c ?-local? channel
1170: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
1180: 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 <dd>Returns t
1190: 68 65 20 63 75 72 72 65 6e 74 20 73 65 63 75 72 he current secur
11a0: 69 74 79 20 73 74 61 74 75 73 20 6f 66 20 61 6e ity status of an
11b0: 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 SSL channel. Th
11c0: 65 0a 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 e. result
11d0: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 is a list of ke
11e0: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 y-value pairs de
11f0: 73 63 72 69 62 69 6e 67 20 74 68 65 0a 20 20 20 scribing the.
1200: 20 20 20 20 20 63 6f 6e 6e 65 63 74 65 64 20 70 connected p
1210: 65 65 72 2e 20 49 66 20 74 68 65 20 72 65 73 75 eer. If the resu
1220: 6c 74 20 69 73 20 61 6e 20 65 6d 70 74 79 20 6c lt is an empty l
1230: 69 73 74 20 74 68 65 6e 20 74 68 65 0a 20 20 20 ist then the.
1240: 20 20 20 20 20 53 53 4c 20 68 61 6e 64 73 68 61 SSL handsha
1250: 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 ke has not yet c
1260: 6f 6d 70 6c 65 74 65 64 2e 0a 20 20 20 20 20 20 ompleted..
1270: 20 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c If <em>-local<
1280: 2f 65 6d 3e 20 69 73 20 67 69 76 65 6e 2c 20 74 /em> is given, t
1290: 68 65 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 hen the certific
12a0: 61 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a ate information.
12b0: 20 20 20 20 20 20 20 20 69 73 20 74 68 65 20 6f is the o
12c0: 6e 65 20 75 73 65 64 20 6c 6f 63 61 6c 6c 79 2e ne used locally.
12d0: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 62 6c </dd>.</dl>..<bl
12e0: 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 ockquote>. <d
12f0: 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c l>. <dt><
1300: 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73 strong>issuer</s
1310: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 trong> <em>dn</e
1320: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
1330: 3c 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 <dd>The distingu
1340: 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 ished name (DN)
1350: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
1360: 74 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 te. i
1370: 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 ssuer.</dd>.
1380: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
1390: 73 75 62 6a 65 63 74 3c 2f 73 74 72 6f 6e 67 3e subject</strong>
13a0: 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 <em>dn</em></dt
13b0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 >. <dd>Th
13c0: 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 e distinguished
13d0: 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 name (DN) of the
13e0: 20 63 65 72 74 69 66 69 63 61 74 65 0a 20 20 20 certificate.
13f0: 20 20 20 20 20 20 20 20 20 73 75 62 6a 65 63 74 subject
1400: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
1410: 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 42 65 dt><strong>notBe
1420: 66 6f 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 fore</strong> <e
1430: 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>date</em></dt>
1440: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 . <dd>The
1450: 20 62 65 67 69 6e 20 64 61 74 65 20 66 6f 72 20 begin date for
1460: 74 68 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20 the validity of
1470: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e the certificate.
1480: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
1490: 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 66 74 t><strong>notAft
14a0: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e er</strong> <em>
14b0: 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 date</em></dt>.
14c0: 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 65 <dd>The e
14d0: 78 70 69 72 79 20 64 61 74 65 20 66 6f 72 20 74 xpiry date for t
14e0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c he certificate.<
14f0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
1500: 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 69 61 6c 3c ><strong>serial<
1510: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f /strong> <em>n</
1520: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
1530: 20 3c 64 64 3e 54 68 65 20 73 65 72 69 61 6c 20 <dd>The serial
1540: 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 number of the ce
1550: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
1560: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
1570: 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f ong>cipher</stro
1580: 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f ng> <em>cipher</
1590: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
15a0: 20 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74 <dd>The current
15b0: 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 62 cipher in use b
15c0: 65 74 77 65 65 6e 20 74 68 65 20 63 6c 69 65 6e etween the clien
15d0: 74 20 61 6e 64 0a 20 20 20 20 20 20 20 20 20 20 t and.
15e0: 20 20 73 65 72 76 65 72 20 63 68 61 6e 6e 65 6c server channel
15f0: 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 s.</dd>.
1600: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 62 69 74 <dt><strong>sbit
1610: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e s</strong> <em>n
1620: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
1630: 20 20 20 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 <dd>The numbe
1640: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 r of bits used f
1650: 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b or the session k
1660: 65 79 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 ey.</dd>. </d
1670: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e l>.</blockquote>
1680: 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c ..<dl>. <dt><
1690: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d 70 a name="tls::imp
16a0: 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 ort"><b>tls::imp
16b0: 6f 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e ort </b><i>chann
16c0: 65 6c 0a 20 20 20 20 20 20 20 20 3f 6f 70 74 69 el. ?opti
16d0: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 ons?</i></a></dt
16e0: 3e 0a 20 20 20 20 3c 64 64 3e 53 53 4c 2d 65 6e >. <dd>SSL-en
16f0: 61 62 6c 65 20 61 20 72 65 67 75 6c 61 72 20 54 able a regular T
1700: 63 6c 20 63 68 61 6e 6e 65 6c 20 2d 20 69 74 20 cl channel - it
1710: 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 0a 20 20 need not be a.
1720: 20 20 20 20 20 20 73 6f 63 6b 65 74 2c 20 62 75 socket, bu
1730: 74 20 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62 t must provide b
1740: 69 2d 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c i-directional fl
1750: 6f 77 2e 20 41 6c 73 6f 0a 20 20 20 20 20 20 20 ow. Also.
1760: 20 73 65 74 74 69 6e 67 20 73 65 73 73 69 6f 6e setting session
1770: 20 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72 20 parameters for
1780: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f SSL handshake.</
1790: 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 62 6c 6f 63 dd>.</dl>..<bloc
17a0: 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e kquote>. <dl>
17b0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
17c0: 72 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74 72 rong>-cadir</str
17d0: 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 6d ong> <em>dir</em
17e0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
17f0: 64 64 3e 50 72 6f 76 69 64 65 20 74 68 65 20 64 dd>Provide the d
1800: 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e irectory contain
1810: 69 6e 67 20 74 68 65 20 43 41 20 63 65 72 74 69 ing the CA certi
1820: 66 69 63 61 74 65 73 2e 3c 2f 64 64 3e 0a 20 20 ficates.</dd>.
1830: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
1840: 67 3e 2d 63 61 66 69 6c 65 20 3c 2f 73 74 72 6f g>-cafile </stro
1850: 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c ng><em>filename<
1860: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
1870: 20 20 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68 <dd>Provide th
1880: 65 20 43 41 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a e CA file.</dd>.
1890: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
18a0: 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 73 ong>-certfile</s
18b0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e trong> <em>filen
18c0: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ame</em></dt>.
18d0: 20 20 20 20 20 20 3c 64 64 3e 50 72 6f 76 69 64 <dd>Provid
18e0: 65 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 e the certificat
18f0: 65 20 74 6f 20 75 73 65 2e 3c 2f 64 64 3e 0a 20 e to use.</dd>.
1900: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
1910: 6e 67 3e 2d 63 69 70 68 65 72 20 3c 2f 73 74 72 ng>-cipher </str
1920: 6f 6e 67 3e 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ong><em>string</
1930: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
1940: 20 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68 65 <dd>Provide the
1950: 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74 cipher suites t
1960: 6f 20 75 73 65 2e 20 53 79 6e 74 61 78 20 69 73 o use. Syntax is
1970: 20 61 73 20 70 65 72 0a 20 20 20 20 20 20 20 20 as per.
1980: 20 20 20 20 4f 70 65 6e 53 53 4c 2e 3c 2f 64 64 OpenSSL.</dd
1990: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
19a0: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f trong>-command</
19b0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c strong> <em>call
19c0: 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 back</em></dt>.
19d0: 20 20 20 20 20 20 20 3c 64 64 3e 49 66 20 73 70 <dd>If sp
19e0: 65 63 69 66 69 65 64 2c 20 74 68 69 73 20 63 61 ecified, this ca
19f0: 6c 6c 62 61 63 6b 20 77 69 6c 6c 20 62 65 20 69 llback will be i
1a00: 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72 61 nvoked at severa
1a10: 6c 20 70 6f 69 6e 74 73 0a 20 20 20 20 20 20 20 l points.
1a20: 20 20 20 20 20 64 75 72 69 6e 67 20 74 68 65 20 during the
1a30: 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b OpenSSL handshak
1a40: 65 2e 20 20 49 74 20 63 61 6e 20 70 61 73 73 20 e. It can pass
1a50: 65 72 72 6f 72 73 20 61 6e 64 20 74 72 61 63 69 errors and traci
1a60: 6e 67 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 ng. i
1a70: 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 20 nformation, and
1a80: 69 74 20 63 61 6e 20 61 6c 6c 6f 77 20 54 63 6c it can allow Tcl
1a90: 20 73 63 72 69 70 74 73 20 74 6f 20 70 65 72 66 scripts to perf
1aa0: 6f 72 6d 0a 20 20 20 20 20 20 20 20 20 20 20 20 orm.
1ab0: 74 68 65 69 72 20 6f 77 6e 20 76 61 6c 69 64 61 their own valida
1ac0: 74 69 6f 6e 20 6f 66 20 74 68 65 20 63 65 72 74 tion of the cert
1ad0: 69 66 69 63 61 74 65 20 69 6e 20 70 6c 61 63 65 ificate in place
1ae0: 20 6f 66 20 74 68 65 0a 20 20 20 20 20 20 20 20 of the.
1af0: 20 20 20 20 64 65 66 61 75 6c 74 20 76 61 6c 69 default vali
1b00: 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 dation provided
1b10: 62 79 20 4f 70 65 6e 53 53 4c 2e 0a 20 20 20 20 by OpenSSL..
1b20: 20 20 20 20 20 20 20 20 3c 62 72 3e 0a 20 20 20 <br>.
1b30: 20 20 20 20 20 20 20 20 20 53 65 65 20 3c 61 20 See <a
1b40: 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 href="#CALLBACK
1b50: 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 OPTIONS">CALLBAC
1b60: 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 20 66 6f K OPTIONS</a> fo
1b70: 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 75 r. fu
1b80: 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e rther discussion
1b90: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
1ba0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68 70 61 dt><strong>-dhpa
1bb0: 72 61 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 rams </strong><e
1bc0: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c m>filename</em><
1bd0: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
1be0: 3e 50 72 6f 76 69 64 65 20 61 20 44 69 66 66 69 >Provide a Diffi
1bf0: 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 6d 65 e-Hellman parame
1c00: 74 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a ters file.</dd>.
1c10: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
1c20: 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f 73 74 ong>-keyfile</st
1c30: 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 rong> <em>filena
1c40: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 me</em></dt>.
1c50: 20 20 20 20 20 3c 64 64 3e 50 72 6f 76 69 64 65 <dd>Provide
1c60: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 the private key
1c70: 20 66 69 6c 65 2e 20 28 3c 73 74 72 6f 6e 67 3e file. (<strong>
1c80: 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e default</strong>
1c90: 3a 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 :. va
1ca0: 6c 75 65 20 6f 66 20 2d 63 65 72 74 66 69 6c 65 lue of -certfile
1cb0: 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c )</dd>. <
1cc0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6d 6f 64 65 dt><strong>-mode
1cd0: 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 l</strong> <em>c
1ce0: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e hannel</em></dt>
1cf0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 69 . <dd>Thi
1d00: 73 20 77 69 6c 6c 20 66 6f 72 63 65 20 74 68 69 s will force thi
1d10: 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61 s channel to sha
1d20: 72 65 20 74 68 65 20 73 61 6d 65 20 3c 65 6d 3e re the same <em>
1d30: 3c 73 74 72 6f 6e 67 3e 53 53 4c 5f 43 54 58 3c <strong>SSL_CTX<
1d40: 2f 73 74 72 6f 6e 67 3e 3c 2f 65 6d 3e 0a 20 20 /strong></em>.
1d50: 20 20 20 20 20 20 20 20 20 20 73 74 72 75 63 74 struct
1d60: 75 72 65 20 61 73 20 74 68 65 20 73 70 65 63 69 ure as the speci
1d70: 66 69 65 64 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c fied <em>channel
1d80: 3c 2f 65 6d 3e 2c 20 61 6e 64 0a 20 20 20 20 20 </em>, and.
1d90: 20 20 20 20 20 20 20 74 68 65 72 65 66 6f 72 65 therefore
1da0: 20 73 68 61 72 65 20 63 61 6c 6c 62 61 63 6b 73 share callbacks
1db0: 20 65 74 63 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 etc.</dd>.
1dc0: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d <dt><strong>-
1dd0: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 password</strong
1de0: 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f > <em>callback</
1df0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
1e00: 20 3c 64 64 3e 49 66 20 73 75 70 70 6c 69 65 64 <dd>If supplied
1e10: 2c 20 74 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 , this callback
1e20: 77 69 6c 6c 20 62 65 20 69 6e 76 6f 6b 65 64 20 will be invoked
1e30: 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 when OpenSSL nee
1e40: 64 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 ds. t
1e50: 6f 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77 o obtain a passw
1e60: 6f 72 64 2c 20 74 79 70 69 63 61 6c 6c 79 20 74 ord, typically t
1e70: 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 o unlock the pri
1e80: 76 61 74 65 20 6b 65 79 20 6f 66 0a 09 20 20 20 vate key of..
1e90: 20 61 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a a certificate..
1ea0: 20 20 20 20 20 20 20 20 20 20 20 20 54 68 65 20 The
1eb0: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 callback should
1ec0: 72 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20 return a string
1ed0: 77 68 69 63 68 20 72 65 70 72 65 73 65 6e 74 73 which represents
1ee0: 20 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 20 the.
1ef0: 20 70 61 73 73 77 6f 72 64 20 74 6f 20 62 65 20 password to be
1f00: 75 73 65 64 2e 0a 20 20 20 20 20 20 20 20 20 20 used..
1f10: 20 20 3c 62 72 3e 0a 20 20 20 20 20 20 20 20 20 <br>.
1f20: 20 20 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 See <a href="
1f30: 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e #CALLBACK OPTION
1f40: 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 S">CALLBACK OPTI
1f50: 4f 4e 53 3c 2f 61 3e 20 66 6f 72 0a 20 20 20 20 ONS</a> for.
1f60: 20 20 20 20 20 20 20 20 66 75 72 74 68 65 72 20 further
1f70: 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e discussion.</dd>
1f80: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
1f90: 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 20 3c 2f rong>-request </
1fa0: 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c strong><em>bool<
1fb0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
1fc0: 20 20 3c 64 64 3e 52 65 71 75 65 73 74 20 61 20 <dd>Request a
1fd0: 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d certificate from
1fe0: 20 70 65 65 72 20 64 75 72 69 6e 67 20 53 53 4c peer during SSL
1ff0: 20 68 61 6e 64 73 68 61 6b 65 2e 0a 20 20 20 20 handshake..
2000: 20 20 20 20 20 20 20 20 28 3c 73 74 72 6f 6e 67 (<strong
2010: 3e 64 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 >default</strong
2020: 3e 3a 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e >: <em>true</em>
2030: 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c )</dd>. <
2040: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 dt><strong>-requ
2050: 69 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ire</strong> <em
2060: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
2070: 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 71 75 <dd>Requ
2080: 69 72 65 20 61 20 76 61 6c 69 64 20 63 65 72 74 ire a valid cert
2090: 69 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65 ificate from pee
20a0: 72 20 64 75 72 69 6e 67 20 53 53 4c 0a 20 20 20 r during SSL.
20b0: 20 20 20 20 20 20 20 20 20 68 61 6e 64 73 68 61 handsha
20c0: 6b 65 2e 20 49 66 20 74 68 69 73 20 69 73 20 73 ke. If this is s
20d0: 65 74 20 74 6f 20 74 72 75 65 20 74 68 65 6e 20 et to true then
20e0: 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 <strong>-request
20f0: 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 20 20 </strong>.
2100: 20 20 20 20 20 20 6d 75 73 74 20 61 6c 73 6f 20 must also
2110: 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 2e 20 be set to true.
2120: 28 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 (<strong>default
2130: 3c 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 66 </strong>: <em>f
2140: 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a alse</em>)</dd>.
2150: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
2160: 6f 6e 67 3e 2d 73 65 72 76 65 72 3c 2f 73 74 72 ong>-server</str
2170: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 ong> <em>bool</e
2180: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
2190: 3c 64 64 3e 48 61 6e 64 73 68 61 6b 65 20 61 73 <dd>Handshake as
21a0: 20 73 65 72 76 65 72 20 69 66 20 74 72 75 65 2c server if true,
21b0: 20 65 6c 73 65 20 68 61 6e 64 73 68 61 6b 65 20 else handshake
21c0: 61 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 as. c
21d0: 6c 69 65 6e 74 2e 28 3c 73 74 72 6f 6e 67 3e 64 lient.(<strong>d
21e0: 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 3a efault</strong>:
21f0: 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 <em>false</em>)
2200: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
2210: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 65 t><strong>-serve
2220: 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c rname</strong> <
2230: 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c 2f 64 74 em>host</em></dt
2240: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 4f 6e >. <dd>On
2250: 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 69 66 20 ly available if
2260: 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 the OpenSSL libr
2270: 61 72 79 20 74 68 65 20 70 61 63 6b 61 67 65 20 ary the package
2280: 69 73 20 6c 69 6e 6b 65 64 0a 09 20 20 20 20 61 is linked.. a
2290: 67 61 69 6e 73 74 20 73 75 70 70 6f 72 74 73 20 gainst supports
22a0: 74 68 65 20 54 4c 53 20 68 6f 73 74 6e 61 6d 65 the TLS hostname
22b0: 20 65 78 74 65 6e 73 69 6f 6e 20 66 6f 72 20 27 extension for '
22c0: 53 65 72 76 65 72 20 4e 61 6d 65 0a 09 20 20 20 Server Name..
22d0: 20 49 6e 64 69 63 61 74 69 6f 6e 27 20 28 53 4e Indication' (SN
22e0: 49 29 2e 20 55 73 65 20 74 6f 20 6e 61 6d 65 20 I). Use to name
22f0: 74 68 65 20 6c 6f 67 69 63 61 6c 20 68 6f 73 74 the logical host
2300: 20 77 65 20 61 72 65 20 74 61 6c 6b 69 6e 67 0a we are talking.
2310: 09 20 20 20 20 74 6f 20 61 6e 64 20 65 78 70 65 . to and expe
2320: 63 74 69 6e 67 20 61 20 63 65 72 74 69 66 69 63 cting a certific
2330: 61 74 65 20 66 6f 72 3c 2f 64 64 3e 0a 20 20 20 ate for</dd>.
2340: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
2350: 3e 2d 73 73 6c 32 3c 2f 73 74 72 6f 6e 67 3e 20 >-ssl2</strong>
2360: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 <em>bool</em></d
2370: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 45 t>. <dd>E
2380: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c nable use of SSL
2390: 20 76 32 2e 20 28 3c 73 74 72 6f 6e 67 3e 64 65 v2. (<strong>de
23a0: 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 3a 20 fault</strong>:
23b0: 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 0a 20 <em>false</em>.
23c0: 20 20 20 20 20 20 20 20 20 20 20 75 6e 6c 65 73 unles
23d0: 73 20 2d 44 4e 4f 5f 50 41 54 45 4e 54 53 20 77 s -DNO_PATENTS w
23e0: 61 73 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 as specified in
23f0: 62 75 69 6c 64 29 3c 2f 64 64 3e 0a 20 20 20 20 build)</dd>.
2400: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
2410: 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e 3c -ssl3 </strong><
2420: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 em>bool</em></dt
2430: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 45 6e >. <dd>En
2440: 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c 20 able use of SSL
2450: 76 33 2e 20 28 3c 73 74 72 6f 6e 67 3e 64 65 66 v3. (<strong>def
2460: 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 3a 20 3c ault</strong>: <
2470: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f em>false</em>)</
2480: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dd>. <dt>
2490: 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 3c 2f 73 -<strong>tls1</s
24a0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
24b0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
24c0: 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 <dd>Enable use
24d0: 20 6f 66 20 54 4c 53 20 76 31 2e 20 28 3c 73 74 of TLS v1. (<st
24e0: 72 6f 6e 67 3e 64 65 66 61 75 6c 74 3c 2f 73 74 rong>default</st
24f0: 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 74 72 75 65 3c rong>: <em>true<
2500: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 /em>)</dd>.
2510: 20 20 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e <dt>-<strong>
2520: 74 6c 73 31 2e 31 3c 2f 73 74 72 6f 6e 67 3e 20 tls1.1</strong>
2530: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 <em>bool</em></d
2540: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 45 t>. <dd>E
2550: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 nable use of TLS
2560: 20 76 31 2e 31 20 28 3c 73 74 72 6f 6e 67 3e 64 v1.1 (<strong>d
2570: 65 66 61 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 3a efault</strong>:
2580: 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c <em>true</em>)<
2590: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
25a0: 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 32 >-<strong>tls1.2
25b0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
25c0: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 ol</em></dt>.
25d0: 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 <dd>Enable
25e0: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 20 use of TLS v1.2
25f0: 28 3c 73 74 72 6f 6e 67 3e 64 65 66 61 75 6c 74 (<strong>default
2600: 3c 2f 73 74 72 6f 6e 67 3e 3a 20 3c 65 6d 3e 74 </strong>: <em>t
2610: 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 rue</em>)</dd>.
2620: 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b </dl>.</block
2630: 71 75 6f 74 65 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 quote>..<dl>.
2640: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
2650: 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e s::unimport"><b>
2660: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 3c 2f tls::unimport </
2670: 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e b><i>channel</i>
2680: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
2690: 64 3e 50 72 6f 76 69 64 65 64 20 66 6f 72 20 73 d>Provided for s
26a0: 79 6d 6d 65 74 72 79 20 74 6f 20 3c 73 74 72 6f ymmetry to <stro
26b0: 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f ng>tls::import</
26c0: 73 74 72 6f 6e 67 3e 2c 20 74 68 69 73 0a 20 20 strong>, this.
26d0: 20 20 20 20 75 6e 73 74 61 63 6b 73 20 74 68 65 unstacks the
26e0: 20 53 53 4c 2d 65 6e 61 62 6c 69 6e 67 20 6f 66 SSL-enabling of
26f0: 20 61 20 72 65 67 75 6c 61 72 20 54 63 6c 20 63 a regular Tcl c
2700: 68 61 6e 6e 65 6c 2e 20 20 41 6e 20 65 72 72 6f hannel. An erro
2710: 72 0a 20 20 20 20 20 20 69 73 20 74 68 72 6f 77 r. is throw
2720: 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74 20 n if TLS is not
2730: 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64 20 the top stacked
2740: 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 channel type.</d
2750: 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 64 6c 3e 0a 20 d>.</dl>..<dl>.
2760: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 <dt><a name="
2770: 74 6c 73 3a 3a 63 69 70 68 65 72 73 20 70 72 6f tls::ciphers pro
2780: 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 22 tocol ?verbose?"
2790: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 ><strong>tls::ci
27a0: 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 phers</strong>.
27b0: 20 20 20 20 20 20 20 3c 65 6d 3e 70 72 6f 74 6f <em>proto
27c0: 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 3c 2f 65 col ?verbose?</e
27d0: 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 m></a></dt>.
27e0: 3c 64 64 3e 52 65 74 75 72 6e 73 20 6c 69 73 74 <dd>Returns list
27f0: 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20 63 69 of supported ci
2800: 70 68 65 72 73 20 62 61 73 65 64 20 6f 6e 20 74 phers based on t
2810: 68 65 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c he <em>protocol<
2820: 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 79 6f 75 /em>. you
2830: 20 73 75 70 70 6c 79 2c 20 77 68 69 63 68 20 6d supply, which m
2840: 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 3c 65 ust be one of <e
2850: 6d 3e 73 73 6c 32 2c 20 73 73 6c 33 2c 20 6f 72 m>ssl2, ssl3, or
2860: 20 74 6c 73 31 3c 2f 65 6d 3e 2e 0a 20 20 20 20 tls1</em>..
2870: 20 20 20 20 49 66 20 3c 65 6d 3e 76 65 72 62 6f If <em>verbo
2880: 73 65 3c 2f 65 6d 3e 20 69 73 20 73 70 65 63 69 se</em> is speci
2890: 66 69 65 64 20 61 73 20 74 72 75 65 20 74 68 65 fied as true the
28a0: 6e 20 61 20 76 65 72 62 6f 73 65 2c 0a 20 20 20 n a verbose,.
28b0: 20 20 20 20 20 73 65 6d 69 2d 68 75 6d 61 6e 20 semi-human
28c0: 72 65 61 64 61 62 6c 65 20 6c 69 73 74 20 69 73 readable list is
28d0: 20 72 65 74 75 72 6e 65 64 20 70 72 6f 76 69 64 returned provid
28e0: 69 6e 67 20 61 64 64 69 74 69 6f 6e 61 6c 0a 20 ing additional.
28f0: 20 20 20 20 20 20 20 69 6e 66 6f 72 6d 61 74 69 informati
2900: 6f 6e 20 6f 6e 20 74 68 65 20 6e 61 74 75 72 65 on on the nature
2910: 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 20 73 of the cipher s
2920: 75 70 70 6f 72 74 2e 20 49 6e 20 65 61 63 68 0a upport. In each.
2930: 20 20 20 20 20 20 20 20 63 61 73 65 20 74 68 65 case the
2940: 20 72 65 73 75 6c 74 20 69 73 20 61 20 54 63 6c result is a Tcl
2950: 20 6c 69 73 74 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c list.</dd>.</dl
2960: 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e >..<dl>. <dt>
2970: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 76 65 <a name="tls::ve
2980: 72 73 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 rsion"><strong>t
2990: 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 73 74 72 ls::version</str
29a0: 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 ong></a></dt>.
29b0: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 <dd>Returns th
29c0: 65 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 e version string
29d0: 20 64 65 66 69 6e 65 64 20 62 79 20 4f 70 65 6e defined by Open
29e0: 53 53 4c 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a SSL.</dd>.</dl>.
29f0: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 41 .<h3><a name="CA
2a00: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e LLBACK OPTIONS">
2a10: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
2a20: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 0a 41 </a></h3>..<p>.A
2a30: 73 20 69 6e 64 69 63 61 74 65 64 20 61 62 6f 76 s indicated abov
2a40: 65 2c 20 69 6e 64 69 76 69 64 75 61 6c 20 63 68 e, individual ch
2a50: 61 6e 6e 65 6c 73 20 63 61 6e 20 62 65 20 67 69 annels can be gi
2a60: 76 65 6e 20 74 68 65 69 72 20 6f 77 6e 20 63 61 ven their own ca
2a70: 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 6e 64 6c llbacks.to handl
2a80: 65 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20 70 e intermediate p
2a90: 72 6f 63 65 73 73 69 6e 67 20 62 79 20 74 68 65 rocessing by the
2aa0: 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 OpenSSL library
2ab0: 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c 65 6d 3e , using the.<em>
2ac0: 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 61 6e -command</em> an
2ad0: 64 20 3c 65 6d 3e 2d 70 61 73 73 77 6f 72 64 3c d <em>-password<
2ae0: 2f 65 6d 3e 20 6f 70 74 69 6f 6e 73 20 70 61 73 /em> options pas
2af0: 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 6f 66 sed to either of
2b00: 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f .<strong>tls::so
2b10: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 6f 72 cket</strong> or
2b20: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d <strong>tls::im
2b30: 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 3c port</strong>..<
2b40: 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 /p>..<blockquote
2b50: 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 74 3e >.<dl>.. <dt>
2b60: 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 <strong>-command
2b70: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 </strong> <em>ca
2b80: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e llback</em></dt>
2b90: 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b . <dd>..Invok
2ba0: 65 73 20 74 68 65 20 73 70 65 63 69 66 69 65 64 es the specified
2bb0: 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 <em>callback</e
2bc0: 6d 3e 20 73 63 72 69 70 74 20 61 74 0a 09 73 65 m> script at..se
2bd0: 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 veral points dur
2be0: 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 ing the OpenSSL
2bf0: 68 61 6e 64 73 68 61 6b 65 2e 0a 09 45 78 63 65 handshake...Exce
2c00: 70 74 20 61 73 20 69 6e 64 69 63 61 74 65 64 20 pt as indicated
2c10: 62 65 6c 6f 77 2c 20 76 61 6c 75 65 73 20 72 65 below, values re
2c20: 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 0a turned from the.
2c30: 09 63 61 6c 6c 62 61 63 6b 20 61 72 65 20 69 67 .callback are ig
2c40: 6e 6f 72 65 64 2e 0a 09 41 72 67 75 6d 65 6e 74 nored...Argument
2c50: 73 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68 s appended to th
2c60: 65 20 73 63 72 69 70 74 20 75 70 6f 6e 20 63 61 e script upon ca
2c70: 6c 6c 62 61 63 6b 20 74 61 6b 65 20 6f 6e 65 20 llback take one
2c80: 6f 66 20 74 68 65 0a 09 66 6f 6c 6c 6f 77 69 6e of the..followin
2c90: 67 20 66 6f 72 6d 73 3a 0a 0a 09 3c 62 72 3e 0a g forms:...<br>.
2ca0: 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 0a 09 .<br>...<dl>....
2cb0: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e <dt>.. <strong>
2cc0: 69 6e 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 info</strong> <e
2cd0: 6d 3e 63 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 m>channel major
2ce0: 6d 69 6e 6f 72 20 6d 65 73 73 61 67 65 3c 2f 65 minor message</e
2cf0: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a m>..</dt>..<dd>.
2d00: 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 . This form of
2d10: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
2d20: 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 ked by the OpenS
2d30: 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c SL function.. <
2d40: 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 74 code>SSL_CTX_set
2d50: 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 _info_callback()
2d60: 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e </code>... <br>
2d70: 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d 61 6a 6f .. The <em>majo
2d80: 72 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e 6d r</em> and <em>m
2d90: 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 inor</em> argume
2da0: 6e 74 73 20 61 72 65 20 75 73 65 64 20 74 6f 0a nts are used to.
2db0: 09 20 20 72 65 70 72 65 73 65 6e 74 20 74 68 65 . represent the
2dc0: 20 73 74 61 74 65 20 69 6e 66 6f 72 6d 61 74 69 state informati
2dd0: 6f 6e 20 62 69 74 6d 61 73 6b 2e 0a 09 20 20 3c on bitmask... <
2de0: 64 6c 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 69 dl>.. <dt>Possi
2df0: 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c ble values for <
2e00: 65 6d 3e 6d 61 6a 6f 72 3c 2f 65 6d 3e 20 61 72 em>major</em> ar
2e10: 65 3a 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e 3c e:</dt>.. <dd><
2e20: 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c 20 code>handshake,
2e30: 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c 20 alert, connect,
2e40: 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f accept</code>.</
2e50: 64 64 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 69 dd>.. <dt>Possi
2e60: 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c ble values for <
2e70: 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 em>minor</em> ar
2e80: 65 3a 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e 3c e:</dt>.. <dd><
2e90: 63 6f 64 65 3e 73 74 61 72 74 2c 20 64 6f 6e 65 code>start, done
2ea0: 2c 20 72 65 61 64 2c 20 77 72 69 74 65 2c 20 6c , read, write, l
2eb0: 6f 6f 70 2c 20 65 78 69 74 3c 2f 63 6f 64 65 3e oop, exit</code>
2ec0: 2e 3c 2f 64 64 3e 0a 09 20 20 3c 2f 64 6c 3e 0a .</dd>.. </dl>.
2ed0: 09 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 . The <em>messa
2ee0: 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 ge</em> argument
2ef0: 20 69 73 20 61 20 64 65 73 63 72 69 70 74 69 76 is a descriptiv
2f00: 65 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 6d e string which m
2f10: 61 79 0a 09 20 20 62 65 20 67 65 6e 65 72 61 74 ay.. be generat
2f20: 65 64 20 65 69 74 68 65 72 20 62 79 0a 09 20 20 ed either by..
2f30: 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f <code>SSL_state_
2f40: 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 string_long()</c
2f50: 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c 63 ode> or by.. <c
2f60: 6f 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 ode>SSL_alert_de
2f70: 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 sc_string_long()
2f80: 3c 2f 63 6f 64 65 3e 2c 0a 09 20 20 64 65 70 65 </code>,.. depe
2f90: 6e 64 69 6e 67 20 6f 6e 20 63 6f 6e 74 65 78 74 nding on context
2fa0: 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a ...</dd>...<br>.
2fb0: 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e ..<dt>.. <stron
2fc0: 67 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e 67 g>verify</strong
2fd0: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 65 > <em>channel de
2fe0: 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20 pth cert status
2ff0: 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 error</em>..</dt
3000: 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 >..<dd>.. This
3010: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
3020: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 is invoked by t
3030: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 he OpenSSL funct
3040: 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c ion.. <code>SSL
3050: 5f 73 65 74 5f 76 65 72 69 66 79 28 29 3c 2f 63 _set_verify()</c
3060: 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 ode>... <br>..
3070: 20 54 68 65 20 3c 65 6d 3e 64 65 70 74 68 3c 2f The <em>depth</
3080: 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 em> argument is
3090: 61 6e 20 69 6e 74 65 67 65 72 20 72 65 70 72 65 an integer repre
30a0: 73 65 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 63 senting the.. c
30b0: 75 72 72 65 6e 74 20 64 65 70 74 68 20 6f 6e 20 urrent depth on
30c0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
30d0: 63 68 61 69 6e 2c 20 77 69 74 68 0a 09 20 20 3c chain, with.. <
30e0: 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 61 73 code>0</code> as
30f0: 20 74 68 65 20 73 75 62 6a 65 63 74 20 63 65 72 the subject cer
3100: 74 69 66 69 63 61 74 65 20 61 6e 64 20 68 69 67 tificate and hig
3110: 68 65 72 20 76 61 6c 75 65 73 0a 09 20 20 64 65 her values.. de
3120: 6e 6f 74 69 6e 67 20 70 72 6f 67 72 65 73 73 69 noting progressi
3130: 76 65 6c 79 20 6d 6f 72 65 20 69 6e 64 69 72 65 vely more indire
3140: 63 74 20 69 73 73 75 65 72 20 63 65 72 74 69 66 ct issuer certif
3150: 69 63 61 74 65 73 2e 0a 09 20 20 3c 62 72 3e 0a icates... <br>.
3160: 09 20 20 54 68 65 20 3c 65 6d 3e 63 65 72 74 3c . The <em>cert<
3170: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 /em> argument is
3180: 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 a list of key-v
3190: 61 6c 75 65 20 70 61 69 72 73 20 73 69 6d 69 6c alue pairs simil
31a0: 61 72 0a 09 20 20 74 6f 20 74 68 6f 73 65 20 72 ar.. to those r
31b0: 65 74 75 72 6e 65 64 20 62 79 0a 09 20 20 3c 61 eturned by.. <a
31c0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 href="#tls::sta
31d0: 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 tus"><strong>tls
31e0: 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 ::status</strong
31f0: 3e 3c 2f 61 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 ></a>... <br>..
3200: 20 20 54 68 65 20 3c 65 6d 3e 73 74 61 74 75 73 The <em>status
3210: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 </em> argument i
3220: 73 20 61 6e 20 69 6e 74 65 67 65 72 20 72 65 70 s an integer rep
3230: 72 65 73 65 6e 74 69 6e 67 20 74 68 65 0a 09 20 resenting the..
3240: 20 63 75 72 72 65 6e 74 20 76 61 6c 69 64 69 74 current validit
3250: 79 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 y of the certifi
3260: 63 61 74 65 2e 0a 09 20 20 41 20 76 61 6c 75 65 cate... A value
3270: 20 6f 66 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 of <code>0</cod
3280: 65 3e 20 6d 65 61 6e 73 20 74 68 65 20 63 65 72 e> means the cer
3290: 74 69 66 69 63 61 74 65 20 69 73 20 64 65 65 6d tificate is deem
32a0: 65 64 20 69 6e 76 61 6c 69 64 2e 0a 09 20 20 41 ed invalid... A
32b0: 20 76 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e value of <code>
32c0: 31 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 1</code> means t
32d0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 he certificate i
32e0: 73 20 64 65 65 6d 65 64 20 76 61 6c 69 64 2e 0a s deemed valid..
32f0: 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c . <br>.. The <
3300: 65 6d 3e 65 72 72 6f 72 3c 2f 65 6d 3e 20 61 72 em>error</em> ar
3310: 67 75 6d 65 6e 74 20 73 75 70 70 6c 69 65 73 20 gument supplies
3320: 74 68 65 20 6d 65 73 73 61 67 65 2c 20 69 66 20 the message, if
3330: 61 6e 79 2c 20 67 65 6e 65 72 61 74 65 64 0a 09 any, generated..
3340: 20 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e 58 35 by.. <code>X5
3350: 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 74 09_STORE_CTX_get
3360: 5f 65 72 72 6f 72 28 29 3c 2f 63 6f 64 65 3e 2e _error()</code>.
3370: 0a 09 20 20 3c 62 72 3e 0a 09 20 20 3c 62 72 3e .. <br>.. <br>
3380: 0a 09 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b .. The callback
3390: 20 6d 61 79 20 6f 76 65 72 72 69 64 65 20 6e 6f may override no
33a0: 72 6d 61 6c 20 76 61 6c 69 64 61 74 69 6f 6e 20 rmal validation
33b0: 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 65 78 processing by ex
33c0: 70 6c 69 63 69 74 6c 79 0a 09 20 20 72 65 74 75 plicitly.. retu
33d0: 72 6e 69 6e 67 20 6f 6e 65 20 6f 66 20 74 68 65 rning one of the
33e0: 20 61 62 6f 76 65 20 3c 65 6d 3e 73 74 61 74 75 above <em>statu
33f0: 73 3c 2f 65 6d 3e 20 76 61 6c 75 65 73 2e 0a 09 s</em> values...
3400: 3c 2f 64 64 3e 0a 0a 09 3c 2f 64 6c 3e 0a 20 20 </dd>...</dl>.
3410: 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 </dd>.. <br
3420: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f >.. <dt><stro
3430: 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 ng>-password</st
3440: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 rong> <em>callba
3450: 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 ck</em></dt>.
3460: 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 <dd>..Invokes t
3470: 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d he specified <em
3480: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 >callback</em> s
3490: 63 72 69 70 74 20 77 68 65 6e 20 4f 70 65 6e 53 cript when OpenS
34a0: 53 4c 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62 74 SL needs to..obt
34b0: 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 20 ain a password.
34c0: 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 The callback sh
34d0: 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73 74 ould return a st
34e0: 72 69 6e 67 20 77 68 69 63 68 0a 09 72 65 70 72 ring which..repr
34f0: 65 73 65 6e 74 73 20 74 68 65 20 70 61 73 73 77 esents the passw
3500: 6f 72 64 20 74 6f 20 62 65 20 75 73 65 64 2e 0a ord to be used..
3510: 09 4e 6f 20 61 72 67 75 6d 65 6e 74 73 20 61 72 .No arguments ar
3520: 65 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74 68 e appended to th
3530: 65 20 73 63 72 69 70 74 20 75 70 6f 6e 20 63 61 e script upon ca
3540: 6c 6c 62 61 63 6b 2e 0a 20 20 20 20 3c 2f 64 64 llback.. </dd
3550: 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 >.</dl>.</blockq
3560: 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 72 uote>..<p>.Refer
3570: 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 ence implementat
3580: 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61 ions of these ca
3590: 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76 llbacks are prov
35a0: 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69 73 74 ided in the.dist
35b0: 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 74 72 ribution as <str
35c0: 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 ong>tls::callbac
35d0: 6b 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 0a 3c k</strong> and.<
35e0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 strong>tls::pass
35f0: 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 72 65 word</strong> re
3600: 73 70 65 63 74 69 76 65 6c 79 2e 20 20 4e 6f 74 spectively. Not
3610: 65 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 e that these are
3620: 0a 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e .<em>sample</em>
3630: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 implementations
3640: 20 6f 6e 6c 79 2e 20 20 49 6e 20 61 20 6d 6f 72 only. In a mor
3650: 65 20 72 65 61 6c 69 73 74 69 63 20 64 65 70 6c e realistic depl
3660: 6f 79 6d 65 6e 74 0a 79 6f 75 20 77 6f 75 6c 64 oyment.you would
3670: 20 73 70 65 63 69 66 79 20 79 6f 75 72 20 6f 77 specify your ow
3680: 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 n callback scrip
3690: 74 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 20 63 ts on each TLS c
36a0: 68 61 6e 6e 65 6c 0a 75 73 69 6e 67 20 74 68 65 hannel.using the
36b0: 20 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 <em>-command</e
36c0: 6d 3e 20 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 73 m> and <em>-pass
36d0: 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e word</em> option
36e0: 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 s..</p>..<p>.The
36f0: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f default behavio
3700: 72 20 77 68 65 6e 20 74 68 65 20 3c 65 6d 3e 2d r when the <em>-
3710: 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 6f 70 74 command</em> opt
3720: 69 6f 6e 20 69 73 20 6e 6f 74 20 73 70 65 63 69 ion is not speci
3730: 66 69 65 64 20 69 73 20 66 6f 72 0a 54 4c 53 20 fied is for.TLS
3740: 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 to process the a
3750: 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 ssociated librar
3760: 79 20 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74 65 y callbacks inte
3770: 72 6e 61 6c 6c 79 2e 0a 54 68 65 20 64 65 66 61 rnally..The defa
3780: 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 ult behavior whe
3790: 6e 20 74 68 65 20 3c 65 6d 3e 2d 70 61 73 73 77 n the <em>-passw
37a0: 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 20 ord</em> option
37b0: 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 is not specified
37c0: 20 69 73 20 66 6f 72 0a 54 4c 53 20 74 6f 20 70 is for.TLS to p
37d0: 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f 63 rocess the assoc
37e0: 69 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 61 iated library ca
37f0: 6c 6c 62 61 63 6b 73 20 62 79 20 61 74 74 65 6d llbacks by attem
3800: 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c 0a 3c 73 pting to call.<s
3810: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 trong>tls::passw
3820: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 54 68 ord</strong>..Th
3830: 65 20 64 69 66 66 65 72 65 6e 63 65 20 62 65 74 e difference bet
3840: 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f 20 62 ween these two b
3850: 65 68 61 76 69 6f 72 73 20 69 73 20 61 20 63 6f ehaviors is a co
3860: 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 6d 61 69 nsequence of mai
3870: 6e 74 61 69 6e 69 6e 67 0a 63 6f 6d 70 61 74 69 ntaining.compati
3880: 62 69 6c 69 74 79 20 77 69 74 68 20 65 61 72 6c bility with earl
3890: 69 65 72 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 ier implementati
38a0: 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 ons..</p>..<p>.T
38b0: 68 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a he <strong>tls::
38c0: 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 76 debug</strong> v
38d0: 61 72 69 61 62 6c 65 20 70 72 6f 76 69 64 65 73 ariable provides
38e0: 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c some additional
38f0: 0a 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 .control over th
3900: 65 73 65 20 72 65 66 65 72 65 6e 63 65 20 63 61 ese reference ca
3910: 6c 6c 62 61 63 6b 73 2e 20 20 49 74 73 20 76 61 llbacks. Its va
3920: 6c 75 65 20 69 73 20 7a 65 72 6f 20 62 79 20 64 lue is zero by d
3930: 65 66 61 75 6c 74 2e 0a 48 69 67 68 65 72 20 76 efault..Higher v
3940: 61 6c 75 65 73 20 70 72 6f 64 75 63 65 20 6d 6f alues produce mo
3950: 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f 75 re diagnostic ou
3960: 74 70 75 74 2c 20 61 6e 64 20 77 69 6c 6c 20 61 tput, and will a
3970: 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 0a 76 65 lso force the.ve
3980: 72 69 66 79 20 6d 65 74 68 6f 64 20 69 6e 20 3c rify method in <
3990: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c strong>tls::call
39a0: 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 74 6f back</strong> to
39b0: 20 61 63 63 65 70 74 20 74 68 65 0a 63 65 72 74 accept the.cert
39c0: 69 66 69 63 61 74 65 2c 20 65 76 65 6e 20 77 68 ificate, even wh
39d0: 65 6e 20 69 74 20 69 73 20 69 6e 76 61 6c 69 64 en it is invalid
39e0: 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e ..</p>..<p>.<em>
39f0: 0a 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 .The use of the
3a00: 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 reference callba
3a10: 63 6b 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a cks <strong>tls:
3a20: 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e :callback</stron
3a30: 67 3e 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e 74 g> and.<strong>t
3a40: 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 ls::password</st
3a50: 72 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65 63 rong> is not rec
3a60: 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 79 20 ommended. They
3a70: 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 0a 66 may be removed.f
3a80: 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 rom future relea
3a90: 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a ses..</em>.</p>.
3aa0: 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 .<p>.<em>.The us
3ab0: 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c e of the variabl
3ac0: 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 e <strong>tls::d
3ad0: 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 73 ebug</strong> is
3ae0: 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 not recommended
3af0: 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d 6f ..It may be remo
3b00: 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 ved from future
3b10: 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a releases..</em>.
3b20: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d </p>..<h3><a nam
3b30: 65 3d 22 48 54 54 50 53 20 45 58 41 4d 50 4c 45 e="HTTPS EXAMPLE
3b40: 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c 45 3c ">HTTPS EXAMPLE<
3b50: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 /a></h3>..<p>Thi
3b60: 73 20 65 78 61 6d 70 6c 65 20 75 73 65 73 20 61 s example uses a
3b70: 20 73 61 6d 70 6c 65 20 73 65 72 76 65 72 2e 70 sample server.p
3b80: 65 6d 20 70 72 6f 76 69 64 65 64 20 77 69 74 68 em provided with
3b90: 20 74 68 65 20 54 4c 53 20 72 65 6c 65 61 73 65 the TLS release
3ba0: 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 20 74 68 ,.courtesy of th
3bb0: 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 e <strong>OpenSS
3bc0: 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 6f 6a 65 L</strong> proje
3bd0: 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e 3c 63 ct.</p>..<pre><c
3be0: 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 ode>.package req
3bf0: 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 uire http.packag
3c00: 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a 68 e require tls..h
3c10: 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 ttp::register ht
3c20: 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a tps 443 [list ::
3c30: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 72 65 71 tls::socket -req
3c40: 75 69 72 65 20 31 20 2d 63 61 66 69 6c 65 20 2e uire 1 -cafile .
3c50: 2f 73 65 72 76 65 72 2e 70 65 6d 5d 0a 0a 73 65 /server.pem]..se
3c60: 74 20 74 6f 6b 20 5b 68 74 74 70 3a 3a 67 65 74 t tok [http::get
3c70: 75 72 6c 20 68 74 74 70 73 3a 2f 2f 64 65 76 65 url https://deve
3c80: 6c 6f 70 65 72 2e 6e 65 74 73 63 61 70 65 2e 63 loper.netscape.c
3c90: 6f 6d 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 om/].</code></pr
3ca0: 65 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d e>..<h3><a name=
3cb0: 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 "SPECIAL CONSIDE
3cc0: 52 41 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c RATIONS">SPECIAL
3cd0: 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c CONSIDERATIONS<
3ce0: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 /a></h3>..<p>The
3cf0: 20 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 capabilities of
3d00: 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 this package ca
3d10: 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c n vary enormousl
3d20: 79 20 62 61 73 65 64 0a 75 70 6f 6e 20 68 6f 77 y based.upon how
3d30: 20 79 6f 75 72 20 4f 70 65 6e 53 53 4c 20 6c 69 your OpenSSL li
3d40: 62 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 brary was config
3d50: 75 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 ured and built.
3d60: 41 74 20 74 68 65 0a 6d 6f 73 74 20 6d 61 63 72 At the.most macr
3d70: 6f 2d 6c 65 76 65 6c 20 4f 70 65 6e 53 53 4c 20 o-level OpenSSL
3d80: 73 75 70 70 6f 72 74 73 20 61 20 26 71 75 6f 74 supports a "
3d90: 3b 6e 6f 20 70 61 74 65 6e 74 73 26 71 75 6f 74 ;no patents"
3da0: 3b 20 62 75 69 6c 64 2c 0a 77 68 69 63 68 20 64 ; build,.which d
3db0: 69 73 61 62 6c 65 73 20 52 53 41 2c 20 49 44 45 isables RSA, IDE
3dc0: 41 2c 20 52 43 28 32 2c 34 2c 35 29 20 61 6e 64 A, RC(2,4,5) and
3dd0: 20 53 53 4c 32 20 2d 20 69 66 20 79 6f 75 72 20 SSL2 - if your
3de0: 4f 70 65 6e 53 53 4c 20 69 73 0a 63 6f 6e 66 69 OpenSSL is.confi
3df0: 67 75 72 65 64 20 74 68 69 73 20 77 61 79 20 74 gured this way t
3e00: 68 65 6e 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 hen you will nee
3e10: 64 20 74 6f 20 62 75 69 6c 64 20 54 4c 53 20 77 d to build TLS w
3e20: 69 74 68 20 74 68 65 0a 2d 44 4e 4f 5f 50 41 54 ith the.-DNO_PAT
3e30: 45 4e 54 53 20 6f 70 74 69 6f 6e 20 2d 20 61 6e ENTS option - an
3e40: 64 20 74 68 65 20 72 65 73 75 6c 74 61 6e 74 20 d the resultant
3e50: 6d 6f 64 75 6c 65 20 77 69 6c 6c 20 66 75 6e 63 module will func
3e60: 74 69 6f 6e 0a 63 6f 72 72 65 63 74 6c 79 20 61 tion.correctly a
3e70: 6e 64 20 61 6c 73 6f 20 73 75 70 70 6f 72 74 20 nd also support
3e80: 41 44 48 20 63 65 72 74 69 66 69 63 61 74 65 2d ADH certificate-
3e90: 6c 65 73 73 20 65 6e 63 72 79 70 74 69 6f 6e 2c less encryption,
3ea0: 0a 68 6f 77 65 76 65 72 20 79 6f 75 20 77 69 6c .however you wil
3eb0: 6c 20 62 65 20 75 6e 61 62 6c 65 20 74 6f 20 75 l be unable to u
3ec0: 74 69 6c 69 7a 65 20 74 68 69 73 20 74 6f 20 73 tilize this to s
3ed0: 70 65 61 6b 20 74 6f 20 6e 6f 72 6d 61 6c 20 57 peak to normal W
3ee0: 65 62 0a 53 65 72 76 65 72 73 2c 20 77 68 69 63 eb.Servers, whic
3ef0: 68 20 74 79 70 69 63 61 6c 6c 79 20 72 65 71 75 h typically requ
3f00: 69 72 65 20 52 53 41 20 73 75 70 70 6f 72 74 2e ire RSA support.
3f10: 20 50 6c 65 61 73 65 20 73 65 65 20 3c 61 0a 68 Please see <a.h
3f20: 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e ref="http://www.
3f30: 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 68 74 openssl.org/">ht
3f40: 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c tp://www.openssl
3f50: 2e 6f 72 67 2f 3c 2f 61 3e 20 66 6f 72 0a 6d 6f .org/</a> for.mo
3f60: 72 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f re information o
3f70: 6e 20 74 68 65 20 77 68 6f 6c 65 20 69 73 73 75 n the whole issu
3f80: 65 20 6f 66 20 70 61 74 65 6e 74 73 20 61 6e 64 e of patents and
3f90: 20 55 53 20 65 78 70 6f 72 74 0a 72 65 73 74 72 US export.restr
3fa0: 69 63 74 69 6f 6e 73 2e 20 3c 2f 70 3e 0a 0a 3c ictions. </p>..<
3fb0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 20 h3><a name="SEE
3fc0: 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f ALSO">SEE ALSO</
3fd0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 a></h3>..<p><str
3fe0: 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f ong>socket</stro
3ff0: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 6c ng>, <strong>fil
4000: 65 65 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67 eevent, </strong
4010: 3e 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f ><a.href="http:/
4020: 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 /www.openssl.org
4030: 2f 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 /"><strong>OpenS
4040: 53 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c SL</strong></a><
4050: 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e /p>..<hr>..<pre>
4060: 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 .Copyright ©
4070: 3b 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d ; 1999 Matt Newm
4080: 61 6e 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 an..Copyright &c
4090: 6f 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 69 opy; 2004 Starfi
40a0: 73 68 20 53 79 73 74 65 6d 73 2e 0a 3c 2f 70 72 sh Systems..</pr
40b0: 65 3e 0a 0a 5a 20 34 37 62 62 35 35 64 30 38 35 e>..Z 47bb55d085
40c0: 33 66 30 33 66 65 33 33 64 64 33 30 37 39 38 39 3f03fe33dd307989
40d0: 33 61 32 39 31 38 0a 3a2918.