0000: 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 0a <!DOCTYPE html>.
0010: 3c 68 74 6d 6c 20 6c 61 6e 67 3d 22 65 6e 22 3e <html lang="en">
0020: 0a 3c 68 65 61 64 3e 0a 3c 6d 65 74 61 20 68 74 .<head>.<meta ht
0030: 74 70 2d 65 71 75 69 76 3d 22 43 6f 6e 74 65 6e tp-equiv="Conten
0040: 74 2d 54 79 70 65 22 0a 63 6f 6e 74 65 6e 74 3d t-Type".content=
0050: 22 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72 "text/html; char
0060: 73 65 74 3d 75 74 66 2d 38 22 3e 0a 3c 6d 65 74 set=utf-8">.<met
0070: 61 20 6e 61 6d 65 3d 22 43 6f 70 79 72 69 67 68 a name="Copyrigh
0080: 74 22 20 63 6f 6e 74 65 6e 74 3d 22 31 39 39 39 t" content="1999
0090: 20 4d 61 74 74 20 4e 65 77 6d 61 6e 20 2f 20 32 Matt Newman / 2
00a0: 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73 004 Starfish Sys
00b0: 74 65 6d 73 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c tems">.<title>TL
00c0: 53 20 28 53 53 4c 29 20 54 63 6c 20 43 6f 6d 6d S (SSL) Tcl Comm
00d0: 61 6e 64 73 3c 2f 74 69 74 6c 65 3e 0a 3c 2f 68 ands</title>.</h
00e0: 65 61 64 3e 0a 0a 3c 62 6f 64 79 20 62 67 63 6f ead>..<body bgco
00f0: 6c 6f 72 3d 22 23 46 46 46 46 46 46 22 3e 0a 0a lor="#FFFFFF">..
0100: 3c 64 6c 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 <dl>. <dd><a
0110: 68 72 65 66 3d 22 23 4e 41 4d 45 22 3e 4e 41 4d href="#NAME">NAM
0120: 45 3c 2f 61 3e 0a 20 20 20 20 3c 64 6c 3e 0a 20 E</a>. <dl>.
0130: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3c 2f 62 <dd><b>tls</b
0140: 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c > - binding to <
0150: 62 3e 4f 70 65 6e 53 53 4c 3c 2f 62 3e 20 74 6f b>OpenSSL</b> to
0160: 6f 6c 6b 69 74 2e 3c 2f 64 64 3e 0a 20 20 20 20 olkit.</dd>.
0170: 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a </dl>. </dd>.
0180: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d <dd><a href=
0190: 22 23 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f "#SYNOPSIS">SYNO
01a0: 50 53 49 53 3c 2f 61 3e 20 3c 2f 64 64 3e 0a 20 PSIS</a> </dd>.
01b0: 20 20 20 3c 64 64 3e 3c 64 6c 3e 0a 09 20 20 20 <dd><dl>..
01c0: 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 <dd><b>package
01d0: 72 65 71 75 69 72 65 20 54 63 6c 3c 2f 62 3e 20 require Tcl</b>
01e0: 3c 65 6d 3e 3f 3c 62 3e 38 2e 35 3c 2f 62 3e 3f <em>?<b>8.5</b>?
01f0: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 </em></dd>..
0200: 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 <dd><b>package r
0210: 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e 20 3c equire tls</b> <
0220: 65 6d 3e 3f 40 40 56 45 52 53 40 40 3f 3c 2f 65 em>?@@VERS@@?</e
0230: 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74 m></dd>.. <dt
0240: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20 > </dt>..
0250: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6e <dd><b>tls::in
0260: 69 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 it</b> <em>?opti
0270: 6f 6e 73 3f 3c 2f 65 6d 3e 20 3c 2f 64 64 3e 0a ons?</em> </dd>.
0280: 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a . <dd><b>tls:
0290: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e :socket</b> <em>
02a0: 3f 6f 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20 70 ?options? host p
02b0: 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 ort</em></dd>..
02c0: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 <dd><b>tls::s
02d0: 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d ocket</b> <em>?-
02e0: 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 server command?
02f0: 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f ?options? port</
0300: 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 em></dd>.. <d
0310: 64 3e 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 d><b>tls::handsh
0320: 61 6b 65 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e ake</b> <em>chan
0330: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 nel</em></dd>..
0340: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 <dd><b>tls::s
0350: 74 61 74 75 73 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d tatus</b> <em>?-
0360: 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f local? channel</
0370: 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 em></dd>.. <d
0380: 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 d><b>tls::import
0390: 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c </b> <em>channel
03a0: 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 65 6d 3e 3c ?options?</em><
03b0: 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 /dd>.. <dd><b
03c0: 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f >tls::unimport</
03d0: 62 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f b> <em>channel</
03e0: 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 em></dd>.. <d
03f0: 64 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 d><b>tls::cipher
0400: 73 3c 2f 62 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 s</b> <em>protoc
0410: 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 3c 2f 65 6d ol ?verbose?</em
0420: 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e ></dd>.. <dd>
0430: 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c <b>tls::version<
0440: 2f 62 3e 3c 2f 64 64 3e 0a 09 3c 2f 64 6c 3e 0a /b></dd>..</dl>.
0450: 20 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 </dd>. <d
0460: 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 4f 4d 4d d><a href="#COMM
0470: 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f ANDS">COMMANDS</
0480: 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e a></dd>. <dd>
0490: 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 <a href="#CALLBA
04a0: 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c CK OPTIONS">CALL
04b0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e BACK OPTIONS</a>
04c0: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 </dd>. <dd><a
04d0: 20 68 72 65 66 3d 22 23 48 54 54 50 53 20 45 58 href="#HTTPS EX
04e0: 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45 58 41 AMPLE">HTTPS EXA
04f0: 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 MPLE</a></dd>.
0500: 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 <dd><a href="#
0510: 53 45 45 20 41 4c 53 4f 22 3e 53 50 45 43 49 41 SEE ALSO">SPECIA
0520: 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 L CONSIDERATIONS
0530: 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 </a></dd>. <d
0540: 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 45 45 20 d><a href="#SEE
0550: 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f ALSO">SEE ALSO</
0560: 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c a></dd>.</dl>..<
0570: 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 hr>..<h3><a name
0580: 3d 22 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 3e ="NAME">NAME</a>
0590: 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e </h3>..<p><stron
05a0: 67 3e 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 2d g>tls</strong> -
05b0: 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 73 74 72 binding to <str
05c0: 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 ong>OpenSSL</str
05d0: 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 74 2e 3c 2f 70 ong>.toolkit.</p
05e0: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
05f0: 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f 50 53 SYNOPSIS">SYNOPS
0600: 49 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e IS</a></h3>..<p>
0610: 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 <b>package requi
0620: 72 65 20 54 63 6c 20 38 2e 35 3c 2f 62 3e 3c 62 re Tcl 8.5</b><b
0630: 72 3e 0a 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 r>.<b>package re
0640: 71 75 69 72 65 20 74 6c 73 20 40 40 56 45 52 53 quire tls @@VERS
0650: 40 40 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 72 3e 0a @@</b><br>.<br>.
0660: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 <a href="#tls::i
0670: 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 nit"><b>tls::ini
0680: 74 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e t</b> <i>?option
0690: 73 3f 3c 2f 69 3e 3c 62 72 3e 0a 3c 2f 61 3e 3c s?</i><br>.</a><
06a0: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 6f a href="#tls::so
06b0: 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f cket"><b>tls::so
06c0: 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 cket</b> <em>?op
06d0: 74 69 6f 6e 73 3f 20 68 6f 73 74 0a 70 6f 72 74 tions? host.port
06e0: 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 62 3e 74 6c 73 </em><br>.<b>tls
06f0: 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e ::socket</b><em>
0700: 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e ?-server comman
0710: 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 d? ?options? por
0720: 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e 3c t</em><br>.</a><
0730: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 a href="#tls::st
0740: 61 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 atus"><b>tls::st
0750: 61 74 75 73 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d 6c atus</b> <em>?-l
0760: 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 ocal? channel</e
0770: 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e 3c 61 20 68 72 m><br>.</a><a hr
0780: 65 66 3d 22 23 74 6c 73 3a 3a 68 61 6e 64 73 68 ef="#tls::handsh
0790: 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a 3a 68 61 6e ake"><b>tls::han
07a0: 64 73 68 61 6b 65 3c 2f 62 3e 3c 65 6d 3e 20 63 dshake</b><em> c
07b0: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c hannel</em></a><
07c0: 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 66 br>.<br>.<a href
07d0: 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e ="#tls::import">
07e0: 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f <b>tls::import</
07f0: 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f b> <i>channel ?o
0800: 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c ptions?</i></a><
0810: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0820: 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e s::unimport"><b>
0830: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 tls::unimport</b
0840: 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e > <i>channel</i>
0850: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 </a><br>.<a href
0860: 3d 22 23 74 6c 73 3a 3a 63 69 70 68 65 72 73 20 ="#tls::ciphers
0870: 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 protocol ?verbos
0880: 65 3f 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a e?"><strong>tls:
0890: 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 :ciphers</strong
08a0: 3e 0a 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f >.<em>protocol ?
08b0: 76 65 72 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f 61 verbose?</em></a
08c0: 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 ><br>.<a href="#
08d0: 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 62 tls::version"><b
08e0: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 >tls::version</b
08f0: 3e 3c 2f 61 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e ></a>.</p>..<h3>
0900: 3c 61 20 6e 61 6d 65 3d 22 44 45 53 43 52 49 50 <a name="DESCRIP
0910: 54 49 4f 4e 22 3e 44 45 53 43 52 49 50 54 49 4f TION">DESCRIPTIO
0920: 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 N</a></h3>..<p>T
0930: 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 his extension pr
0940: 6f 76 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 ovides a generic
0950: 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a 68 binding to <a.h
0960: 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e ref="http://www.
0970: 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 openssl.org/">Op
0980: 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 enSSL</a>, utili
0990: 7a 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 zing the.<strong
09a0: 3e 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 >Tcl_StackChanne
09b0: 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20 66 l</strong>.API f
09c0: 6f 72 20 54 63 6c 20 38 2e 32 20 61 6e 64 20 68 or Tcl 8.2 and h
09d0: 69 67 68 65 72 2e 20 54 68 65 20 73 6f 63 6b 65 igher. The socke
09e0: 74 73 20 62 65 68 61 76 65 20 65 78 61 63 74 6c ts behave exactl
09f0: 79 20 74 68 65 20 73 61 6d 65 0a 61 73 20 63 68 y the same.as ch
0a00: 61 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 annels created u
0a10: 73 69 6e 67 20 54 63 6c 27 73 20 62 75 69 6c 74 sing Tcl's built
0a20: 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b -in <strong>sock
0a30: 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d et</strong>.comm
0a40: 61 6e 64 20 77 69 74 68 20 61 64 64 69 74 69 6f and with additio
0a50: 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 nal options for
0a60: 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 controlling the
0a70: 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 54 6f 20 SSL session..To
0a80: 75 73 65 20 54 4c 53 20 77 69 74 68 20 61 6e 20 use TLS with an
0a90: 65 61 72 6c 69 65 72 20 76 65 72 73 69 6f 6e 20 earlier version
0aa0: 6f 66 20 54 63 6c 20 74 68 61 6e 20 38 2e 34 2c of Tcl than 8.4,
0ab0: 20 70 6c 65 61 73 65 20 6f 62 74 61 69 6e 0a 54 please obtain.T
0ac0: 4c 53 20 31 2e 33 2e 0a 3c 2f 70 3e 0a 0a 3c 68 LS 1.3..</p>..<h
0ad0: 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f 4d 4d 41 3><a name="COMMA
0ae0: 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f 61 NDS">COMMANDS</a
0af0: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 70 69 63 ></h3>..<p>Typic
0b00: 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c 64 20 75 ally one would u
0b10: 73 65 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 74 se the <strong>t
0b20: 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 73 74 72 ls::socket </str
0b30: 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 68 69 63 ong>command.whic
0b40: 68 20 70 72 6f 76 69 64 65 73 20 63 6f 6d 70 61 h provides compa
0b50: 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 74 68 tibility with th
0b60: 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 74 e native Tcl <st
0b70: 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 rong>socket</str
0b80: 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e 20 49 6e ong>.command. In
0b90: 20 73 75 63 68 20 63 61 73 65 73 20 3c 73 74 72 such cases <str
0ba0: 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c ong>tls::import<
0bb0: 2f 73 74 72 6f 6e 67 3e 20 73 68 6f 75 6c 64 20 /strong> should
0bc0: 6e 6f 74 20 62 65 0a 75 73 65 64 20 64 69 72 65 not be.used dire
0bd0: 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 6c 3e 0a ctly.</p>..<dl>.
0be0: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
0bf0: 22 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e 74 "tls::init"><b>t
0c00: 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 69 3e ls::init</b> <i>
0c10: 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 ?options?</i></a
0c20: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 54 ></dt>. <dd>T
0c30: 68 69 73 20 72 6f 75 74 69 6e 65 20 73 65 74 73 his routine sets
0c40: 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 74 the default opt
0c50: 69 6f 6e 73 20 75 73 65 64 20 62 79 20 3c 73 74 ions used by <st
0c60: 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 rong>tls::socket
0c70: 3c 2f 73 74 72 6f 6e 67 3e 0a 09 61 6e 64 20 69 </strong>..and i
0c80: 73 20 3c 65 6d 3e 6f 70 74 69 6f 6e 61 6c 3c 2f s <em>optional</
0c90: 65 6d 3e 2e 20 49 66 20 79 6f 75 20 63 61 6c 6c em>. If you call
0ca0: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d <strong>tls::im
0cb0: 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 64 port</strong>..d
0cc0: 69 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f 75 irectly this rou
0cd0: 74 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 65 tine has no effe
0ce0: 63 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 6f ct. Any of the o
0cf0: 70 74 69 6f 6e 73 0a 09 74 68 61 74 20 3c 73 74 ptions..that <st
0d00: 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 rong>tls::socket
0d10: 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63 65 70 74 </strong> accept
0d20: 73 20 63 61 6e 20 62 65 20 73 65 74 0a 09 75 73 s can be set..us
0d30: 69 6e 67 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 ing this command
0d40: 2c 20 74 68 6f 75 67 68 20 79 6f 75 20 73 68 6f , though you sho
0d50: 75 6c 64 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f uld limit your o
0d60: 70 74 69 6f 6e 73 0a 09 74 6f 20 6f 6e 6c 79 20 ptions..to only
0d70: 54 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 TLS related ones
0d80: 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 .</dd>. <dt>&
0d90: 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c nbsp;</dt>. <
0da0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
0db0: 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a :socket"><b>tls:
0dc0: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e :socket</b> <em>
0dd0: 3f 6f 70 74 69 6f 6e 73 3f 0a 09 68 6f 73 74 20 ?options?..host
0de0: 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 port</em></a></d
0df0: 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 62 3e 74 6c t>. <dt><b>tl
0e00: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d s::socket</b><em
0e10: 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 > ?-server comma
0e20: 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f nd? ?options? po
0e30: 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 rt</em></dt>.
0e40: 20 3c 64 64 3e 54 68 69 73 20 69 73 20 61 20 68 <dd>This is a h
0e50: 65 6c 70 65 72 20 66 75 6e 63 74 69 6f 6e 20 74 elper function t
0e60: 68 61 74 20 75 74 69 6c 69 7a 65 73 20 74 68 65 hat utilizes the
0e70: 20 75 6e 64 65 72 6c 79 69 6e 67 0a 09 63 6f 6d underlying..com
0e80: 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 3e 74 mands (<strong>t
0e90: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f ls::import</stro
0ea0: 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76 65 73 ng>). It behaves
0eb0: 0a 09 65 78 61 63 74 6c 79 20 74 68 65 20 73 61 ..exactly the sa
0ec0: 6d 65 20 61 73 20 74 68 65 20 6e 61 74 69 76 65 me as the native
0ed0: 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 Tcl <strong>soc
0ee0: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 63 6f ket</strong>..co
0ef0: 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 61 mmand except tha
0f00: 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 t the options ca
0f10: 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66 n include any of
0f20: 20 74 68 65 0a 09 61 70 70 6c 69 63 61 62 6c 65 the..applicable
0f30: 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a <a href="#tls::
0f40: 69 6d 70 6f 72 74 22 3e 3c 73 74 72 6f 6e 67 3e import"><strong>
0f50: 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f tls:import</stro
0f60: 6e 67 3e 3c 2f 61 3e 0a 09 6f 70 74 69 6f 6e 73 ng></a>..options
0f70: 20 77 69 74 68 20 6f 6e 65 20 61 64 64 69 74 69 with one additi
0f80: 6f 6e 61 6c 20 6f 70 74 69 6f 6e 3a 0a 3c 62 6c onal option:.<bl
0f90: 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 ockquote>. <d
0fa0: 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e l>..<dt><strong>
0fb0: 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 3c -autoservername<
0fc0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
0fd0: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 l</em></dt>..<dd
0fe0: 3e 41 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 >Automatically s
0ff0: 65 6e 64 20 74 68 65 20 2d 73 65 72 76 65 72 6e end the -servern
1000: 61 6d 65 20 61 73 20 74 68 65 20 3c 65 6d 3e 68 ame as the <em>h
1010: 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e ost</em> argumen
1020: 74 0a 09 20 20 20 20 28 64 65 66 61 75 6c 74 20 t.. (default
1030: 69 73 20 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 is <em>false</e
1040: 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 m>)</dd>. </d
1050: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e l>.</blockquote>
1060: 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c . <dt> <
1070: 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 /dt>. <dt><a
1080: 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 73 name="tls::hands
1090: 68 61 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c hake"><strong>tl
10a0: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 s::handshake</st
10b0: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 rong> <em>channe
10c0: 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a l</em></a></dt>.
10d0: 20 20 20 20 3c 64 64 3e 46 6f 72 63 65 73 20 68 <dd>Forces h
10e0: 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 andshake to take
10f0: 20 70 6c 61 63 65 2c 20 61 6e 64 20 72 65 74 75 place, and retu
1100: 72 6e 73 20 30 20 69 66 0a 09 68 61 6e 64 73 68 rns 0 if..handsh
1110: 61 6b 65 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 ake is still in
1120: 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c progress (non-bl
1130: 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 ocking), or 1 if
1140: 0a 09 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 ..the handshake
1150: 77 61 73 20 73 75 63 63 65 73 73 66 75 6c 2e 20 was successful.
1160: 49 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 If the handshake
1170: 20 66 61 69 6c 65 64 0a 09 74 68 69 73 20 72 6f failed..this ro
1180: 75 74 69 6e 65 20 77 69 6c 6c 20 74 68 72 6f 77 utine will throw
1190: 20 61 6e 20 65 72 72 6f 72 2e 3c 2f 64 64 3e 0a an error.</dd>.
11a0: 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f <dt> </
11b0: 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e dt>. <dt><a n
11c0: 61 6d 65 3d 22 74 6c 73 3a 3a 73 74 61 74 75 73 ame="tls::status
11d0: 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 "><strong>tls::s
11e0: 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 tatus</strong>.
11f0: 20 20 20 3c 65 6d 3e 3f 2d 6c 6f 63 61 6c 3f 20 <em>?-local?
1200: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e channel</em></a>
1210: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 </dt>. <dd>Re
1220: 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e turns the curren
1230: 74 20 73 65 63 75 72 69 74 79 20 73 74 61 74 75 t security statu
1240: 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e s of an SSL chan
1250: 6e 65 6c 2e 20 54 68 65 0a 09 72 65 73 75 6c 74 nel. The..result
1260: 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 is a list of ke
1270: 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 y-value pairs de
1280: 73 63 72 69 62 69 6e 67 20 74 68 65 0a 09 63 6f scribing the..co
1290: 6e 6e 65 63 74 65 64 20 70 65 65 72 2e 20 49 66 nnected peer. If
12a0: 20 74 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 the result is a
12b0: 6e 20 65 6d 70 74 79 20 6c 69 73 74 20 74 68 65 n empty list the
12c0: 6e 20 74 68 65 0a 09 53 53 4c 20 68 61 6e 64 73 n the..SSL hands
12d0: 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 hake has not yet
12e0: 20 63 6f 6d 70 6c 65 74 65 64 2e 0a 09 49 66 20 completed...If
12f0: 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f 65 6d 3e 20 <em>-local</em>
1300: 69 73 20 67 69 76 65 6e 2c 20 74 68 65 6e 20 74 is given, then t
1310: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 he certificate i
1320: 6e 66 6f 72 6d 61 74 69 6f 6e 0a 09 69 73 20 74 nformation..is t
1330: 68 65 20 6f 6e 65 20 75 73 65 64 20 6c 6f 63 61 he one used loca
1340: 6c 6c 79 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a lly.</dd>.</dl>.
1350: 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 .<blockquote>.
1360: 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 <dl>..<dt><str
1370: 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73 74 72 6f ong>issuer</stro
1380: 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c ng> <em>dn</em><
1390: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 64 69 /dt>..<dd>The di
13a0: 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 stinguished name
13b0: 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 (DN) of the cer
13c0: 74 69 66 69 63 61 74 65 0a 09 20 20 20 20 69 73 tificate.. is
13d0: 73 75 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e suer.</dd>..<dt>
13e0: 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 3c <strong>subject<
13f0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c /strong> <em>dn<
1400: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
1410: 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 he distinguished
1420: 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 name (DN) of th
1430: 65 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 e certificate..
1440: 20 20 20 73 75 62 6a 65 63 74 2e 3c 2f 64 64 3e subject.</dd>
1450: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f ..<dt><strong>no
1460: 74 42 65 66 6f 72 65 3c 2f 73 74 72 6f 6e 67 3e tBefore</strong>
1470: 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f <em>date</em></
1480: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 62 65 67 dt>..<dd>The beg
1490: 69 6e 20 64 61 74 65 20 66 6f 72 20 74 68 65 20 in date for the
14a0: 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 65 20 validity of the
14b0: 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 certificate.</dd
14c0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e >..<dt><strong>n
14d0: 6f 74 41 66 74 65 72 3c 2f 73 74 72 6f 6e 67 3e otAfter</strong>
14e0: 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f <em>date</em></
14f0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 65 78 70 dt>..<dd>The exp
1500: 69 72 79 20 64 61 74 65 20 66 6f 72 20 74 68 65 iry date for the
1510: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
1520: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
1530: 73 65 72 69 61 6c 3c 2f 73 74 72 6f 6e 67 3e 20 serial</strong>
1540: 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a <em>n</em></dt>.
1550: 09 3c 64 64 3e 54 68 65 20 73 65 72 69 61 6c 20 .<dd>The serial
1560: 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 number of the ce
1570: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
1580: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 .<dt><strong>cip
1590: 68 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d her</strong> <em
15a0: 3e 63 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 >cipher</em></dt
15b0: 3e 0a 09 3c 64 64 3e 54 68 65 20 63 75 72 72 65 >..<dd>The curre
15c0: 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 nt cipher in use
15d0: 20 62 65 74 77 65 65 6e 20 74 68 65 20 63 6c 69 between the cli
15e0: 65 6e 74 20 61 6e 64 0a 09 20 20 20 20 73 65 72 ent and.. ser
15f0: 76 65 72 20 63 68 61 6e 6e 65 6c 73 2e 3c 2f 64 ver channels.</d
1600: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
1610: 73 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c sbits</strong> <
1620: 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 em>n</em></dt>..
1630: 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f <dd>The number o
1640: 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 f bits used for
1650: 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 2e the session key.
1660: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
1670: 6e 67 3e 63 65 72 74 69 66 69 63 61 74 65 3c 2f ng>certificate</
1680: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 strong> <em>n</e
1690: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
16a0: 20 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 72 PEM encoded cer
16b0: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 tificate.</dd>..
16c0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 73 <dt><strong>vers
16d0: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ion</strong> <em
16e0: 3e 76 61 6c 75 65 3c 2f 65 6d 3e 3c 2f 64 74 3e >value</em></dt>
16f0: 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 ..<dd>The protoc
1700: 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 ol version used
1710: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
1720: 6f 6e 3a 0a 09 20 20 53 53 4c 76 32 2c 20 53 53 on:.. SSLv2, SS
1730: 4c 76 33 2c 20 54 4c 53 76 31 2c 20 54 4c 53 76 Lv3, TLSv1, TLSv
1740: 31 2e 31 2c 20 54 4c 53 76 31 2e 32 2c 20 75 6e 1.1, TLSv1.2, un
1750: 6b 6e 6f 77 6e 3c 2f 64 64 3e 0a 20 20 20 20 3c known</dd>. <
1760: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 /dl>.</blockquot
1770: 65 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 e>..<dl>. <dt
1780: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 ><a name="tls::i
1790: 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 mport"><b>tls::i
17a0: 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69 3e 63 68 61 mport</b> <i>cha
17b0: 6e 6e 65 6c 0a 09 3f 6f 70 74 69 6f 6e 73 3f 3c nnel..?options?<
17c0: 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 /i></a></dt>.
17d0: 20 3c 64 64 3e 53 53 4c 2d 65 6e 61 62 6c 65 20 <dd>SSL-enable
17e0: 61 20 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68 a regular Tcl ch
17f0: 61 6e 6e 65 6c 20 2d 20 69 74 20 6e 65 65 64 20 annel - it need
1800: 6e 6f 74 20 62 65 20 61 0a 09 73 6f 63 6b 65 74 not be a..socket
1810: 2c 20 62 75 74 20 6d 75 73 74 20 70 72 6f 76 69 , but must provi
1820: 64 65 20 62 69 2d 64 69 72 65 63 74 69 6f 6e 61 de bi-directiona
1830: 6c 20 66 6c 6f 77 2e 20 41 6c 73 6f 0a 09 73 65 l flow. Also..se
1840: 74 74 69 6e 67 20 73 65 73 73 69 6f 6e 20 70 61 tting session pa
1850: 72 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c rameters for SSL
1860: 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 64 64 3e handshake.</dd>
1870: 0a 3c 2f 64 6c 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 .</dl>..<blockqu
1880: 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c ote>. <dl>..<
1890: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 64 69 dt><strong>-cadi
18a0: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 r</strong> <em>d
18b0: 69 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ir</em></dt>..<d
18c0: 64 3e 50 72 6f 76 69 64 65 20 74 68 65 20 64 69 d>Provide the di
18d0: 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 rectory containi
18e0: 6e 67 20 74 68 65 20 43 41 20 63 65 72 74 69 66 ng the CA certif
18f0: 69 63 61 74 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 icates.</dd>..<d
1900: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69 6c t><strong>-cafil
1910: 65 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 e </strong><em>f
1920: 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 ilename</em></dt
1930: 3e 0a 09 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 >..<dd>Provide t
1940: 68 65 20 43 41 20 66 69 6c 65 2e 3c 2f 64 64 3e he CA file.</dd>
1950: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 ..<dt><strong>-c
1960: 65 72 74 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e ertfile</strong>
1970: 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 <em>filename</e
1980: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 50 72 6f m></dt>..<dd>Pro
1990: 76 69 64 65 20 74 68 65 20 6e 61 6d 65 20 6f 66 vide the name of
19a0: 20 61 20 66 69 6c 65 20 63 6f 6e 74 61 69 6e 69 a file containi
19b0: 6e 67 20 63 65 72 74 69 66 69 63 61 74 65 20 74 ng certificate t
19c0: 6f 20 75 73 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 o use.</dd>..<dt
19d0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74 3c 2f ><strong>-cert</
19e0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 strong> <em>file
19f0: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 name</em></dt>..
1a00: 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68 65 20 <dd>Provide the
1a10: 63 6f 6e 74 65 6e 74 73 20 6f 66 20 61 20 63 65 contents of a ce
1a20: 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 rtificate to use
1a30: 2c 20 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 , as a DER encod
1a40: 65 64 20 62 69 6e 61 72 79 20 76 61 6c 75 65 20 ed binary value
1a50: 28 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f 64 64 (X.509 DER).</dd
1a60: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1a70: 63 69 70 68 65 72 20 3c 2f 73 74 72 6f 6e 67 3e cipher </strong>
1a80: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c <em>string</em><
1a90: 2f 64 74 3e 0a 09 3c 64 64 3e 50 72 6f 76 69 64 /dt>..<dd>Provid
1aa0: 65 20 74 68 65 20 63 69 70 68 65 72 20 73 75 69 e the cipher sui
1ab0: 74 65 73 20 74 6f 20 75 73 65 2e 20 53 79 6e 74 tes to use. Synt
1ac0: 61 78 20 69 73 20 61 73 20 70 65 72 0a 09 20 20 ax is as per..
1ad0: 20 20 4f 70 65 6e 53 53 4c 2e 3c 2f 64 64 3e 0a OpenSSL.</dd>.
1ae0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f .<dt><strong>-co
1af0: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c mmand</strong> <
1b00: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
1b10: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 49 66 20 73 70 </dt>..<dd>If sp
1b20: 65 63 69 66 69 65 64 2c 20 74 68 69 73 20 63 61 ecified, this ca
1b30: 6c 6c 62 61 63 6b 20 77 69 6c 6c 20 62 65 20 69 llback will be i
1b40: 6e 76 6f 6b 65 64 20 61 74 20 73 65 76 65 72 61 nvoked at severa
1b50: 6c 20 70 6f 69 6e 74 73 0a 09 20 20 20 20 64 75 l points.. du
1b60: 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 53 4c ring the OpenSSL
1b70: 20 68 61 6e 64 73 68 61 6b 65 2e 20 20 49 74 20 handshake. It
1b80: 63 61 6e 20 70 61 73 73 20 65 72 72 6f 72 73 20 can pass errors
1b90: 61 6e 64 20 74 72 61 63 69 6e 67 0a 09 20 20 20 and tracing..
1ba0: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e information, an
1bb0: 64 20 69 74 20 63 61 6e 20 61 6c 6c 6f 77 20 54 d it can allow T
1bc0: 63 6c 20 73 63 72 69 70 74 73 20 74 6f 20 70 65 cl scripts to pe
1bd0: 72 66 6f 72 6d 0a 09 20 20 20 20 74 68 65 69 72 rform.. their
1be0: 20 6f 77 6e 20 76 61 6c 69 64 61 74 69 6f 6e 20 own validation
1bf0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
1c00: 74 65 20 69 6e 20 70 6c 61 63 65 20 6f 66 20 74 te in place of t
1c10: 68 65 0a 09 20 20 20 20 64 65 66 61 75 6c 74 20 he.. default
1c20: 76 61 6c 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 validation provi
1c30: 64 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 2e 0a ded by OpenSSL..
1c40: 09 20 20 20 20 3c 62 72 3e 0a 09 20 20 20 20 53 . <br>.. S
1c50: 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c ee <a href="#CAL
1c60: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 LBACK OPTIONS">C
1c70: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c ALLBACK OPTIONS<
1c80: 2f 61 3e 20 66 6f 72 0a 09 20 20 20 20 66 75 72 /a> for.. fur
1c90: 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e ther discussion.
1ca0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
1cb0: 6e 67 3e 2d 64 68 70 61 72 61 6d 73 20 3c 2f 73 ng>-dhparams </s
1cc0: 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 trong><em>filena
1cd0: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 me</em></dt>..<d
1ce0: 64 3e 50 72 6f 76 69 64 65 20 61 20 44 69 66 66 d>Provide a Diff
1cf0: 69 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 6d ie-Hellman param
1d00: 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 3e eters file.</dd>
1d10: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b ..<dt><strong>-k
1d20: 65 79 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 eyfile</strong>
1d30: 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d <em>filename</em
1d40: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 50 72 6f 76 ></dt>..<dd>Prov
1d50: 69 64 65 20 74 68 65 20 70 72 69 76 61 74 65 20 ide the private
1d60: 6b 65 79 20 66 69 6c 65 2e 20 28 64 65 66 61 75 key file. (defau
1d70: 6c 74 20 69 73 0a 09 20 20 20 20 76 61 6c 75 65 lt is.. value
1d80: 20 6f 66 20 2d 63 65 72 74 66 69 6c 65 29 3c 2f of -certfile)</
1d90: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
1da0: 3e 2d 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c >-key</strong> <
1db0: 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e em>filename</em>
1dc0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 50 72 6f 76 69 </dt>..<dd>Provi
1dd0: 64 65 20 74 68 65 20 70 72 69 76 61 74 65 20 6b de the private k
1de0: 65 79 20 74 6f 20 75 73 65 20 61 73 20 61 20 44 ey to use as a D
1df0: 45 52 20 65 6e 63 6f 64 65 64 20 76 61 6c 75 65 ER encoded value
1e00: 20 28 50 4b 43 53 23 31 20 44 45 52 29 3c 2f 64 (PKCS#1 DER)</d
1e10: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
1e20: 2d 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 -model</strong>
1e30: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e <em>channel</em>
1e40: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 69 73 20 </dt>..<dd>This
1e50: 77 69 6c 6c 20 66 6f 72 63 65 20 74 68 69 73 20 will force this
1e60: 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68 61 72 65 channel to share
1e70: 20 74 68 65 20 73 61 6d 65 20 3c 65 6d 3e 3c 73 the same <em><s
1e80: 74 72 6f 6e 67 3e 53 53 4c 5f 43 54 58 3c 2f 73 trong>SSL_CTX</s
1e90: 74 72 6f 6e 67 3e 3c 2f 65 6d 3e 0a 09 20 20 20 trong></em>..
1ea0: 20 73 74 72 75 63 74 75 72 65 20 61 73 20 74 68 structure as th
1eb0: 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e e specified <em>
1ec0: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 6e channel</em>, an
1ed0: 64 0a 09 20 20 20 20 74 68 65 72 65 66 6f 72 65 d.. therefore
1ee0: 20 73 68 61 72 65 20 63 61 6c 6c 62 61 63 6b 73 share callbacks
1ef0: 20 65 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e etc.</dd>..<dt>
1f00: 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 <strong>-passwor
1f10: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 d</strong> <em>c
1f20: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 allback</em></dt
1f30: 3e 0a 09 3c 64 64 3e 49 66 20 73 75 70 70 6c 69 >..<dd>If suppli
1f40: 65 64 2c 20 74 68 69 73 20 63 61 6c 6c 62 61 63 ed, this callbac
1f50: 6b 20 77 69 6c 6c 20 62 65 20 69 6e 76 6f 6b 65 k will be invoke
1f60: 64 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e d when OpenSSL n
1f70: 65 65 64 73 0a 09 20 20 20 20 74 6f 20 6f 62 74 eeds.. to obt
1f80: 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2c 20 ain a password,
1f90: 74 79 70 69 63 61 6c 6c 79 20 74 6f 20 75 6e 6c typically to unl
1fa0: 6f 63 6b 20 74 68 65 20 70 72 69 76 61 74 65 20 ock the private
1fb0: 6b 65 79 20 6f 66 0a 09 20 20 20 20 61 20 63 65 key of.. a ce
1fc0: 72 74 69 66 69 63 61 74 65 2e 0a 09 20 20 20 20 rtificate...
1fd0: 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f The callback sho
1fe0: 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73 74 72 uld return a str
1ff0: 69 6e 67 20 77 68 69 63 68 20 72 65 70 72 65 73 ing which repres
2000: 65 6e 74 73 20 74 68 65 0a 09 20 20 20 20 70 61 ents the.. pa
2010: 73 73 77 6f 72 64 20 74 6f 20 62 65 20 75 73 65 ssword to be use
2020: 64 2e 0a 09 20 20 20 20 3c 62 72 3e 0a 09 20 20 d... <br>..
2030: 20 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23 See <a href="#
2040: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
2050: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f ">CALLBACK OPTIO
2060: 4e 53 3c 2f 61 3e 20 66 6f 72 0a 09 20 20 20 20 NS</a> for..
2070: 66 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69 further discussi
2080: 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 on.</dd>..<dt><s
2090: 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 20 3c trong>-request <
20a0: 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c /strong><em>bool
20b0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
20c0: 52 65 71 75 65 73 74 20 61 20 63 65 72 74 69 66 Request a certif
20d0: 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 icate from peer
20e0: 64 75 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 during SSL hands
20f0: 68 61 6b 65 2e 0a 09 20 20 20 20 28 64 65 66 61 hake... (defa
2100: 75 6c 74 20 69 73 20 20 3c 65 6d 3e 74 72 75 65 ult is <em>true
2110: 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 </em>)</dd>..<dt
2120: 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 69 72 ><strong>-requir
2130: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 e</strong> <em>b
2140: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ool</em></dt>..<
2150: 64 64 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c dd>Require a val
2160: 69 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66 id certificate f
2170: 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67 20 rom peer during
2180: 53 53 4c 0a 09 20 20 20 20 68 61 6e 64 73 68 61 SSL.. handsha
2190: 6b 65 2e 20 49 66 20 74 68 69 73 20 69 73 20 73 ke. If this is s
21a0: 65 74 20 74 6f 20 74 72 75 65 20 74 68 65 6e 20 et to true then
21b0: 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 <strong>-request
21c0: 3c 2f 73 74 72 6f 6e 67 3e 0a 09 20 20 20 20 6d </strong>.. m
21d0: 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20 ust also be set
21e0: 74 6f 20 74 72 75 65 2e 20 28 64 65 66 61 75 6c to true. (defaul
21f0: 74 20 69 73 20 20 3c 65 6d 3e 66 61 6c 73 65 3c t is <em>false<
2200: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e /em>)</dd>..<dt>
2210: 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 65 72 3c <strong>-server<
2220: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
2230: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 l</em></dt>..<dd
2240: 3e 48 61 6e 64 73 68 61 6b 65 20 61 73 20 73 65 >Handshake as se
2250: 72 76 65 72 20 69 66 20 74 72 75 65 2c 20 65 6c rver if true, el
2260: 73 65 20 68 61 6e 64 73 68 61 6b 65 20 61 73 0a se handshake as.
2270: 09 20 20 20 20 63 6c 69 65 6e 74 2e 28 64 65 66 . client.(def
2280: 61 75 6c 74 20 69 73 20 20 3c 65 6d 3e 66 61 6c ault is <em>fal
2290: 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c se</em>)</dd>..<
22a0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 dt><strong>-serv
22b0: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 ername</strong>
22c0: 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c 2f 64 <em>host</em></d
22d0: 74 3e 0a 09 3c 64 64 3e 4f 6e 6c 79 20 61 76 61 t>..<dd>Only ava
22e0: 69 6c 61 62 6c 65 20 69 66 20 74 68 65 20 4f 70 ilable if the Op
22f0: 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 74 68 enSSL library th
2300: 65 20 70 61 63 6b 61 67 65 20 69 73 20 6c 69 6e e package is lin
2310: 6b 65 64 0a 09 20 20 20 20 61 67 61 69 6e 73 74 ked.. against
2320: 20 73 75 70 70 6f 72 74 73 20 74 68 65 20 54 4c supports the TL
2330: 53 20 68 6f 73 74 6e 61 6d 65 20 65 78 74 65 6e S hostname exten
2340: 73 69 6f 6e 20 66 6f 72 20 27 53 65 72 76 65 72 sion for 'Server
2350: 20 4e 61 6d 65 0a 09 20 20 20 20 49 6e 64 69 63 Name.. Indic
2360: 61 74 69 6f 6e 27 20 28 53 4e 49 29 2e 20 55 73 ation' (SNI). Us
2370: 65 20 74 6f 20 6e 61 6d 65 20 74 68 65 20 6c 6f e to name the lo
2380: 67 69 63 61 6c 20 68 6f 73 74 20 77 65 20 61 72 gical host we ar
2390: 65 20 74 61 6c 6b 69 6e 67 0a 09 20 20 20 20 74 e talking.. t
23a0: 6f 20 61 6e 64 20 65 78 70 65 63 74 69 6e 67 20 o and expecting
23b0: 61 20 63 65 72 74 69 66 69 63 61 74 65 20 66 6f a certificate fo
23c0: 72 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 r</dd>..<dt><str
23d0: 6f 6e 67 3e 2d 73 73 6c 32 3c 2f 73 74 72 6f 6e ong>-ssl2</stron
23e0: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e g> <em>bool</em>
23f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c </dt>..<dd>Enabl
2400: 65 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32 2e e use of SSL v2.
2410: 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d (default is <em
2420: 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 >false</em>)</dd
2430: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
2440: 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 ssl3 </strong><e
2450: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e m>bool</em></dt>
2460: 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 ..<dd>Enable use
2470: 20 6f 66 20 53 53 4c 20 76 33 2e 20 28 64 65 66 of SSL v3. (def
2480: 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 ault is <em>fals
2490: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 e</em>)</dd>..<d
24a0: 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 3c t>-<strong>tls1<
24b0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
24c0: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 l</em></dt>..<dd
24d0: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 >Enable use of T
24e0: 4c 53 20 76 31 2e 20 28 64 65 66 61 75 6c 74 20 LS v1. (default
24f0: 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e is <em>true</em>
2500: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 )</dd>..<dt>-<st
2510: 72 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73 74 72 rong>tls1.1</str
2520: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 ong> <em>bool</e
2530: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 m></dt>..<dd>Ena
2540: 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 ble use of TLS v
2550: 31 2e 31 20 28 64 65 66 61 75 6c 74 20 69 73 20 1.1 (default is
2560: 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f <em>true</em>)</
2570: 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e dd>..<dt>-<stron
2580: 67 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67 g>tls1.2</strong
2590: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c > <em>bool</em><
25a0: 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 /dt>..<dd>Enable
25b0: 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 use of TLS v1.2
25c0: 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d (default is <em
25d0: 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e >true</em>)</dd>
25e0: 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 ..<dt>-<strong>t
25f0: 6c 73 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e 20 3c ls1.3</strong> <
2600: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 em>bool</em></dt
2610: 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 >..<dd>Enable us
2620: 65 20 6f 66 20 54 4c 53 20 76 31 2e 33 20 28 64 e of TLS v1.3 (d
2630: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 efault is <em>tr
2640: 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 ue</em>)</dd>.
2650: 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 </dl>.</blockq
2660: 75 6f 74 65 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 uote>..<dl>.
2670: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
2680: 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 ::unimport"><b>t
2690: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e ls::unimport</b>
26a0: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c <i>channel</i><
26b0: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
26c0: 3e 50 72 6f 76 69 64 65 64 20 66 6f 72 20 73 79 >Provided for sy
26d0: 6d 6d 65 74 72 79 20 74 6f 20 3c 73 74 72 6f 6e mmetry to <stron
26e0: 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 g>tls::import</s
26f0: 74 72 6f 6e 67 3e 2c 20 74 68 69 73 0a 20 20 20 trong>, this.
2700: 20 20 20 75 6e 73 74 61 63 6b 73 20 74 68 65 20 unstacks the
2710: 53 53 4c 2d 65 6e 61 62 6c 69 6e 67 20 6f 66 20 SSL-enabling of
2720: 61 20 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68 a regular Tcl ch
2730: 61 6e 6e 65 6c 2e 20 20 41 6e 20 65 72 72 6f 72 annel. An error
2740: 0a 20 20 20 20 20 20 69 73 20 74 68 72 6f 77 6e . is thrown
2750: 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74 20 74 if TLS is not t
2760: 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64 20 63 he top stacked c
2770: 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 64 hannel type.</dd
2780: 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 64 6c 3e 0a 20 20 >.</dl>..<dl>.
2790: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
27a0: 6c 73 3a 3a 63 69 70 68 65 72 73 20 70 72 6f 74 ls::ciphers prot
27b0: 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 22 3e ocol ?verbose?">
27c0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 <strong>tls::cip
27d0: 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 0a 09 3c hers</strong>..<
27e0: 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 em>protocol ?ver
27f0: 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f bose?</em></a></
2800: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 dt>. <dd>Retu
2810: 72 6e 73 20 6c 69 73 74 20 6f 66 20 73 75 70 70 rns list of supp
2820: 6f 72 74 65 64 20 63 69 70 68 65 72 73 20 62 61 orted ciphers ba
2830: 73 65 64 20 6f 6e 20 74 68 65 20 3c 65 6d 3e 70 sed on the <em>p
2840: 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 0a 09 79 6f rotocol</em>..yo
2850: 75 20 73 75 70 70 6c 79 2c 20 77 68 69 63 68 20 u supply, which
2860: 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 3c must be one of <
2870: 65 6d 3e 73 73 6c 32 2c 20 73 73 6c 33 2c 20 6f em>ssl2, ssl3, o
2880: 72 20 74 6c 73 31 3c 2f 65 6d 3e 2e 0a 09 49 66 r tls1</em>...If
2890: 20 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 6d <em>verbose</em
28a0: 3e 20 69 73 20 73 70 65 63 69 66 69 65 64 20 61 > is specified a
28b0: 73 20 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 s true then a ve
28c0: 72 62 6f 73 65 2c 0a 09 73 65 6d 69 2d 68 75 6d rbose,..semi-hum
28d0: 61 6e 20 72 65 61 64 61 62 6c 65 20 6c 69 73 74 an readable list
28e0: 20 69 73 20 72 65 74 75 72 6e 65 64 20 70 72 6f is returned pro
28f0: 76 69 64 69 6e 67 20 61 64 64 69 74 69 6f 6e 61 viding additiona
2900: 6c 0a 09 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f l..information o
2910: 6e 20 74 68 65 20 6e 61 74 75 72 65 20 6f 66 20 n the nature of
2920: 74 68 65 20 63 69 70 68 65 72 20 73 75 70 70 6f the cipher suppo
2930: 72 74 2e 20 49 6e 20 65 61 63 68 0a 09 63 61 73 rt. In each..cas
2940: 65 20 74 68 65 20 72 65 73 75 6c 74 20 69 73 20 e the result is
2950: 61 20 54 63 6c 20 6c 69 73 74 2e 3c 2f 64 64 3e a Tcl list.</dd>
2960: 0a 3c 2f 64 6c 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 .</dl>..<dl>.
2970: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
2980: 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 73 74 72 s::version"><str
2990: 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e ong>tls::version
29a0: 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 </strong></a></d
29b0: 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 t>. <dd>Retur
29c0: 6e 73 20 74 68 65 20 76 65 72 73 69 6f 6e 20 73 ns the version s
29d0: 74 72 69 6e 67 20 64 65 66 69 6e 65 64 20 62 79 tring defined by
29e0: 20 4f 70 65 6e 53 53 4c 2e 3c 2f 64 64 3e 0a 3c OpenSSL.</dd>.<
29f0: 2f 64 6c 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d /dl>..<h3><a nam
2a00: 65 3d 22 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 e="CALLBACK OPTI
2a10: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 ONS">CALLBACK OP
2a20: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a TIONS</a></h3>..
2a30: 3c 70 3e 0a 41 73 20 69 6e 64 69 63 61 74 65 64 <p>.As indicated
2a40: 20 61 62 6f 76 65 2c 20 69 6e 64 69 76 69 64 75 above, individu
2a50: 61 6c 20 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20 al channels can
2a60: 62 65 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f be given their o
2a70: 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 wn callbacks.to
2a80: 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 handle intermedi
2a90: 61 74 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62 ate processing b
2aa0: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 y the OpenSSL li
2ab0: 62 72 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65 brary, using the
2ac0: 0a 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 .<em>-command</e
2ad0: 6d 3e 20 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 73 m> and <em>-pass
2ae0: 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e word</em> option
2af0: 73 20 70 61 73 73 65 64 20 74 6f 20 65 69 74 68 s passed to eith
2b00: 65 72 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74 6c er of.<strong>tl
2b10: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e s::socket</stron
2b20: 67 3e 20 6f 72 20 3c 73 74 72 6f 6e 67 3e 74 6c g> or <strong>tl
2b30: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e s::import</stron
2b40: 67 3e 2e 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b g>..</p>..<block
2b50: 71 75 6f 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 quote>.<dl>..
2b60: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f <dt><strong>-co
2b70: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c mmand</strong> <
2b80: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
2b90: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 </dt>. <dd>..
2ba0: 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 Invokes the spec
2bb0: 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 ified <em>callba
2bc0: 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 61 ck</em> script a
2bd0: 74 0a 09 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 t..several point
2be0: 73 20 64 75 72 69 6e 67 20 74 68 65 20 4f 70 65 s during the Ope
2bf0: 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a nSSL handshake..
2c00: 09 45 78 63 65 70 74 20 61 73 20 69 6e 64 69 63 .Except as indic
2c10: 61 74 65 64 20 62 65 6c 6f 77 2c 20 76 61 6c 75 ated below, valu
2c20: 65 73 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d es returned from
2c30: 20 74 68 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61 the..callback a
2c40: 72 65 20 69 67 6e 6f 72 65 64 2e 0a 09 41 72 67 re ignored...Arg
2c50: 75 6d 65 6e 74 73 20 61 70 70 65 6e 64 65 64 20 uments appended
2c60: 74 6f 20 74 68 65 20 73 63 72 69 70 74 20 75 70 to the script up
2c70: 6f 6e 20 63 61 6c 6c 62 61 63 6b 20 74 61 6b 65 on callback take
2c80: 20 6f 6e 65 20 6f 66 20 74 68 65 0a 09 66 6f 6c one of the..fol
2c90: 6c 6f 77 69 6e 67 20 66 6f 72 6d 73 3a 0a 0a 09 lowing forms:...
2ca0: 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c <br>..<br>...<dl
2cb0: 3e 0a 0a 3c 21 2d 2d 09 54 68 69 73 20 66 6f 72 >..<!--.This for
2cc0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
2cd0: 20 64 69 73 61 62 6c 65 64 2e 0a 0a 09 3c 64 74 disabled....<dt
2ce0: 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 65 72 72 >.. <strong>err
2cf0: 6f 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e or</strong> <em>
2d00: 63 68 61 6e 6e 65 6c 20 6d 65 73 73 61 67 65 3c channel message<
2d10: 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 /em>..</dt>..<dd
2d20: 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 >.. The <em>mes
2d30: 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 sage</em> argume
2d40: 6e 74 20 63 6f 6e 74 61 69 6e 73 20 61 6e 20 65 nt contains an e
2d50: 72 72 6f 72 20 6d 65 73 73 61 67 65 20 67 65 6e rror message gen
2d60: 65 72 61 74 65 64 0a 09 20 20 62 79 20 74 68 65 erated.. by the
2d70: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f OpenSSL functio
2d80: 6e 0a 09 20 20 3c 63 6f 64 65 3e 45 52 52 5f 72 n.. <code>ERR_r
2d90: 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 eason_error_stri
2da0: 6e 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f ng()</code>...</
2db0: 64 64 3e 0a 0a 09 3c 62 72 3e 0a 2d 2d 3e 0a 0a dd>...<br>.-->..
2dc0: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 .<dt>.. <strong
2dd0: 3e 69 6e 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c >info</strong> <
2de0: 65 6d 3e 63 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 em>channel major
2df0: 20 6d 69 6e 6f 72 20 6d 65 73 73 61 67 65 3c 2f minor message</
2e00: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e em>..</dt>..<dd>
2e10: 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 .. This form of
2e20: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
2e30: 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e oked by the Open
2e40: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 SSL function..
2e50: 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 <code>SSL_CTX_se
2e60: 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 t_info_callback(
2e70: 29 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 )</code>... <br
2e80: 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d 61 6a >.. The <em>maj
2e90: 6f 72 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e or</em> and <em>
2ea0: 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d minor</em> argum
2eb0: 65 6e 74 73 20 61 72 65 20 75 73 65 64 20 74 6f ents are used to
2ec0: 0a 09 20 20 72 65 70 72 65 73 65 6e 74 20 74 68 .. represent th
2ed0: 65 20 73 74 61 74 65 20 69 6e 66 6f 72 6d 61 74 e state informat
2ee0: 69 6f 6e 20 62 69 74 6d 61 73 6b 2e 0a 09 20 20 ion bitmask...
2ef0: 3c 64 6c 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 <dl>.. <dt>Poss
2f00: 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 ible values for
2f10: 3c 65 6d 3e 6d 61 6a 6f 72 3c 2f 65 6d 3e 20 61 <em>major</em> a
2f20: 72 65 3a 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e re:</dt>.. <dd>
2f30: 3c 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c <code>handshake,
2f40: 20 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c alert, connect,
2f50: 20 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c accept</code>.<
2f60: 2f 64 64 3e 0a 09 20 20 3c 64 74 3e 50 6f 73 73 /dd>.. <dt>Poss
2f70: 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 ible values for
2f80: 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 <em>minor</em> a
2f90: 72 65 3a 3c 2f 64 74 3e 0a 09 20 20 3c 64 64 3e re:</dt>.. <dd>
2fa0: 3c 63 6f 64 65 3e 73 74 61 72 74 2c 20 64 6f 6e <code>start, don
2fb0: 65 2c 20 72 65 61 64 2c 20 77 72 69 74 65 2c 20 e, read, write,
2fc0: 6c 6f 6f 70 2c 20 65 78 69 74 3c 2f 63 6f 64 65 loop, exit</code
2fd0: 3e 2e 3c 2f 64 64 3e 0a 09 20 20 3c 2f 64 6c 3e >.</dd>.. </dl>
2fe0: 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 .. The <em>mess
2ff0: 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e age</em> argumen
3000: 74 20 69 73 20 61 20 64 65 73 63 72 69 70 74 69 t is a descripti
3010: 76 65 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 ve string which
3020: 6d 61 79 0a 09 20 20 62 65 20 67 65 6e 65 72 61 may.. be genera
3030: 74 65 64 20 65 69 74 68 65 72 20 62 79 0a 09 20 ted either by..
3040: 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 <code>SSL_state
3050: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f _string_long()</
3060: 63 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c code> or by.. <
3070: 63 6f 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 code>SSL_alert_d
3080: 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 esc_string_long(
3090: 29 3c 2f 63 6f 64 65 3e 2c 0a 09 20 20 64 65 70 )</code>,.. dep
30a0: 65 6e 64 69 6e 67 20 6f 6e 20 63 6f 6e 74 65 78 ending on contex
30b0: 74 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e t...</dd>...<br>
30c0: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f ...<dt>.. <stro
30d0: 6e 67 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e ng>verify</stron
30e0: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 g> <em>channel d
30f0: 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73 epth cert status
3100: 20 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 error</em>..</d
3110: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 t>..<dd>.. This
3120: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 form of callbac
3130: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 k is invoked by
3140: 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 the OpenSSL func
3150: 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 tion.. <code>SS
3160: 4c 5f 73 65 74 5f 76 65 72 69 66 79 28 29 3c 2f L_set_verify()</
3170: 63 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 code>... <br>..
3180: 20 20 54 68 65 20 3c 65 6d 3e 64 65 70 74 68 3c The <em>depth<
3190: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 /em> argument is
31a0: 20 61 6e 20 69 6e 74 65 67 65 72 20 72 65 70 72 an integer repr
31b0: 65 73 65 6e 74 69 6e 67 20 74 68 65 0a 09 20 20 esenting the..
31c0: 63 75 72 72 65 6e 74 20 64 65 70 74 68 20 6f 6e current depth on
31d0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
31e0: 20 63 68 61 69 6e 2c 20 77 69 74 68 0a 09 20 20 chain, with..
31f0: 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 61 <code>0</code> a
3200: 73 20 74 68 65 20 73 75 62 6a 65 63 74 20 63 65 s the subject ce
3210: 72 74 69 66 69 63 61 74 65 20 61 6e 64 20 68 69 rtificate and hi
3220: 67 68 65 72 20 76 61 6c 75 65 73 0a 09 20 20 64 gher values.. d
3230: 65 6e 6f 74 69 6e 67 20 70 72 6f 67 72 65 73 73 enoting progress
3240: 69 76 65 6c 79 20 6d 6f 72 65 20 69 6e 64 69 72 ively more indir
3250: 65 63 74 20 69 73 73 75 65 72 20 63 65 72 74 69 ect issuer certi
3260: 66 69 63 61 74 65 73 2e 0a 09 20 20 3c 62 72 3e ficates... <br>
3270: 0a 09 20 20 54 68 65 20 3c 65 6d 3e 63 65 72 74 .. The <em>cert
3280: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 </em> argument i
3290: 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d s a list of key-
32a0: 76 61 6c 75 65 20 70 61 69 72 73 20 73 69 6d 69 value pairs simi
32b0: 6c 61 72 0a 09 20 20 74 6f 20 74 68 6f 73 65 20 lar.. to those
32c0: 72 65 74 75 72 6e 65 64 20 62 79 0a 09 20 20 3c returned by.. <
32d0: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 a href="#tls::st
32e0: 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c atus"><strong>tl
32f0: 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e s::status</stron
3300: 67 3e 3c 2f 61 3e 2e 0a 09 20 20 3c 62 72 3e 0a g></a>... <br>.
3310: 09 20 20 54 68 65 20 3c 65 6d 3e 73 74 61 74 75 . The <em>statu
3320: 73 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 s</em> argument
3330: 69 73 20 61 6e 20 69 6e 74 65 67 65 72 20 72 65 is an integer re
3340: 70 72 65 73 65 6e 74 69 6e 67 20 74 68 65 0a 09 presenting the..
3350: 20 20 63 75 72 72 65 6e 74 20 76 61 6c 69 64 69 current validi
3360: 74 79 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 ty of the certif
3370: 69 63 61 74 65 2e 0a 09 20 20 41 20 76 61 6c 75 icate... A valu
3380: 65 20 6f 66 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f e of <code>0</co
3390: 64 65 3e 20 6d 65 61 6e 73 20 74 68 65 20 63 65 de> means the ce
33a0: 72 74 69 66 69 63 61 74 65 20 69 73 20 64 65 65 rtificate is dee
33b0: 6d 65 64 20 69 6e 76 61 6c 69 64 2e 0a 09 20 20 med invalid...
33c0: 41 20 76 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 A value of <code
33d0: 3e 31 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 >1</code> means
33e0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
33f0: 69 73 20 64 65 65 6d 65 64 20 76 61 6c 69 64 2e is deemed valid.
3400: 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 .. <br>.. The
3410: 3c 65 6d 3e 65 72 72 6f 72 3c 2f 65 6d 3e 20 61 <em>error</em> a
3420: 72 67 75 6d 65 6e 74 20 73 75 70 70 6c 69 65 73 rgument supplies
3430: 20 74 68 65 20 6d 65 73 73 61 67 65 2c 20 69 66 the message, if
3440: 20 61 6e 79 2c 20 67 65 6e 65 72 61 74 65 64 0a any, generated.
3450: 09 20 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e 58 . by.. <code>X
3460: 35 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65 509_STORE_CTX_ge
3470: 74 5f 65 72 72 6f 72 28 29 3c 2f 63 6f 64 65 3e t_error()</code>
3480: 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 3c 62 72 ... <br>.. <br
3490: 3e 0a 09 20 20 54 68 65 20 63 61 6c 6c 62 61 63 >.. The callbac
34a0: 6b 20 6d 61 79 20 6f 76 65 72 72 69 64 65 20 6e k may override n
34b0: 6f 72 6d 61 6c 20 76 61 6c 69 64 61 74 69 6f 6e ormal validation
34c0: 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 65 processing by e
34d0: 78 70 6c 69 63 69 74 6c 79 0a 09 20 20 72 65 74 xplicitly.. ret
34e0: 75 72 6e 69 6e 67 20 6f 6e 65 20 6f 66 20 74 68 urning one of th
34f0: 65 20 61 62 6f 76 65 20 3c 65 6d 3e 73 74 61 74 e above <em>stat
3500: 75 73 3c 2f 65 6d 3e 20 76 61 6c 75 65 73 2e 0a us</em> values..
3510: 09 3c 2f 64 64 3e 0a 0a 09 3c 2f 64 6c 3e 0a 20 .</dd>...</dl>.
3520: 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 </dd>.. <b
3530: 72 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 r>.. <dt><str
3540: 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 ong>-password</s
3550: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 trong> <em>callb
3560: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ack</em></dt>.
3570: 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 <dd>..Invokes
3580: 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 the specified <e
3590: 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 m>callback</em>
35a0: 73 63 72 69 70 74 20 77 68 65 6e 20 4f 70 65 6e script when Open
35b0: 53 53 4c 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62 SSL needs to..ob
35c0: 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e tain a password.
35d0: 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 The callback s
35e0: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73 hould return a s
35f0: 74 72 69 6e 67 20 77 68 69 63 68 0a 09 72 65 70 tring which..rep
3600: 72 65 73 65 6e 74 73 20 74 68 65 20 70 61 73 73 resents the pass
3610: 77 6f 72 64 20 74 6f 20 62 65 20 75 73 65 64 2e word to be used.
3620: 0a 09 4e 6f 20 61 72 67 75 6d 65 6e 74 73 20 61 ..No arguments a
3630: 72 65 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74 re appended to t
3640: 68 65 20 73 63 72 69 70 74 20 75 70 6f 6e 20 63 he script upon c
3650: 61 6c 6c 62 61 63 6b 2e 0a 20 20 20 20 3c 2f 64 allback.. </d
3660: 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b d>.</dl>.</block
3670: 71 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 quote>..<p>.Refe
3680: 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 rence implementa
3690: 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 tions of these c
36a0: 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f allbacks are pro
36b0: 76 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69 73 vided in the.dis
36c0: 74 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 74 tribution as <st
36d0: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 rong>tls::callba
36e0: 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 0a ck</strong> and.
36f0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 <strong>tls::pas
3700: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 72 sword</strong> r
3710: 65 73 70 65 63 74 69 76 65 6c 79 2e 20 20 4e 6f espectively. No
3720: 74 65 20 74 68 61 74 20 74 68 65 73 65 20 61 72 te that these ar
3730: 65 0a 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d e.<em>sample</em
3740: 3e 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e > implementation
3750: 73 20 6f 6e 6c 79 2e 20 20 49 6e 20 61 20 6d 6f s only. In a mo
3760: 72 65 20 72 65 61 6c 69 73 74 69 63 20 64 65 70 re realistic dep
3770: 6c 6f 79 6d 65 6e 74 0a 79 6f 75 20 77 6f 75 6c loyment.you woul
3780: 64 20 73 70 65 63 69 66 79 20 79 6f 75 72 20 6f d specify your o
3790: 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 wn callback scri
37a0: 70 74 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 20 pts on each TLS
37b0: 63 68 61 6e 6e 65 6c 0a 75 73 69 6e 67 20 74 68 channel.using th
37c0: 65 20 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f e <em>-command</
37d0: 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 em> and <em>-pas
37e0: 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f sword</em> optio
37f0: 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 ns..</p>..<p>.Th
3800: 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 e default behavi
3810: 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 65 6d 3e or when the <em>
3820: 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 6f 70 -command</em> op
3830: 74 69 6f 6e 20 69 73 20 6e 6f 74 20 73 70 65 63 tion is not spec
3840: 69 66 69 65 64 20 69 73 20 66 6f 72 0a 54 4c 53 ified is for.TLS
3850: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 to process the
3860: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 associated libra
3870: 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74 ry callbacks int
3880: 65 72 6e 61 6c 6c 79 2e 0a 54 68 65 20 64 65 66 ernally..The def
3890: 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 ault behavior wh
38a0: 65 6e 20 74 68 65 20 3c 65 6d 3e 2d 70 61 73 73 en the <em>-pass
38b0: 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e word</em> option
38c0: 20 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 is not specifie
38d0: 64 20 69 73 20 66 6f 72 0a 54 4c 53 20 74 6f 20 d is for.TLS to
38e0: 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f process the asso
38f0: 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 ciated library c
3900: 61 6c 6c 62 61 63 6b 73 20 62 79 20 61 74 74 65 allbacks by atte
3910: 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c 0a 3c mpting to call.<
3920: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 strong>tls::pass
3930: 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 54 word</strong>..T
3940: 68 65 20 64 69 66 66 65 72 65 6e 63 65 20 62 65 he difference be
3950: 74 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f 20 tween these two
3960: 62 65 68 61 76 69 6f 72 73 20 69 73 20 61 20 63 behaviors is a c
3970: 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 6d 61 onsequence of ma
3980: 69 6e 74 61 69 6e 69 6e 67 0a 63 6f 6d 70 61 74 intaining.compat
3990: 69 62 69 6c 69 74 79 20 77 69 74 68 20 65 61 72 ibility with ear
39a0: 6c 69 65 72 20 69 6d 70 6c 65 6d 65 6e 74 61 74 lier implementat
39b0: 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a ions..</p>..<p>.
39c0: 54 68 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a The <strong>tls:
39d0: 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 :debug</strong>
39e0: 76 61 72 69 61 62 6c 65 20 70 72 6f 76 69 64 65 variable provide
39f0: 73 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 s some additiona
3a00: 6c 0a 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 l.control over t
3a10: 68 65 73 65 20 72 65 66 65 72 65 6e 63 65 20 63 hese reference c
3a20: 61 6c 6c 62 61 63 6b 73 2e 20 20 49 74 73 20 76 allbacks. Its v
3a30: 61 6c 75 65 20 69 73 20 7a 65 72 6f 20 62 79 20 alue is zero by
3a40: 64 65 66 61 75 6c 74 2e 0a 48 69 67 68 65 72 20 default..Higher
3a50: 76 61 6c 75 65 73 20 70 72 6f 64 75 63 65 20 6d values produce m
3a60: 6f 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f ore diagnostic o
3a70: 75 74 70 75 74 2c 20 61 6e 64 20 77 69 6c 6c 20 utput, and will
3a80: 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 0a 76 also force the.v
3a90: 65 72 69 66 79 20 6d 65 74 68 6f 64 20 69 6e 20 erify method in
3aa0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c <strong>tls::cal
3ab0: 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 74 lback</strong> t
3ac0: 6f 20 61 63 63 65 70 74 20 74 68 65 0a 63 65 72 o accept the.cer
3ad0: 74 69 66 69 63 61 74 65 2c 20 65 76 65 6e 20 77 tificate, even w
3ae0: 68 65 6e 20 69 74 20 69 73 20 69 6e 76 61 6c 69 hen it is invali
3af0: 64 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d d..</p>..<p>.<em
3b00: 3e 0a 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 >.The use of the
3b10: 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 reference callb
3b20: 61 63 6b 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 acks <strong>tls
3b30: 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f ::callback</stro
3b40: 6e 67 3e 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e ng> and.<strong>
3b50: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 tls::password</s
3b60: 74 72 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65 trong> is not re
3b70: 63 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 79 commended. They
3b80: 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 0a may be removed.
3b90: 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 from future rele
3ba0: 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e ases..</em>.</p>
3bb0: 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 ..<p>.<em>.The u
3bc0: 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 se of the variab
3bd0: 6c 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a le <strong>tls::
3be0: 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 debug</strong> i
3bf0: 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 s not recommende
3c00: 64 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d d..It may be rem
3c10: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 oved from future
3c20: 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e releases..</em>
3c30: 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 .</p>..<h3><a na
3c40: 6d 65 3d 22 48 54 54 50 53 20 45 58 41 4d 50 4c me="HTTPS EXAMPL
3c50: 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c 45 E">HTTPS EXAMPLE
3c60: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 </a></h3>..<p>Th
3c70: 69 73 20 65 78 61 6d 70 6c 65 20 75 73 65 73 20 is example uses
3c80: 61 20 73 61 6d 70 6c 65 20 73 65 72 76 65 72 2e a sample server.
3c90: 70 65 6d 20 70 72 6f 76 69 64 65 64 20 77 69 74 pem provided wit
3ca0: 68 20 74 68 65 20 54 4c 53 20 72 65 6c 65 61 73 h the TLS releas
3cb0: 65 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 20 74 e,.courtesy of t
3cc0: 68 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 he <strong>OpenS
3cd0: 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 6f 6a SL</strong> proj
3ce0: 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e 3c ect.</p>..<pre><
3cf0: 63 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 code>.package re
3d00: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 quire http.packa
3d10: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a ge require tls..
3d20: 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 http::register h
3d30: 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a ttps 443 [list :
3d40: 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 :tls::socket -au
3d50: 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 72 75 toservername tru
3d60: 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 65 20 e -require true
3d70: 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f -cadir /etc/ssl/
3d80: 63 65 72 74 73 5d 0a 0a 73 65 74 20 74 6f 6b 20 certs]..set tok
3d90: 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 68 74 [http::geturl ht
3da0: 74 70 73 3a 2f 2f 63 6f 72 65 2e 74 63 6c 2d 6c tps://core.tcl-l
3db0: 61 6e 67 2e 6f 72 67 2f 5d 0a 3c 2f 63 6f 64 65 ang.org/].</code
3dc0: 3e 3c 2f 70 72 65 3e 0a 0a 3c 68 33 3e 3c 61 20 ></pre>..<h3><a
3dd0: 6e 61 6d 65 3d 22 53 50 45 43 49 41 4c 20 43 4f name="SPECIAL CO
3de0: 4e 53 49 44 45 52 41 54 49 4f 4e 53 22 3e 53 50 NSIDERATIONS">SP
3df0: 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 ECIAL CONSIDERAT
3e00: 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c IONS</a></h3>..<
3e10: 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74 69 p>The capabiliti
3e20: 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b 61 es of this packa
3e30: 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f 72 ge can vary enor
3e40: 6d 6f 75 73 6c 79 20 62 61 73 65 64 0a 75 70 6f mously based.upo
3e50: 6e 20 68 6f 77 20 79 6f 75 72 20 4f 70 65 6e 53 n how your OpenS
3e60: 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 20 63 SL library was c
3e70: 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 62 75 onfigured and bu
3e80: 69 6c 74 2e 20 41 74 20 74 68 65 0a 6d 6f 73 74 ilt. At the.most
3e90: 20 6d 61 63 72 6f 2d 6c 65 76 65 6c 20 4f 70 65 macro-level Ope
3ea0: 6e 53 53 4c 20 73 75 70 70 6f 72 74 73 20 61 20 nSSL supports a
3eb0: 26 71 75 6f 74 3b 6e 6f 20 70 61 74 65 6e 74 73 "no patents
3ec0: 26 71 75 6f 74 3b 20 62 75 69 6c 64 2c 0a 77 68 " build,.wh
3ed0: 69 63 68 20 64 69 73 61 62 6c 65 73 20 52 53 41 ich disables RSA
3ee0: 2c 20 49 44 45 41 2c 20 52 43 28 32 2c 34 2c 35 , IDEA, RC(2,4,5
3ef0: 29 20 61 6e 64 20 53 53 4c 32 20 2d 20 69 66 20 ) and SSL2 - if
3f00: 79 6f 75 72 20 4f 70 65 6e 53 53 4c 20 69 73 0a your OpenSSL is.
3f10: 63 6f 6e 66 69 67 75 72 65 64 20 74 68 69 73 20 configured this
3f20: 77 61 79 20 74 68 65 6e 20 79 6f 75 20 77 69 6c way then you wil
3f30: 6c 20 6e 65 65 64 20 74 6f 20 62 75 69 6c 64 20 l need to build
3f40: 54 4c 53 20 77 69 74 68 20 74 68 65 0a 2d 44 4e TLS with the.-DN
3f50: 4f 5f 50 41 54 45 4e 54 53 20 6f 70 74 69 6f 6e O_PATENTS option
3f60: 20 2d 20 61 6e 64 20 74 68 65 20 72 65 73 75 6c - and the resul
3f70: 74 61 6e 74 20 6d 6f 64 75 6c 65 20 77 69 6c 6c tant module will
3f80: 20 66 75 6e 63 74 69 6f 6e 0a 63 6f 72 72 65 63 function.correc
3f90: 74 6c 79 20 61 6e 64 20 61 6c 73 6f 20 73 75 70 tly and also sup
3fa0: 70 6f 72 74 20 41 44 48 20 63 65 72 74 69 66 69 port ADH certifi
3fb0: 63 61 74 65 2d 6c 65 73 73 20 65 6e 63 72 79 70 cate-less encryp
3fc0: 74 69 6f 6e 2c 0a 68 6f 77 65 76 65 72 20 79 6f tion,.however yo
3fd0: 75 20 77 69 6c 6c 20 62 65 20 75 6e 61 62 6c 65 u will be unable
3fe0: 20 74 6f 20 75 74 69 6c 69 7a 65 20 74 68 69 73 to utilize this
3ff0: 20 74 6f 20 73 70 65 61 6b 20 74 6f 20 6e 6f 72 to speak to nor
4000: 6d 61 6c 20 57 65 62 0a 53 65 72 76 65 72 73 2c mal Web.Servers,
4010: 20 77 68 69 63 68 20 74 79 70 69 63 61 6c 6c 79 which typically
4020: 20 72 65 71 75 69 72 65 20 52 53 41 20 73 75 70 require RSA sup
4030: 70 6f 72 74 2e 20 50 6c 65 61 73 65 20 73 65 65 port. Please see
4040: 20 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f <a.href="http:/
4050: 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 /www.openssl.org
4060: 2f 22 3e 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 /">http://www.op
4070: 65 6e 73 73 6c 2e 6f 72 67 2f 3c 2f 61 3e 20 66 enssl.org/</a> f
4080: 6f 72 0a 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 or.more informat
4090: 69 6f 6e 20 6f 6e 20 74 68 65 20 77 68 6f 6c 65 ion on the whole
40a0: 20 69 73 73 75 65 20 6f 66 20 70 61 74 65 6e 74 issue of patent
40b0: 73 20 61 6e 64 20 55 53 20 65 78 70 6f 72 74 0a s and US export.
40c0: 72 65 73 74 72 69 63 74 69 6f 6e 73 2e 20 3c 2f restrictions. </
40d0: 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d p>..<h3><a name=
40e0: 22 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 "SEE ALSO">SEE A
40f0: 4c 53 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 LSO</a></h3>..<p
4100: 3e 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c ><strong>socket<
4110: 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e /strong>, <stron
4120: 67 3e 66 69 6c 65 65 76 65 6e 74 3c 2f 73 74 72 g>fileevent</str
4130: 6f 6e 67 3e 2c 20 3c 61 0a 68 72 65 66 3d 22 68 ong>, <a.href="h
4140: 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 ttp://www.openss
4150: 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72 6f 6e 67 3e l.org/"><strong>
4160: 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e OpenSSL</strong>
4170: 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a </a></p>..<hr>..
4180: 3c 70 72 65 3e 0a 43 6f 70 79 72 69 67 68 74 20 <pre>.Copyright
4190: 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74 74 © 1999 Matt
41a0: 20 4e 65 77 6d 61 6e 2e 0a 43 6f 70 79 72 69 67 Newman..Copyrig
41b0: 68 74 20 26 63 6f 70 79 3b 20 32 30 30 34 20 53 ht © 2004 S
41c0: 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 2e tarfish Systems.
41d0: 0a 3c 2f 70 72 65 3e 0a 3c 2f 62 6f 64 79 3e 0a .</pre>.</body>.
41e0: 3c 2f 68 74 6d 6c 3e 0a </html>.