0000: 3c 21 64 6f 63 74 79 70 65 20 68 74 6d 6c 20 70 <!doctype html p
0010: 75 62 6c 69 63 20 22 2d 2f 2f 57 33 43 2f 2f 44 ublic "-//W3C//D
0020: 54 44 20 48 54 4d 4c 20 34 2e 30 20 54 72 61 6e TD HTML 4.0 Tran
0030: 73 69 74 69 6f 6e 61 6c 2f 2f 45 4e 22 3e 0a 0a sitional//EN">..
0040: 3c 68 74 6d 6c 3e 0a 0a 3c 68 65 61 64 3e 0a 3c <html>..<head>.<
0050: 6d 65 74 61 20 68 74 74 70 2d 65 71 75 69 76 3d meta http-equiv=
0060: 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 0a 63 "Content-Type".c
0070: 6f 6e 74 65 6e 74 3d 22 74 65 78 74 2f 68 74 6d ontent="text/htm
0080: 6c 3b 20 63 68 61 72 73 65 74 3d 69 73 6f 2d 38 l; charset=iso-8
0090: 38 35 39 2d 31 22 3e 0a 3c 6d 65 74 61 20 6e 61 859-1">.<meta na
00a0: 6d 65 3d 22 43 6f 70 79 72 69 67 68 74 22 20 63 me="Copyright" c
00b0: 6f 6e 74 65 6e 74 3d 22 31 39 39 39 20 4d 61 74 ontent="1999 Mat
00c0: 74 20 4e 65 77 6d 61 6e 20 2f 20 32 30 30 34 20 t Newman / 2004
00d0: 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 Starfish Systems
00e0: 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c 53 20 28 53 ">.<title>TLS (S
00f0: 53 4c 29 20 54 63 6c 20 43 6f 6d 6d 61 6e 64 73 SL) Tcl Commands
0100: 3c 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64 3e </title>.</head>
0110: 0a 0a 3c 62 6f 64 79 20 62 67 63 6f 6c 6f 72 3d ..<body bgcolor=
0120: 22 23 46 46 46 46 46 46 22 3e 0a 0a 3c 64 6c 3e "#FFFFFF">..<dl>
0130: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 . <dd><a href
0140: 3d 22 23 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 ="#NAME">NAME</a
0150: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 >. <dl>.
0160: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3c 2f 62 <dd><b>tls</b
0170: 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c > - binding to <
0180: 62 3e 4f 70 65 6e 53 53 4c 3c 2f 62 3e 20 74 6f b>OpenSSL</b> to
0190: 6f 6c 6b 69 74 2e 3c 2f 64 64 3e 0a 20 20 20 20 olkit.</dd>.
01a0: 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a </dl>. </dd>.
01b0: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d <dd><a href=
01c0: 22 23 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f "#SYNOPSIS">SYNO
01d0: 50 53 49 53 3c 2f 61 3e 20 3c 2f 64 64 3e 0a 20 PSIS</a> </dd>.
01e0: 20 20 20 3c 64 64 3e 3c 64 6c 3e 0a 20 20 20 20 <dd><dl>.
01f0: 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 70 <dd><b>p
0200: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 54 ackage require T
0210: 63 6c 3c 2f 62 3e 20 3c 65 6d 3e 3f 38 2e 34 3f cl</b> <em>?8.4?
0220: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 </em></dd>.
0230: 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 70 61 <dd><b>pa
0240: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c ckage require tl
0250: 73 3c 2f 62 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 s</b></dd>.
0260: 20 20 20 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 <dt> 
0270: 3b 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 20 ;</dt>.
0280: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 <dd><b>tls::i
0290: 6e 69 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 nit</b> <em>?opt
02a0: 69 6f 6e 73 3f 3c 2f 65 6d 3e 20 3c 2f 64 64 3e ions?</em> </dd>
02b0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 . <dd
02c0: 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c ><b>tls::socket<
02d0: 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 /b> <em>?options
02e0: 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e ? host port</em>
02f0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 </dd>.
0300: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f <dd><b>tls::so
0310: 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 20 3f 2d cket</b> <em> ?-
0320: 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 server command?
0330: 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f ?options? port</
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 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c :handshake</b> <
0370: 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e em> channel</em>
0380: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 </dd>.
0390: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 74 <dd><b>tls::st
03a0: 61 74 75 73 20 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d atus </b> <em>?-
03b0: 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f local? channel</
03c0: 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 em></dd>.
03d0: 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a <dd><b>tls:
03e0: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 20 3c 2f 62 3e :connection </b>
03f0: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d <em>channel</em
0400: 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 ></dd>.
0410: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 <dd><b>tls::i
0420: 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68 mport</b> <em>ch
0430: 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c annel ?options?<
0440: 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 /em></dd>.
0450: 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 <dd><b>tls
0460: 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c ::unimport</b> <
0470: 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c em>channel</em><
0480: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 /dd>.
0490: 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e <dt> </dt>
04a0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 64 . <dd
04b0: 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 ><b>tls::ciphers
04c0: 20 3c 2f 62 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 </b> <em>protoc
04d0: 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 ol ?verbose? ?su
04e0: 70 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 pported?</em></d
04f0: 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c d>. <
0500: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f dd><b>tls::proto
0510: 63 6f 6c 73 3c 2f 62 3e 3c 2f 64 64 3e 0a 20 20 cols</b></dd>.
0520: 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 <dd><b
0530: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 >tls::version</b
0540: 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c ></dd>. <
0550: 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 /dl>. </dd>.
0560: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 <dd><a href="
0570: 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 #COMMANDS">COMMA
0580: 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 NDS</a></dd>.
0590: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 <dd><a href="#C
05a0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 ALLBACK OPTIONS"
05b0: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e >CALLBACK OPTION
05c0: 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c S</a></dd>. <
05d0: 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 54 dd><a href="#HTT
05e0: 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 PS EXAMPLE">HTTP
05f0: 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 S EXAMPLE</a></d
0600: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 d>. <dd><a hr
0610: 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 ef="#SEE ALSO">S
0620: 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 PECIAL CONSIDERA
0630: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 TIONS</a></dd>.
0640: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 <dd><a href="
0650: 23 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 #SEE ALSO">SEE A
0660: 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 LSO</a></dd>.</d
0670: 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 l>..<hr>..<h3><a
0680: 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d name="NAME">NAM
0690: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c E</a></h3>..<p><
06a0: 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f strong>tls</stro
06b0: 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f ng> - binding to
06c0: 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c <strong>OpenSSL
06d0: 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 </strong>.toolki
06e0: 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e t.</p>..<h3><a n
06f0: 61 6d 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53 ame="SYNOPSIS">S
0700: 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e YNOPSIS</a></h3>
0710: 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20 ..<p><b>package
0720: 72 65 71 75 69 72 65 20 54 63 6c 20 38 2e 34 3c require Tcl 8.4<
0730: 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 /b><br>.<b>packa
0740: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f ge require tls</
0750: 62 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 b><br>.<br>.<a h
0760: 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6e 69 74 22 ref="#tls::init"
0770: 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 ><b>tls::init</b
0780: 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f > <i>?options?</
0790: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
07a0: 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 ef="#tls::socket
07b0: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 "><b>tls::socket
07c0: 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 </b> <i>?options
07d0: 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f 69 3e 3c ? host port</i><
07e0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
07f0: 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c s::socket"><b>tl
0800: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 s::socket</b> <i
0810: 3e 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e >?-server comman
0820: 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 d? ?options? por
0830: 74 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 t</i></a><br>.<a
0840: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 href="#tls::sta
0850: 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 tus"><b>tls::sta
0860: 74 75 73 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63 tus</b> <i>?-loc
0870: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c al? channel</i><
0880: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
0890: 22 23 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f "#tls::connectio
08a0: 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 n"><b>tls::conne
08b0: 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61 ction</b> <i>cha
08c0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e nnel</i></a><br>
08d0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
08e0: 68 61 6e 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c handshake"><b>tl
08f0: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e s::handshake</b>
0900: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c <i>channel</i><
0910: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
0920: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c "#tls::import"><
0930: 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 b>tls::import</b
0940: 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 > <i>channel ?op
0950: 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 tions?</i></a><b
0960: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 r>.<a href="#tls
0970: 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 ::unimport"><b>t
0980: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e ls::unimport</b>
0990: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c <i>channel</i><
09a0: 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 /a><br>.<br>.<a
09b0: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 href="#tls::ciph
09c0: 65 72 73 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 ers"><b>tls::cip
09d0: 68 65 72 73 3c 2f 62 3e 20 3c 69 3e 70 72 6f 74 hers</b> <i>prot
09e0: 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 20 3f ocol ?verbose? ?
09f0: 73 75 70 70 6f 72 74 65 64 3f 3c 2f 69 3e 3c 2f supported?</i></
0a00: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 a><br>.<a href="
0a10: 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 #tls::protocols"
0a20: 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f ><b>tls::protoco
0a30: 6c 73 3c 2f 62 3e 3c 2f 61 3e 0a 3c 61 20 68 72 ls</b></a>.<a hr
0a40: 65 66 3d 22 23 74 6c 73 3a 3a 76 65 72 73 69 6f ef="#tls::versio
0a50: 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69 n"><b>tls::versi
0a60: 6f 6e 3c 2f 62 3e 3c 2f 61 3e 0a 3c 2f 70 3e 0a on</b></a>.</p>.
0a70: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 .<h3><a name="DE
0a80: 53 43 52 49 50 54 49 4f 4e 22 3e 44 45 53 43 52 SCRIPTION">DESCR
0a90: 49 50 54 49 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a IPTION</a></h3>.
0aa0: 0a 3c 70 3e 54 68 69 73 20 65 78 74 65 6e 73 69 .<p>This extensi
0ab0: 6f 6e 20 70 72 6f 76 69 64 65 73 20 61 20 67 65 on provides a ge
0ac0: 6e 65 72 69 63 20 62 69 6e 64 69 6e 67 20 74 6f neric binding to
0ad0: 20 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f <a.href="http:/
0ae0: 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 /www.openssl.org
0af0: 2f 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 /">OpenSSL</a>,
0b00: 75 74 69 6c 69 7a 69 6e 67 20 74 68 65 0a 3c 73 utilizing the.<s
0b10: 74 72 6f 6e 67 3e 54 63 6c 5f 53 74 61 63 6b 43 trong>Tcl_StackC
0b20: 68 61 6e 6e 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a hannel</strong>.
0b30: 41 50 49 20 66 6f 72 20 54 63 6c 20 38 2e 34 20 API for Tcl 8.4
0b40: 61 6e 64 20 68 69 67 68 65 72 2e 20 54 68 65 20 and higher. The
0b50: 73 6f 63 6b 65 74 73 20 62 65 68 61 76 65 20 65 sockets behave e
0b60: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 0a xactly the same.
0b70: 61 73 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 as channels crea
0b80: 74 65 64 20 75 73 69 6e 67 20 54 63 6c 27 73 20 ted using Tcl's
0b90: 62 75 69 6c 74 2d 69 6e 20 3c 73 74 72 6f 6e 67 built-in <strong
0ba0: 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e >socket</strong>
0bb0: 0a 63 6f 6d 6d 61 6e 64 20 77 69 74 68 20 61 64 .command with ad
0bc0: 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 ditional options
0bd0: 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 for controlling
0be0: 20 74 68 65 20 53 53 4c 20 73 65 73 73 69 6f 6e the SSL session
0bf0: 2e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e ..</p>..<h3><a n
0c00: 61 6d 65 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e 43 ame="COMMANDS">C
0c10: 4f 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33 3e OMMANDS</a></h3>
0c20: 0a 0a 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f ..<p>Typically o
0c30: 6e 65 20 77 6f 75 6c 64 20 75 73 65 20 74 68 65 ne would use the
0c40: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f <strong>tls::so
0c50: 63 6b 65 74 20 3c 2f 73 74 72 6f 6e 67 3e 63 6f cket </strong>co
0c60: 6d 6d 61 6e 64 0a 77 68 69 63 68 20 70 72 6f 76 mmand.which prov
0c70: 69 64 65 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 ides compatibili
0c80: 74 79 20 77 69 74 68 20 74 68 65 20 6e 61 74 69 ty with the nati
0c90: 76 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 ve Tcl <strong>s
0ca0: 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 ocket</strong>.c
0cb0: 6f 6d 6d 61 6e 64 2e 20 49 6e 20 73 75 63 68 20 ommand. In such
0cc0: 63 61 73 65 73 20 3c 73 74 72 6f 6e 67 3e 74 6c cases <strong>tl
0cd0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e s::import</stron
0ce0: 67 3e 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 g> should not be
0cf0: 0a 75 73 65 64 20 64 69 72 65 63 74 6c 79 2e 3c .used directly.<
0d00: 2f 70 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 /p>..<dl>. <d
0d10: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
0d20: 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e init"><b>tls::in
0d30: 69 74 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f it </b><i>?optio
0d40: 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e ns?</i></a></dt>
0d50: 0a 20 20 20 20 3c 64 64 3e 4f 70 74 69 6f 6e 61 . <dd>Optiona
0d60: 6c 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65 l function to se
0d70: 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70 t the default op
0d80: 74 69 6f 6e 73 20 75 73 65 64 20 62 79 0a 09 3c tions used by..<
0d90: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b strong>tls::sock
0da0: 65 74 3c 2f 73 74 72 6f 6e 67 3e 2e 20 49 66 20 et</strong>. If
0db0: 79 6f 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 you call <strong
0dc0: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 >tls::import</st
0dd0: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 64 69 rong>. di
0de0: 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f 75 74 rectly this rout
0df0: 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 65 63 ine has no effec
0e00: 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 6f 70 t. Any of the op
0e10: 74 69 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 68 tions. th
0e20: 61 74 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a at <strong>tls::
0e30: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 socket</strong>
0e40: 61 63 63 65 70 74 73 20 63 61 6e 20 62 65 20 73 accepts can be s
0e50: 65 74 0a 20 20 20 20 20 20 20 20 75 73 69 6e 67 et. using
0e60: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 74 this command, t
0e70: 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c 64 hough you should
0e80: 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69 limit your opti
0e90: 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 6f 20 6f ons. to o
0ea0: 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20 nly TLS related
0eb0: 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c ones.</dd>. <
0ec0: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 dt> </dt>.
0ed0: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 <dt><a name="
0ee0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e tls::socket"><b>
0ef0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e tls::socket </b>
0f00: 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 20 20 <em>?options?.
0f10: 20 20 20 20 20 20 68 6f 73 74 20 70 6f 72 74 3c host port<
0f20: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 /em></a></dt>.
0f30: 20 20 3c 64 74 3e 3c 62 3e 74 6c 73 3a 3a 73 6f <dt><b>tls::so
0f40: 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e 20 3f 2d 73 cket</b><em> ?-s
0f50: 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f erver command? ?
0f60: 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 options? port</e
0f70: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e m></dt>. <dd>
0f80: 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 72 This is a helper
0f90: 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75 function that u
0fa0: 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65 tilizes the unde
0fb0: 72 6c 79 69 6e 67 0a 20 20 20 20 20 20 20 20 63 rlying. c
0fc0: 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 ommands (<strong
0fd0: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 >tls::import</st
0fe0: 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76 rong>). It behav
0ff0: 65 73 0a 20 20 20 20 20 20 20 20 65 78 61 63 74 es. exact
1000: 6c 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 ly the same as t
1010: 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 he native Tcl <s
1020: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 trong>socket</st
1030: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 63 6f rong>. co
1040: 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 61 mmand except tha
1050: 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 t the options ca
1060: 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66 n include any of
1070: 20 74 68 65 0a 20 20 20 20 20 20 20 20 61 70 70 the. app
1080: 6c 69 63 61 62 6c 65 20 3c 61 20 68 72 65 66 3d licable <a href=
1090: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c "#tls::import"><
10a0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 strong>tls:impor
10b0: 74 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 20 t</strong></a>.
10c0: 20 20 20 20 20 20 20 6f 70 74 69 6f 6e 73 20 77 options w
10d0: 69 74 68 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e ith one addition
10e0: 61 6c 20 6f 70 74 69 6f 6e 3a 0a 3c 62 6c 6f 63 al option:.<bloc
10f0: 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e kquote>. <dl>
1100: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
1110: 72 6f 6e 67 3e 2d 61 75 74 6f 73 65 72 76 65 72 rong>-autoserver
1120: 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 name</strong> <e
1130: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e m>bool</em></dt>
1140: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 41 75 74 . <dd>Aut
1150: 6f 6d 61 74 69 63 61 6c 6c 79 20 73 65 6e 64 20 omatically send
1160: 74 68 65 20 2d 73 65 72 76 65 72 6e 61 6d 65 20 the -servername
1170: 61 73 20 74 68 65 20 3c 65 6d 3e 68 6f 73 74 3c as the <em>host<
1180: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 0a 20 20 /em> argument.
1190: 20 20 20 20 20 20 20 20 20 20 28 64 65 66 61 75 (defau
11a0: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c lt is <em>false<
11b0: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c /em>)</dd>. <
11c0: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 /dl>.</blockquot
11d0: 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e e>.. <dt><a n
11e0: 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 ame="tls::import
11f0: 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 "><b>tls::import
1200: 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a </b><i>channel.
1210: 20 20 20 20 20 20 20 20 3f 6f 70 74 69 6f 6e 73 ?options
1220: 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 ?</i></a></dt>.
1230: 20 20 20 3c 64 64 3e 53 53 4c 2d 65 6e 61 62 6c <dd>SSL-enabl
1240: 65 20 61 20 72 65 67 75 6c 61 72 20 54 63 6c 20 e a regular Tcl
1250: 63 68 61 6e 6e 65 6c 20 2d 20 69 74 20 6e 65 65 channel - it nee
1260: 64 20 6e 6f 74 20 62 65 20 61 0a 20 20 20 20 20 d not be a.
1270: 20 20 20 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d socket, but m
1280: 75 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64 ust provide bi-d
1290: 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e irectional flow.
12a0: 20 41 6c 73 6f 0a 20 20 20 20 20 20 20 20 73 65 Also. se
12b0: 74 74 69 6e 67 20 73 65 73 73 69 6f 6e 20 70 61 tting session pa
12c0: 72 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c rameters for SSL
12d0: 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 64 64 3e handshake.</dd>
12e0: 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 ..<blockquote>.
12f0: 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 <dl>.
1300: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 6c 70 <dt><strong>-alp
1310: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c n</strong> <em>l
1320: 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ist</em></dt>.
1330: 20 20 20 20 20 20 3c 64 64 3e 4c 69 73 74 20 6f <dd>List o
1340: 66 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f f protocols to o
1350: 66 66 65 72 20 64 75 72 69 6e 67 20 41 70 70 6c ffer during Appl
1360: 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 0a 09 20 ication-Layer..
1370: 20 20 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f Protocol Nego
1380: 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 20 tiation (ALPN).
1390: 46 6f 72 20 65 78 61 6d 70 6c 65 3a 20 68 32 2c For example: h2,
13a0: 20 68 74 74 70 2f 31 2e 31 2c 20 65 74 63 2e 3c http/1.1, etc.<
13b0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
13c0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 64 69 72 3c ><strong>-cadir<
13d0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 /strong> <em>dir
13e0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
13f0: 20 20 20 3c 64 64 3e 53 70 65 63 69 66 79 20 74 <dd>Specify t
1400: 68 65 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e he directory con
1410: 74 61 69 6e 69 6e 67 20 74 68 65 20 43 41 20 63 taining the CA c
1420: 65 72 74 69 66 69 63 61 74 65 73 2e 20 54 68 65 ertificates. The
1430: 0a 09 20 20 20 20 64 65 66 61 75 6c 74 20 64 69 .. default di
1440: 72 65 63 74 6f 72 79 20 69 73 20 70 6c 61 74 66 rectory is platf
1450: 6f 72 6d 20 73 70 65 63 69 66 69 63 20 61 6e 64 orm specific and
1460: 20 63 61 6e 20 62 65 20 73 65 74 20 61 74 0a 09 can be set at..
1470: 20 20 20 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65 compile time
1480: 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 6f 76 . This can be ov
1490: 65 72 72 69 64 64 65 6e 20 76 69 61 20 74 68 65 erridden via the
14a0: 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 <b>SSL_CERT_DIR
14b0: 3c 2f 62 3e 0a 09 20 20 20 20 65 6e 76 69 72 6f </b>.. enviro
14c0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c nment variable.<
14d0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
14e0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69 6c 65 ><strong>-cafile
14f0: 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 </strong><em>fi
1500: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e lename</em></dt>
1510: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70 65 . <dd>Spe
1520: 63 69 66 79 20 74 68 65 20 63 65 72 74 69 66 69 cify the certifi
1530: 63 61 74 65 20 61 75 74 68 6f 72 69 74 79 20 28 cate authority (
1540: 43 41 29 20 66 69 6c 65 20 74 6f 20 75 73 65 2e CA) file to use.
1550: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
1560: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74 66 t><strong>-certf
1570: 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ile</strong> <em
1580: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f >filename</em></
1590: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e dt>. <dd>
15a0: 53 70 65 63 69 66 79 20 74 68 65 20 66 69 6c 65 Specify the file
15b0: 6e 61 6d 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 name containing
15c0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
15d0: 74 6f 20 75 73 65 2e 20 54 68 65 0a 09 20 20 20 to use. The..
15e0: 20 64 65 66 61 75 6c 74 20 6e 61 6d 65 20 69 73 default name is
15f0: 20 3c 62 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e <b>cert.pem</b>
1600: 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 6f 76 . This can be ov
1610: 65 72 72 69 64 64 65 6e 20 76 69 61 0a 09 20 20 erridden via..
1620: 20 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 the <b>SSL_CER
1630: 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 T_FILE</b> envir
1640: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e onment variable.
1650: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
1660: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74 3c t><strong>-cert<
1670: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c /strong> <em>fil
1680: 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a ename</em></dt>.
1690: 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70 65 63 <dd>Spec
16a0: 69 66 79 20 74 68 65 20 63 6f 6e 74 65 6e 74 73 ify the contents
16b0: 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61 74 of a certificat
16c0: 65 20 74 6f 20 75 73 65 2c 20 61 73 20 61 20 44 e to use, as a D
16d0: 45 52 0a 09 20 20 20 20 65 6e 63 6f 64 65 64 20 ER.. encoded
16e0: 62 69 6e 61 72 79 20 76 61 6c 75 65 20 28 58 2e binary value (X.
16f0: 35 30 39 20 44 45 52 29 2e 3c 2f 64 64 3e 0a 20 509 DER).</dd>.
1700: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
1710: 6e 67 3e 2d 63 69 70 68 65 72 3c 2f 73 74 72 6f ng>-cipher</stro
1720: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ng> <em>string</
1730: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
1740: 20 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 69 70 <dd>List of cip
1750: 68 65 72 73 20 74 6f 20 75 73 65 2e 20 53 74 72 hers to use. Str
1760: 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 ing is a colon (
1770: 22 3a 22 29 20 73 65 70 61 72 61 74 65 64 20 6c ":") separated l
1780: 69 73 74 0a 09 20 20 20 20 6f 66 20 63 69 70 68 ist.. of ciph
1790: 65 72 73 20 6f 72 20 63 69 70 68 65 72 20 73 75 ers or cipher su
17a0: 69 74 65 73 2e 20 43 69 70 68 65 72 20 73 75 69 ites. Cipher sui
17b0: 74 65 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 tes can be combi
17c0: 6e 65 64 0a 09 20 20 20 20 75 73 69 6e 67 20 74 ned.. using t
17d0: 68 65 20 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72 he <b>+</b> char
17e0: 61 63 74 65 72 2e 20 50 72 65 66 69 78 65 73 20 acter. Prefixes
17f0: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70 can be used to p
1800: 65 72 6d 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20 ermanently..
1810: 72 65 6d 6f 76 65 20 28 22 21 22 29 2c 20 64 65 remove ("!"), de
1820: 6c 65 74 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d lete ("-"), or m
1830: 6f 76 65 20 61 20 63 79 70 68 65 72 20 74 6f 20 ove a cypher to
1840: 74 68 65 20 65 6e 64 20 6f 66 0a 09 20 20 20 20 the end of..
1850: 74 68 65 20 6c 69 73 74 20 28 22 2b 22 29 2e 20 the list ("+").
1860: 4b 65 79 77 6f 72 64 73 20 3c 62 3e 40 53 54 52 Keywords <b>@STR
1870: 45 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 ENGTH</b> (sort
1880: 62 79 20 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20 by algorithm..
1890: 20 20 6b 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c key length), <
18a0: 62 3e 40 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e b>@SECLEVEL=</b>
18b0: 3c 69 3e 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65 <i>n</i> (set se
18c0: 63 75 72 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a curity level to.
18d0: 09 20 20 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e . n), and <b>
18e0: 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 DEFAULT</b> (use
18f0: 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20 default cipher
1900: 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f list, at start o
1910: 6e 6c 79 29 0a 09 20 20 20 20 63 61 6e 20 61 6c nly).. can al
1920: 73 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 2e so be specified.
1930: 20 53 65 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63 See OpenSSL doc
1940: 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 umentation for t
1950: 68 65 20 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73 he full.. lis
1960: 74 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 65 t of valid value
1970: 73 2e 20 28 54 4c 53 20 31 2e 32 20 61 6e 64 20 s. (TLS 1.2 and
1980: 65 61 72 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64 earlier only)</d
1990: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
19a0: 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 73 75 strong>-ciphersu
19b0: 69 74 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ites</strong> <e
19c0: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 m>string</em></d
19d0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 4c t>. <dd>L
19e0: 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 ist of cipher su
19f0: 69 74 65 73 20 74 6f 20 75 73 65 2e 20 53 74 72 ites to use. Str
1a00: 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 ing is a colon (
1a10: 22 3a 22 29 0a 09 20 20 20 20 73 65 70 61 72 61 ":").. separa
1a20: 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68 ted list of ciph
1a30: 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73 2e 20 er suite names.
1a40: 28 54 4c 53 20 31 2e 33 20 6f 6e 6c 79 29 3c 2f (TLS 1.3 only)</
1a50: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dd>. <dt>
1a60: 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 <strong>-command
1a70: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 </strong> <em>ca
1a80: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e llback</em></dt>
1a90: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 43 61 6c . <dd>Cal
1aa0: 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 lback to invoke
1ab0: 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 at several point
1ac0: 73 20 64 75 72 69 6e 67 20 74 68 65 20 68 61 6e s during the han
1ad0: 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 54 68 69 dshake... Thi
1ae0: 73 20 69 73 20 75 73 65 64 20 74 6f 20 70 61 73 s is used to pas
1af0: 73 20 65 72 72 6f 72 73 20 61 6e 64 20 74 72 61 s errors and tra
1b00: 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e cing information
1b10: 2c 20 61 6e 64 0a 09 20 20 20 20 69 74 20 63 61 , and.. it ca
1b20: 6e 20 61 6c 6c 6f 77 20 54 63 6c 20 73 63 72 69 n allow Tcl scri
1b30: 70 74 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 pts to perform t
1b40: 68 65 69 72 20 6f 77 6e 20 63 65 72 74 69 66 69 heir own certifi
1b50: 63 61 74 65 0a 09 20 20 20 20 76 61 6c 69 64 61 cate.. valida
1b60: 74 69 6f 6e 20 69 6e 20 70 6c 61 63 65 20 6f 66 tion in place of
1b70: 20 74 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c the default val
1b80: 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 idation provided
1b90: 20 62 79 0a 09 20 20 20 20 4f 70 65 6e 53 53 4c by.. OpenSSL
1ba0: 2e 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23 . See <a href="#
1bb0: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
1bc0: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f ">CALLBACK OPTIO
1bd0: 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 NS</a>.. for
1be0: 66 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69 further discussi
1bf0: 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 on.</dd>.
1c00: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68 <dt><strong>-dh
1c10: 70 61 72 61 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e params </strong>
1c20: 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d <em>filename</em
1c30: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
1c40: 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 44 dd>Specify the D
1c50: 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 iffie-Hellman pa
1c60: 72 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f rameters file.</
1c70: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dd>. <dt>
1c80: 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65 <strong>-keyfile
1c90: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 </strong> <em>fi
1ca0: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e lename</em></dt>
1cb0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70 65 . <dd>Spe
1cc0: 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74 65 cify the private
1cd0: 20 6b 65 79 20 66 69 6c 65 2e 20 28 64 65 66 61 key file. (defa
1ce0: 75 6c 74 20 69 73 0a 20 20 20 20 20 20 20 20 20 ult is.
1cf0: 20 20 20 76 61 6c 75 65 20 6f 66 20 2d 63 65 72 value of -cer
1d00: 74 66 69 6c 65 29 3c 2f 64 64 3e 0a 20 20 20 20 tfile)</dd>.
1d10: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
1d20: 2d 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 -key</strong> <e
1d30: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c m>filename</em><
1d40: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
1d50: 3e 53 70 65 63 69 66 79 20 74 68 65 20 70 72 69 >Specify the pri
1d60: 76 61 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 vate key to use
1d70: 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 as a DER encoded
1d80: 20 76 61 6c 75 65 20 28 50 4b 43 53 23 31 20 44 value (PKCS#1 D
1d90: 45 52 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 ER)</dd>.
1da0: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6d 6f <dt><strong>-mo
1db0: 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d del</strong> <em
1dc0: 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 >channel</em></d
1dd0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 46 t>. <dd>F
1de0: 6f 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 orce this channe
1df0: 6c 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 l to share the s
1e00: 61 6d 65 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e ame <em><strong>
1e10: 53 53 4c 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e SSL_CTX</strong>
1e20: 3c 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 20 20 </em>.
1e30: 20 20 73 74 72 75 63 74 75 72 65 20 61 73 20 74 structure as t
1e40: 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d he specified <em
1e50: 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61 >channel</em>, a
1e60: 6e 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 nd. t
1e70: 68 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 63 herefore share c
1e80: 61 6c 6c 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 allbacks etc.</d
1e90: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
1ea0: 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 strong>-password
1eb0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 </strong> <em>ca
1ec0: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e llback</em></dt>
1ed0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 43 61 6c . <dd>Cal
1ee0: 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 lback to invoke
1ef0: 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 when OpenSSL nee
1f00: 64 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 ds to obtain a p
1f10: 61 73 73 77 6f 72 64 2c 0a 09 20 20 20 20 74 79 assword,.. ty
1f20: 70 69 63 61 6c 6c 79 20 74 6f 20 75 6e 6c 6f 63 pically to unloc
1f30: 6b 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 k the private ke
1f40: 79 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61 y of a certifica
1f50: 74 65 2e 20 54 68 65 0a 20 20 20 20 20 20 20 20 te. The.
1f60: 20 20 20 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f callback sho
1f70: 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73 74 72 uld return a str
1f80: 69 6e 67 20 77 68 69 63 68 20 72 65 70 72 65 73 ing which repres
1f90: 65 6e 74 73 20 74 68 65 20 70 61 73 73 77 6f 72 ents the passwor
1fa0: 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 6f d. to
1fb0: 20 62 65 20 75 73 65 64 2e 20 53 65 65 20 3c 61 be used. See <a
1fc0: 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b href="#CALLBACK
1fd0: 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 OPTIONS">CALLBA
1fe0: 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 CK OPTIONS</a>..
1ff0: 20 20 20 20 66 6f 72 20 66 75 72 74 68 65 72 20 for further
2000: 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e discussion.</dd>
2010: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 ..<dt><strong>-p
2020: 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 73 ost_handshake</s
2030: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
2040: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 /em></dt>..<dd>A
2050: 6c 6c 6f 77 20 70 6f 73 74 2d 68 61 6e 64 73 68 llow post-handsh
2060: 61 6b 65 20 74 69 63 6b 65 74 20 75 70 64 61 74 ake ticket updat
2070: 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 es.</dd>.
2080: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 <dt><strong>-re
2090: 71 75 65 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c quest </strong><
20a0: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 em>bool</em></dt
20b0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65 >. <dd>Re
20c0: 71 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 quest a certific
20d0: 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 ate from peer du
20e0: 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68 61 ring SSL handsha
20f0: 6b 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 ke..
2100: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
2110: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a true</em>)</dd>.
2120: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
2130: 6f 6e 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74 ong>-require</st
2140: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f rong> <em>bool</
2150: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
2160: 20 3c 64 64 3e 52 65 71 75 69 72 65 20 61 20 76 <dd>Require a v
2170: 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65 alid certificate
2180: 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e from peer durin
2190: 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e g SSL handshake.
21a0: 0a 09 20 20 20 20 49 66 20 74 68 69 73 20 69 73 .. If this is
21b0: 20 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68 set to true, th
21c0: 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 en <strong>-requ
21d0: 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 6d 75 73 est</strong> mus
21e0: 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 6c t. al
21f0: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75 so be set to tru
2200: 65 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c e. (default is <
2210: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f em>false</em>)</
2220: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dd>. <dt>
2230: 3c 73 74 72 6f 6e 67 3e 2d 73 65 63 75 72 69 74 <strong>-securit
2240: 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 ylevel</strong>
2250: 3c 65 6d 3e 69 6e 74 65 67 65 72 3c 2f 65 6d 3e <em>integer</em>
2260: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
2270: 64 3e 53 65 74 20 73 65 63 75 72 69 74 79 20 6c d>Set security l
2280: 65 76 65 6c 2e 20 4d 75 73 74 20 62 65 20 30 20 evel. Must be 0
2290: 74 6f 20 35 2e 20 54 68 65 20 73 65 63 75 72 69 to 5. The securi
22a0: 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73 ty level affects
22b0: 0a 09 20 20 20 20 63 69 70 68 65 72 20 73 75 69 .. cipher sui
22c0: 74 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c te encryption al
22d0: 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 70 6f 72 gorithms, suppor
22e0: 74 65 64 20 45 43 43 20 63 75 72 76 65 73 2c 0a ted ECC curves,.
22f0: 09 20 20 20 20 73 75 70 70 6f 72 74 65 64 20 73 . supported s
2300: 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 ignature algorit
2310: 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65 hms, DH paramete
2320: 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69 r sizes, certifi
2330: 63 61 74 65 0a 09 20 20 20 20 6b 65 79 20 73 69 cate.. key si
2340: 7a 65 73 20 61 6e 64 20 73 69 67 6e 61 74 75 72 zes and signatur
2350: 65 20 61 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 e algorithms. Th
2360: 65 20 64 65 66 61 75 6c 74 20 69 73 20 31 2e 0a e default is 1..
2370: 09 20 20 20 20 4c 65 76 65 6c 20 33 20 61 6e 64 . Level 3 and
2380: 20 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 higher disable
2390: 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 support for sess
23a0: 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 20 ion tickets and
23b0: 6f 6e 6c 79 0a 09 20 20 20 20 61 63 63 65 70 74 only.. accept
23c0: 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74 cipher suites t
23d0: 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f 72 77 hat provide forw
23e0: 61 72 64 20 73 65 63 72 65 63 79 2e 3c 2f 64 64 ard secrecy.</dd
23f0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
2400: 74 72 6f 6e 67 3e 2d 73 65 72 76 65 72 3c 2f 73 trong>-server</s
2410: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
2420: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
2430: 20 20 3c 64 64 3e 48 61 6e 64 73 68 61 6b 65 20 <dd>Handshake
2440: 61 73 20 73 65 72 76 65 72 20 69 66 20 74 72 75 as server if tru
2450: 65 2c 20 65 6c 73 65 20 68 61 6e 64 73 68 61 6b e, else handshak
2460: 65 20 61 73 0a 20 20 20 20 20 20 20 20 20 20 20 e as.
2470: 20 63 6c 69 65 6e 74 2e 20 28 64 65 66 61 75 6c client. (defaul
2480: 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f t is <em>false</
2490: 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 em>)</dd>.
24a0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 <dt><strong>-s
24b0: 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e ervername</stron
24c0: 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e g> <em>host</em>
24d0: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
24e0: 64 3e 53 70 65 63 69 66 79 20 73 65 72 76 65 72 d>Specify server
24f0: 20 68 6f 73 74 6e 61 6d 65 2e 20 4f 6e 6c 79 20 hostname. Only
2500: 61 76 61 69 6c 61 62 6c 65 20 69 66 20 74 68 65 available if the
2510: 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 OpenSSL library
2520: 0a 09 20 20 20 20 74 68 65 20 70 61 63 6b 61 67 .. the packag
2530: 65 20 69 73 20 6c 69 6e 6b 65 64 20 61 67 61 69 e is linked agai
2540: 6e 73 74 20 73 75 70 70 6f 72 74 73 20 74 68 65 nst supports the
2550: 20 54 4c 53 20 68 6f 73 74 6e 61 6d 65 20 65 78 TLS hostname ex
2560: 74 65 6e 73 69 6f 6e 0a 09 20 20 20 20 66 6f 72 tension.. for
2570: 20 27 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e 'Server Name In
2580: 64 69 63 61 74 69 6f 6e 27 20 28 53 4e 49 29 2e dication' (SNI).
2590: 20 55 73 65 20 74 6f 20 6e 61 6d 65 20 74 68 65 Use to name the
25a0: 20 6c 6f 67 69 63 61 6c 20 68 6f 73 74 0a 09 20 logical host..
25b0: 20 20 20 77 65 20 61 72 65 20 74 61 6c 6b 69 6e we are talkin
25c0: 67 20 74 6f 20 61 6e 64 20 65 78 70 65 63 74 69 g to and expecti
25d0: 6e 67 20 61 20 63 65 72 74 69 66 69 63 61 74 65 ng a certificate
25e0: 20 66 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 for.</dd>.
25f0: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d <dt><strong>-
2600: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f session_id</stro
2610: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ng> <em>string</
2620: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
2630: 20 3c 64 64 3e 53 65 73 73 69 6f 6e 20 69 64 20 <dd>Session id
2640: 74 6f 20 72 65 73 75 6d 65 20 73 65 73 73 69 6f to resume sessio
2650: 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 n.</dd>.
2660: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c <dt><strong>-ssl
2670: 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 2</strong> <em>b
2680: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ool</em></dt>.
2690: 20 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65 <dd>Enable
26a0: 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32 2e 20 use of SSL v2.
26b0: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
26c0: 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e false</em>)</dd>
26d0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
26e0: 72 6f 6e 67 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 rong>-ssl3 </str
26f0: 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ong><em>bool</em
2700: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
2710: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 dd>Enable use of
2720: 20 53 53 4c 20 76 33 2e 20 28 64 65 66 61 75 6c SSL v3. (defaul
2730: 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f t is <em>false</
2740: 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 em>)</dd>.
2750: 20 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 <dt>-<strong>t
2760: 6c 73 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ls1</strong> <em
2770: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
2780: 20 20 20 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 <dd>Enab
2790: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
27a0: 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 . (default is <e
27b0: 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 m>true</em>)</dd
27c0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 2d 3c >. <dt>-<
27d0: 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73 strong>tls1.1</s
27e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
27f0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
2800: 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 <dd>Enable use
2810: 20 6f 66 20 54 4c 53 20 76 31 2e 31 20 28 64 65 of TLS v1.1 (de
2820: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 fault is <em>tru
2830: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 e</em>)</dd>.
2840: 20 20 20 20 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e <dt>-<stron
2850: 67 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67 g>tls1.2</strong
2860: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c > <em>bool</em><
2870: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
2880: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 >Enable use of T
2890: 4c 53 20 76 31 2e 32 20 28 64 65 66 61 75 6c 74 LS v1.2 (default
28a0: 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d is <em>true</em
28b0: 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 >)</dd>.
28c0: 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 <dt>-<strong>tls
28d0: 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 1.3</strong> <em
28e0: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
28f0: 20 20 20 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 <dd>Enab
2900: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
2910: 2e 33 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c .3 (default is <
2920: 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 em>true</em>)</d
2930: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 d>. </dl>.</b
2940: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 lockquote>..
2950: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
2960: 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 ::unimport"><b>t
2970: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 ls::unimport </b
2980: 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c ><i>channel</i><
2990: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
29a0: 3e 50 72 6f 76 69 64 65 64 20 66 6f 72 20 73 79 >Provided for sy
29b0: 6d 6d 65 74 72 79 20 74 6f 20 3c 73 74 72 6f 6e mmetry to <stron
29c0: 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 g>tls::import</s
29d0: 74 72 6f 6e 67 3e 2c 20 74 68 69 73 0a 20 20 20 trong>, this.
29e0: 20 20 20 75 6e 73 74 61 63 6b 73 20 74 68 65 20 unstacks the
29f0: 53 53 4c 2d 65 6e 61 62 6c 69 6e 67 20 6f 66 20 SSL-enabling of
2a00: 61 20 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68 a regular Tcl ch
2a10: 61 6e 6e 65 6c 2e 20 20 41 6e 20 65 72 72 6f 72 annel. An error
2a20: 0a 20 20 20 20 20 20 69 73 20 74 68 72 6f 77 6e . is thrown
2a30: 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74 20 74 if TLS is not t
2a40: 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64 20 63 he top stacked c
2a50: 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 64 hannel type.</dd
2a60: 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b >. <dt>
2a70: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 </dt>. <dt><a
2a80: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 name="tls::hand
2a90: 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 shake"><strong>t
2aa0: 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 73 ls::handshake</s
2ab0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e trong> <em>chann
2ac0: 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e el</em></a></dt>
2ad0: 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63 65 73 20 . <dd>Forces
2ae0: 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61 6b handshake to tak
2af0: 65 20 70 6c 61 63 65 2c 20 61 6e 64 20 72 65 74 e place, and ret
2b00: 75 72 6e 73 20 30 20 69 66 0a 20 20 20 20 20 20 urns 0 if.
2b10: 20 20 68 61 6e 64 73 68 61 6b 65 20 69 73 20 73 handshake is s
2b20: 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 till in progress
2b30: 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c (non-blocking),
2b40: 20 6f 72 20 31 20 69 66 0a 20 20 20 20 20 20 20 or 1 if.
2b50: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77 the handshake w
2b60: 61 73 20 73 75 63 63 65 73 73 66 75 6c 2e 20 49 as successful. I
2b70: 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 f the handshake
2b80: 66 61 69 6c 65 64 0a 20 20 20 20 20 20 20 20 74 failed. t
2b90: 68 69 73 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c his routine will
2ba0: 20 74 68 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e throw an error.
2bb0: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e </dd>. <dt>&n
2bc0: 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 bsp;</dt>. <d
2bd0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
2be0: 73 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e status"><strong>
2bf0: 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 tls::status</str
2c00: 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 3f 2d 6c ong>. <em>?-l
2c10: 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 ocal? channel</e
2c20: 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 m></a></dt>.
2c30: 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 <dd>Returns the
2c40: 63 75 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f current status o
2c50: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 f the certificat
2c60: 65 20 66 6f 72 20 61 6e 20 53 53 4c 0a 09 63 68 e for an SSL..ch
2c70: 61 6e 6e 65 6c 2e 20 54 68 65 20 72 65 73 75 6c annel. The resul
2c80: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b t is a list of k
2c90: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 ey-value pairs d
2ca0: 65 73 63 72 69 62 69 6e 67 0a 09 74 68 65 20 63 escribing..the c
2cb0: 65 72 74 69 66 69 63 61 74 65 2e 20 49 66 20 74 ertificate. If t
2cc0: 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 6e 20 he result is an
2cd0: 65 6d 70 74 79 20 6c 69 73 74 20 74 68 65 6e 20 empty list then
2ce0: 74 68 65 0a 20 20 20 20 20 20 20 20 53 53 4c 20 the. SSL
2cf0: 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20 6e 6f handshake has no
2d00: 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 64 2e t yet completed.
2d10: 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f If <em>-local</
2d20: 65 6d 3e 20 69 73 0a 09 73 70 65 63 69 66 69 65 em> is..specifie
2d30: 64 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f 63 61 d, then the loca
2d40: 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 l certificate is
2d50: 20 75 73 65 64 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f used.</dd>.<blo
2d60: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c ckquote>..<b>SSL
2d70: 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 Status</b>.
2d80: 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 <dl>. <dt
2d90: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 ><strong>alpn</s
2da0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f trong> <em>proto
2db0: 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 col</em></dt>.
2dc0: 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 70 72 <dd>The pr
2dd0: 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 otocol selected
2de0: 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f after Applicatio
2df0: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c n-Layer Protocol
2e00: 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 74 69 6f .. Negotiatio
2e10: 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 20 n (ALPN).</dd>.
2e20: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f <dt><stro
2e30: 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e ng>cipher</stron
2e40: 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 g> <em>cipher</e
2e50: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
2e60: 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74 20 <dd>The current
2e70: 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 62 65 cipher in use be
2e80: 74 77 65 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 tween the client
2e90: 20 61 6e 64 0a 20 20 20 20 20 20 20 20 20 20 20 and.
2ea0: 20 73 65 72 76 65 72 20 63 68 61 6e 6e 65 6c 73 server channels
2eb0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
2ec0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 65 65 72 6e dt><strong>peern
2ed0: 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ame</strong> <em
2ee0: 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >name</em></dt>.
2ef0: 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 <dd>The
2f00: 70 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68 peername from th
2f10: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f e certificate.</
2f20: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dd>. <dt>
2f30: 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c <strong>protocol
2f40: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 </strong> <em>ve
2f50: 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a rsion</em></dt>.
2f60: 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 <dd>The
2f70: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e protocol version
2f80: 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f used for the co
2f90: 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 53 nnection:.. S
2fa0: 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c SL2, SSL3, TLS1,
2fb0: 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c TLS1.1, TLS1.2,
2fc0: 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e TLS1.3, or unkn
2fd0: 6f 77 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 own.</dd>.
2fe0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 62 <dt><strong>sb
2ff0: 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d its</strong> <em
3000: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 >n</em></dt>.
3010: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 6e 75 6d <dd>The num
3020: 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 ber of bits used
3030: 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e for the session
3040: 20 6b 65 79 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 key.</dd>.
3050: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 <dt><strong>s
3060: 69 67 6e 61 74 75 72 65 48 61 73 68 41 6c 67 6f ignatureHashAlgo
3070: 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c rithm</strong> <
3080: 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d em>algorithm</em
3090: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
30a0: 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 dd>The signature
30b0: 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 2e hash algorithm.
30c0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
30d0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 t><strong>signat
30e0: 75 72 65 5f 74 79 70 65 3c 2f 73 74 72 6f 6e 67 ure_type</strong
30f0: 3e 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 3c > <em>type</em><
3100: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
3110: 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 74 >The signature t
3120: 79 70 65 20 76 61 6c 75 65 2e 3c 2f 64 64 3e 0a ype value.</dd>.
3130: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
3140: 6f 6e 67 3e 76 65 72 69 66 69 63 61 74 69 6f 6e ong>verification
3150: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 72 65 </strong> <em>re
3160: 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 sult</em></dt>.
3170: 20 20 20 20 20 20 20 3c 64 64 3e 43 65 72 74 69 <dd>Certi
3180: 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 ficate verificat
3190: 69 6f 6e 20 72 65 73 75 6c 74 2e 3c 2f 64 64 3e ion result.</dd>
31a0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
31b0: 72 6f 6e 67 3e 63 61 5f 6e 61 6d 65 73 3c 2f 73 rong>ca_names</s
31c0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c trong> <em>list<
31d0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
31e0: 20 20 3c 64 64 3e 4c 69 73 74 20 6f 66 20 74 68 <dd>List of th
31f0: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 e Certificate Au
3200: 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 74 thorities used t
3210: 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 65 72 o create the cer
3220: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 tificate.</dd>.
3230: 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b </dl>.</block
3240: 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f quote>.<blockquo
3250: 74 65 3e 0a 09 3c 62 3e 43 65 72 74 69 66 69 63 te>..<b>Certific
3260: 61 74 65 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 ate Status</b>.
3270: 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 <dl>.
3280: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 6c 3c <dt><strong>all<
3290: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 /strong> <em>str
32a0: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ing</em></dt>.
32b0: 20 20 20 20 20 20 3c 64 64 3e 44 75 6d 70 20 6f <dd>Dump o
32c0: 66 20 61 6c 6c 20 63 65 72 74 69 66 69 63 61 74 f all certificat
32d0: 65 20 69 6e 66 6f 2e 3c 2f 64 64 3e 0a 0a 20 20 e info.</dd>..
32e0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
32f0: 67 3e 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e g>version</stron
3300: 67 3e 20 3c 65 6d 3e 76 61 6c 75 65 3c 2f 65 6d g> <em>value</em
3310: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
3320: 64 64 3e 54 68 65 20 63 65 72 74 69 66 69 63 61 dd>The certifica
3330: 74 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 64 64 3e te version.</dd>
3340: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
3350: 72 6f 6e 67 3e 73 65 72 69 61 6c 4e 75 6d 62 65 rong>serialNumbe
3360: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e r</strong> <em>n
3370: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
3380: 20 20 20 3c 64 64 3e 54 68 65 20 73 65 72 69 61 <dd>The seria
3390: 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 l number of the
33a0: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 certificate as h
33b0: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a ex string.</dd>.
33c0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
33d0: 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 3c 2f 73 ong>signature</s
33e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 trong> <em>algor
33f0: 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 ithm</em></dt>.
3400: 20 20 20 20 20 20 20 3c 64 64 3e 43 69 70 68 65 <dd>Ciphe
3410: 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 r algorithm used
3420: 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 for certificate
3430: 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e signature.</dd>
3440: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
3450: 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73 74 72 rong>issuer</str
3460: 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e ong> <em>dn</em>
3470: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
3480: 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 d>The distinguis
3490: 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 hed name (DN) of
34a0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
34b0: 20 69 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 20 20 issuer.</dd>.
34c0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
34d0: 67 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72 g>notBefore</str
34e0: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 ong> <em>date</e
34f0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
3500: 3c 64 64 3e 54 68 65 20 62 65 67 69 6e 20 64 61 <dd>The begin da
3510: 74 65 20 66 6f 72 20 74 68 65 20 76 61 6c 69 64 te for the valid
3520: 69 74 79 20 6f 66 20 74 68 65 20 63 65 72 74 69 ity of the certi
3530: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 ficate.</dd>.
3540: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
3550: 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72 6f 6e >notAfter</stron
3560: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e g> <em>date</em>
3570: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
3580: 64 3e 54 68 65 20 65 78 70 69 72 61 74 69 6f 6e d>The expiration
3590: 20 64 61 74 65 20 66 6f 72 20 74 68 65 20 63 65 date for the ce
35a0: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
35b0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
35c0: 6f 6e 67 3e 73 75 62 6a 65 63 74 3c 2f 73 74 72 ong>subject</str
35d0: 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e ong> <em>dn</em>
35e0: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
35f0: 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 d>The distinguis
3600: 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 hed name (DN) of
3610: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
3620: 20 73 75 62 6a 65 63 74 2e 0a 09 20 20 20 20 46 subject... F
3630: 69 65 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20 43 ields include: C
3640: 6f 6d 6d 6f 6e 20 4e 61 6d 65 20 28 43 4e 29 2c ommon Name (CN),
3650: 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f Organization (O
3660: 29 2c 20 4c 6f 63 61 6c 69 74 79 0a 09 20 20 20 ), Locality..
3670: 20 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 or City (L), St
3680: 61 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 ate or Province
3690: 28 53 29 2c 20 61 6e 64 20 43 6f 75 6e 74 72 79 (S), and Country
36a0: 20 4e 61 6d 65 20 28 43 29 2e 3c 2f 64 64 3e 0a Name (C).</dd>.
36b0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
36c0: 72 6f 6e 67 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 rong>num_extensi
36d0: 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ons</strong> <em
36e0: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 >n</em></dt>.
36f0: 20 20 20 20 20 3c 64 64 3e 4e 75 6d 62 65 72 20 <dd>Number
3700: 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 65 of certificate e
3710: 78 74 65 6e 73 69 6f 6e 73 2e 3c 2f 64 64 3e 0a xtensions.</dd>.
3720: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
3730: 6f 6e 67 3e 65 78 74 65 6e 73 69 6f 6e 73 3c 2f ong>extensions</
3740: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 strong> <em>list
3750: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
3760: 20 20 20 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 <dd>List of c
3770: 65 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e ertificate exten
3780: 73 69 6f 6e 20 6e 61 6d 65 73 2e 3c 2f 64 64 3e sion names.</dd>
3790: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
37a0: 72 6f 6e 67 3e 73 75 62 6a 65 63 74 4b 65 79 49 rong>subjectKeyI
37b0: 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e dentifier</stron
37c0: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
37d0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
37e0: 3c 64 64 3e 48 61 73 68 20 6f 66 20 74 68 65 20 <dd>Hash of the
37f0: 70 75 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 public key insid
3800: 65 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 e the certificat
3810: 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 e.</dd>.
3820: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a <dt><strong>subj
3830: 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f ectAltName</stro
3840: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d ng> <em>list</em
3850: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
3860: 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f dd>List of all o
3870: 66 20 74 68 65 20 61 6c 74 65 72 6e 61 74 69 76 f the alternativ
3880: 65 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 e domain names,
3890: 73 75 62 20 64 6f 6d 61 69 6e 73 2c 0a 09 20 20 sub domains,..
38a0: 20 20 61 6e 64 20 49 50 20 61 64 64 72 65 73 73 and IP address
38b0: 65 73 20 74 68 61 74 20 61 72 65 20 73 65 63 75 es that are secu
38c0: 72 65 64 20 62 79 20 74 68 65 20 63 65 72 74 69 red by the certi
38d0: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 0a 09 3c ficate.</dd>...<
38e0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 65 72 74 69 dt><strong>certi
38f0: 66 69 63 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 ficate</strong>
3900: 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 3c 2f 64 <em>cert</em></d
3910: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 t>. <dd>T
3920: 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 he PEM encoded c
3930: 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e ertificate.</dd>
3940: 0a 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 .. <dt><s
3950: 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 44 trong>signatureD
3960: 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c igest</strong> <
3970: 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c em>version</em><
3980: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
3990: 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 >Certificate sig
39a0: 6e 69 6e 67 20 64 69 67 65 73 74 2e 3c 2f 64 64 ning digest.</dd
39b0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
39c0: 74 72 6f 6e 67 3e 70 75 62 6c 69 63 4b 65 79 41 trong>publicKeyA
39d0: 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 lgorithm</strong
39e0: 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c > <em>algorithm<
39f0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
3a00: 20 20 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 <dd>Certificat
3a10: 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c e signature publ
3a20: 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d ic key algorithm
3a30: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
3a40: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 dt><strong>publi
3a50: 63 4b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 cKey</strong> <e
3a60: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 m>string</em></d
3a70: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 43 t>. <dd>C
3a80: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
3a90: 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 ture public key
3aa0: 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f as hex string.</
3ab0: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dd>. <dt>
3ac0: 3c 73 74 72 6f 6e 67 3e 62 69 74 73 3c 2f 73 74 <strong>bits</st
3ad0: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e rong> <em>n</em>
3ae0: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
3af0: 64 3e 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 d>Number of bits
3b00: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 used for certif
3b10: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
3b20: 6b 65 79 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 key</dd>.
3b30: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 6c <dt><strong>sel
3b40: 66 5f 73 69 67 6e 65 64 3c 2f 73 74 72 6f 6e 67 f_signed</strong
3b50: 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 > <em>boolean</e
3b60: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
3b70: 3c 64 64 3e 49 73 20 63 65 72 74 69 66 69 63 61 <dd>Is certifica
3b80: 74 65 20 73 69 67 6e 61 74 75 72 65 20 73 65 6c te signature sel
3b90: 66 20 73 69 67 6e 65 64 2e 3c 2f 64 64 3e 0a 0a f signed.</dd>..
3ba0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 <dt><str
3bb0: 6f 6e 67 3e 73 68 61 31 5f 68 61 73 68 3c 2f 73 ong>sha1_hash</s
3bc0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c trong> <em>hash<
3bd0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 /em></dt>.
3be0: 20 20 3c 64 64 3e 54 68 65 20 53 48 41 31 20 68 <dd>The SHA1 h
3bf0: 61 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 ash of the certi
3c00: 66 69 63 61 74 65 20 61 73 20 68 65 78 20 73 74 ficate as hex st
3c10: 72 69 6e 67 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 ring.</dd>.
3c20: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 <dt><strong>s
3c30: 68 61 32 35 36 5f 68 61 73 68 3c 2f 73 74 72 6f ha256_hash</stro
3c40: 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d ng> <em>hash</em
3c50: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
3c60: 64 64 3e 54 68 65 20 53 48 41 32 35 36 20 68 61 dd>The SHA256 ha
3c70: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 sh of the certif
3c80: 69 63 61 74 65 20 61 73 20 68 65 78 20 73 74 72 icate as hex str
3c90: 69 6e 67 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f ing.</dd>. </
3ca0: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 dl>.</blockquote
3cb0: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 >.. <dt><a na
3cc0: 6d 65 3d 22 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 me="tls::connect
3cd0: 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 ion"><strong>tls
3ce0: 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 73 74 ::connection</st
3cf0: 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 63 68 rong>. <em>ch
3d00: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f annel</em></a></
3d10: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 dt>. <dd>Retu
3d20: 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 rns the current
3d30: 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 61 74 75 connection statu
3d40: 73 20 6f 66 20 61 6e 20 53 53 4c 20 63 68 61 6e s of an SSL chan
3d50: 6e 65 6c 2e 20 54 68 65 0a 20 20 20 20 20 20 20 nel. The.
3d60: 20 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 result is a lis
3d70: 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 t of key-value p
3d80: 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 airs describing
3d90: 74 68 65 0a 20 20 20 20 20 20 20 20 63 6f 6e 6e the. conn
3da0: 65 63 74 65 64 20 70 65 65 72 2e 3c 2f 64 64 3e ected peer.</dd>
3db0: 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c .<blockquote>..<
3dc0: 62 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f 62 3e b>SSL Status</b>
3dd0: 0a 20 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20 . <dl>.
3de0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 <dt><strong>st
3df0: 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ate</strong> <em
3e00: 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e >state</em></dt>
3e10: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 74 61 . <dd>Sta
3e20: 74 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 te of the connec
3e30: 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 tion.</dd>.
3e40: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 <dt><strong>s
3e50: 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e ervername</stron
3e60: 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e g> <em>name</em>
3e70: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dt>. <d
3e80: 64 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 d>The name of th
3e90: 65 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 e connected to s
3ea0: 65 72 76 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 erver.</dd>.
3eb0: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
3ec0: 70 72 6f 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 protocol</strong
3ed0: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 > <em>version</e
3ee0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
3ef0: 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c <dd>The protocol
3f00: 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f version used fo
3f10: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e r the connection
3f20: 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c :.. SSL2, SSL
3f30: 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 3, TLS1, TLS1.1,
3f40: 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c TLS1.2, TLS1.3,
3f50: 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 or unknown.</dd
3f60: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 >. <dt><s
3f70: 74 72 6f 6e 67 3e 72 65 6e 65 67 6f 74 69 61 74 trong>renegotiat
3f80: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ion</strong> <em
3f90: 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e >state</em></dt>
3fa0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 57 68 65 . <dd>Whe
3fb0: 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 72 65 ther protocol re
3fc0: 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 20 73 negotiation is s
3fd0: 75 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f 74 2e upported or not.
3fe0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
3ff0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 75 72 69 t><strong>securi
4000: 74 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e tylevel</strong>
4010: 20 3c 65 6d 3e 6c 65 76 65 6c 3c 2f 65 6d 3e 3c <em>level</em><
4020: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
4030: 3e 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 >The security le
4040: 76 65 6c 20 75 73 65 64 20 66 6f 72 20 73 65 6c vel used for sel
4050: 65 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 ection of cipher
4060: 73 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 s, key size, etc
4070: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c .</dd>. <
4080: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 dt><strong>sessi
4090: 6f 6e 5f 72 65 75 73 65 64 3c 2f 73 74 72 6f 6e on_reused</stron
40a0: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f g> <em>boolean</
40b0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
40c0: 20 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 <dd>Whether the
40d0: 20 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65 session has bee
40e0: 6e 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e n reused or not.
40f0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
4100: 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 5f 73 65 72 t><strong>is_ser
4110: 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ver</strong> <em
4120: 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 >boolean</em></d
4130: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 57 t>. <dd>W
4140: 68 65 74 68 65 72 20 74 68 65 20 63 6f 6e 6e 65 hether the conne
4150: 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 64 ction configured
4160: 20 61 73 20 61 20 73 65 72 76 65 72 20 6f 72 20 as a server or
4170: 63 6c 69 65 6e 74 20 28 66 61 6c 73 65 29 2e 3c client (false).<
4180: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
4190: 3e 3c 73 74 72 6f 6e 67 3e 63 6f 6d 70 72 65 73 ><strong>compres
41a0: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 sion</strong> <e
41b0: 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>mode</em></dt>
41c0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 43 6f 6d . <dd>Com
41d0: 70 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64 2e pression method.
41e0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
41f0: 74 3e 3c 73 74 72 6f 6e 67 3e 65 78 70 61 6e 73 t><strong>expans
4200: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ion</strong> <em
4210: 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >mode</em></dt>.
4220: 20 20 20 20 20 20 20 20 3c 64 64 3e 45 78 70 61 <dd>Expa
4230: 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 nsion method.</d
4240: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 d>. </dl>.</b
4250: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 lockquote>.<bloc
4260: 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 69 70 68 kquote>..<b>Ciph
4270: 65 72 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 20 er Info</b>.
4280: 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 <dl>. <dt
4290: 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65 72 3c ><strong>cipher<
42a0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 /strong> <em>cip
42b0: 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 her</em></dt>.
42c0: 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 63 75 <dd>The cu
42d0: 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 rrent cipher in
42e0: 75 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e use for the conn
42f0: 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 ection.</dd>.
4300: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
4310: 3e 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f >standard_name</
4320: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 strong> <em>name
4330: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 </em></dt>.
4340: 20 20 20 3c 64 64 3e 54 68 65 20 73 74 61 6e 64 <dd>The stand
4350: 61 72 64 20 52 46 43 20 6e 61 6d 65 20 6f 66 20 ard RFC name of
4360: 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 cipher.</dd>.
4370: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
4380: 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c >bits</strong> <
4390: 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 em>n</em></dt>.
43a0: 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 6e <dd>The n
43b0: 75 6d 62 65 72 20 6f 66 20 70 72 6f 63 65 73 73 umber of process
43c0: 65 64 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 ed bits used for
43d0: 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 20 cipher.</dd>.
43e0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e <dt><stron
43f0: 67 3e 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 73 g>secret_bits</s
4400: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d trong> <em>n</em
4410: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c ></dt>. <
4420: 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 dd>The number of
4430: 20 73 65 63 72 65 74 20 62 69 74 73 20 75 73 65 secret bits use
4440: 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64 d for cipher.</d
4450: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
4460: 73 74 72 6f 6e 67 3e 6d 69 6e 5f 76 65 72 73 69 strong>min_versi
4470: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e on</strong> <em>
4480: 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 version</em></dt
4490: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 >. <dd>Th
44a0: 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 e minimum protoc
44b0: 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 ol version for c
44c0: 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 ipher.</dd>.
44d0: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
44e0: 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e id</strong> <em>
44f0: 69 64 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 id</em></dt>.
4500: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 4f 70 65 <dd>The Ope
4510: 6e 53 53 4c 20 63 69 70 68 65 72 20 69 64 2e 3c nSSL cipher id.<
4520: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 /dd>. <dt
4530: 3e 3c 73 74 72 6f 6e 67 3e 64 65 73 63 72 69 70 ><strong>descrip
4540: 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 tion</strong> <e
4550: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 m>string</em></d
4560: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 41 t>. <dd>A
4570: 20 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f text descriptio
4580: 6e 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 2e n of the cipher.
4590: 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a </dd>. </dl>.
45a0: 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 </blockquote>.<b
45b0: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 lockquote>..<b>S
45c0: 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f 62 3e 0a ession Info</b>.
45d0: 20 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20 20 <dl>.
45e0: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 <dt><strong>alp
45f0: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 n</strong> <em>p
4600: 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 rotocol</em></dt
4610: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 >. <dd>Th
4620: 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 e protocol selec
4630: 74 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 ted after Applic
4640: 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 ation-Layer Prot
4650: 6f 63 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 ocol.. Negoti
4660: 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 ation (ALPN).</d
4670: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c d>. <dt><
4680: 73 74 72 6f 6e 67 3e 72 65 73 75 6d 61 62 6c 65 strong>resumable
4690: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
46a0: 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a olean</em></dt>.
46b0: 20 20 20 20 20 20 20 20 3c 64 64 3e 43 61 6e 20 <dd>Can
46c0: 74 68 65 20 73 65 73 73 69 6f 6e 20 62 65 20 72 the session be r
46d0: 65 73 75 6d 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f esumed or not.</
46e0: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e dd>. <dt>
46f0: 3c 73 74 72 6f 6e 67 3e 73 74 61 72 74 5f 74 69 <strong>start_ti
4700: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e me</strong> <em>
4710: 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 seconds</em></dt
4720: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 69 >. <dd>Ti
4730: 6d 65 20 73 69 6e 63 65 20 73 65 73 73 69 6f 6e me since session
4740: 20 73 74 61 72 74 65 64 20 69 6e 20 73 65 63 6f started in seco
4750: 6e 64 73 20 73 69 6e 63 65 20 65 70 6f 63 68 2e nds since epoch.
4760: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
4770: 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 6d 65 6f 75 t><strong>timeou
4780: 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 t</strong> <em>s
4790: 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e econds</em></dt>
47a0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 4d 61 78 . <dd>Max
47b0: 20 64 75 72 61 74 69 6f 6e 20 6f 66 20 73 65 73 duration of ses
47c0: 73 69 6f 6e 20 69 6e 20 73 65 63 6f 6e 64 73 20 sion in seconds
47d0: 62 65 66 6f 72 65 20 74 69 6d 65 2d 6f 75 74 2e before time-out.
47e0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
47f0: 74 3e 3c 73 74 72 6f 6e 67 3e 6c 69 66 65 74 69 t><strong>lifeti
4800: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e me</strong> <em>
4810: 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 seconds</em></dt
4820: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 65 >. <dd>Se
4830: 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 6c 69 66 ssion ticket lif
4840: 65 74 69 6d 65 20 68 69 6e 74 20 69 6e 20 73 65 etime hint in se
4850: 63 6f 6e 64 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 conds.</dd>.
4860: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
4870: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f session_id</stro
4880: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ng> <em>string</
4890: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 em></dt>.
48a0: 20 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 <dd>Unique sess
48b0: 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69 ion id for use i
48c0: 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 n resuming the s
48d0: 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 ession.</dd>.
48e0: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 <dt><strong
48f0: 3e 73 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c >session_ticket<
4900: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 /strong> <em>str
4910: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 ing</em></dt>.
4920: 20 20 20 20 20 20 3c 64 64 3e 55 6e 69 71 75 65 <dd>Unique
4930: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 session ticket
4940: 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d for use in resum
4950: 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e ing the session.
4960: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 </dd>. <d
4970: 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 63 6b 65 74 t><strong>ticket
4980: 5f 61 70 70 5f 64 61 74 61 3c 2f 73 74 72 6f 6e _app_data</stron
4990: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
49a0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 m></dt>.
49b0: 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69 <dd>Unique sessi
49c0: 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c 69 63 on ticket applic
49d0: 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 64 64 3e ation data.</dd>
49e0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
49f0: 72 6f 6e 67 3e 6d 61 73 74 65 72 5f 6b 65 79 3c rong>master_key<
4a00: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e /strong> <em>bin
4a10: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c ary_string</em><
4a20: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 /dt>. <dd
4a30: 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 >Unique session
4a40: 6d 61 73 74 65 72 20 6b 65 79 2e 3c 2f 64 64 3e master key.</dd>
4a50: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 . <dt><st
4a60: 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 63 61 63 rong>session_cac
4a70: 68 65 5f 6d 6f 64 65 3c 2f 73 74 72 6f 6e 67 3e he_mode</strong>
4a80: 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f <em>mode</em></
4a90: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e dt>. <dd>
4aa0: 53 65 72 76 65 72 20 63 61 63 68 65 20 6d 6f 64 Server cache mod
4ab0: 65 20 28 63 6c 69 65 6e 74 2c 20 73 65 72 76 65 e (client, serve
4ac0: 72 2c 20 6f 72 20 62 6f 74 68 29 2e 3c 2f 64 64 r, or both).</dd
4ad0: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c >. </dl>.</bl
4ae0: 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c ockquote>.. <
4af0: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
4b00: 3a 63 69 70 68 65 72 73 22 3e 3c 73 74 72 6f 6e :ciphers"><stron
4b10: 67 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f g>tls::ciphers</
4b20: 73 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e strong>. <em>
4b30: 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 protocol ?verbos
4b40: 65 3f 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f e? ?supported?</
4b50: 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 em></a></dt>.
4b60: 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c <dd>Returns a l
4b70: 69 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 ist of supported
4b80: 20 63 69 70 68 65 72 73 20 61 76 61 69 6c 61 62 ciphers availab
4b90: 6c 65 20 66 6f 72 20 3c 65 6d 3e 70 72 6f 74 6f le for <em>proto
4ba0: 63 6f 6c 3c 2f 65 6d 3e 2c 0a 20 20 20 20 20 20 col</em>,.
4bb0: 20 20 77 68 65 72 65 20 70 72 6f 74 6f 63 6f 6c where protocol
4bc0: 20 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 must be one of
4bd0: 3c 62 3e 73 73 6c 32 2c 20 73 73 6c 33 2c 20 74 <b>ssl2, ssl3, t
4be0: 6c 73 31 2c 20 74 6c 73 31 2e 31 2c 0a 09 74 6c ls1, tls1.1,..tl
4bf0: 73 31 2e 32 2c 3c 2f 62 3e 20 6f 72 20 3c 62 3e s1.2,</b> or <b>
4c00: 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 49 66 20 3c tls1.3</b>. If <
4c10: 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 6d 3e 20 em>verbose</em>
4c20: 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73 0a is specified as.
4c30: 09 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 72 .true then a ver
4c40: 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 64 bose, human read
4c50: 61 62 6c 65 20 6c 69 73 74 20 69 73 20 72 65 74 able list is ret
4c60: 75 72 6e 65 64 20 77 69 74 68 0a 09 61 64 64 69 urned with..addi
4c70: 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 69 tional informati
4c80: 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 72 on on the cipher
4c90: 2e 20 49 66 20 3c 65 6d 3e 73 75 70 70 6f 72 74 . If <em>support
4ca0: 65 64 3c 2f 65 6d 3e 0a 09 69 73 20 73 70 65 63 ed</em>..is spec
4cb0: 69 66 69 65 64 20 61 73 20 74 72 75 65 2c 20 74 ified as true, t
4cc0: 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 70 hen only the cip
4cd0: 68 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 66 hers supported f
4ce0: 6f 72 20 70 72 6f 74 6f 63 6f 6c 0a 09 77 69 6c or protocol..wil
4cf0: 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f 64 64 l be listed.</dd
4d00: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 >.. <dt><a na
4d10: 6d 65 3d 22 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f me="tls::protoco
4d20: 6c 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a ls"><strong>tls:
4d30: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f :protocols</stro
4d40: 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 ng></a></dt>.
4d50: 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c <dd>Returns a l
4d60: 69 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 ist of supported
4d70: 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69 protocols. Vali
4d80: 64 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 09 3c d values are:..<
4d90: 62 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e 73 b>ssl2</b>, <b>s
4da0: 73 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 sl3</b>, <b>tls1
4db0: 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 3c </b>, <b>tls1.1<
4dc0: 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c 2f /b>, <b>tls1.2</
4dd0: 62 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 31 b>,..and <b>tls1
4de0: 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69 .3</b>. Exact li
4df0: 73 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 st depends on Op
4e00: 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e enSSL version an
4e10: 64 0a 09 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 d..compile time
4e20: 66 6c 61 67 73 2e 3c 2f 64 64 3e 0a 0a 20 20 20 flags.</dd>..
4e30: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
4e40: 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 73 74 72 s::version"><str
4e50: 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e ong>tls::version
4e60: 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 </strong></a></d
4e70: 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 t>. <dd>Retur
4e80: 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 76 ns the OpenSSL v
4e90: 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c 2f ersion string.</
4ea0: 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 33 3e 3c dd>.</dl>..<h3><
4eb0: 61 20 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43 4b a name="CALLBACK
4ec0: 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 OPTIONS">CALLBA
4ed0: 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c 2f CK OPTIONS</a></
4ee0: 68 33 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64 69 h3>..<p>.As indi
4ef0: 63 61 74 65 64 20 61 62 6f 76 65 2c 20 69 6e 64 cated above, ind
4f00: 69 76 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c 73 ividual channels
4f10: 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 can be given th
4f20: 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b eir own callback
4f30: 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 s.to handle inte
4f40: 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 rmediate process
4f50: 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 ing by the OpenS
4f60: 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e SL library, usin
4f70: 67 20 74 68 65 0a 3c 65 6d 3e 2d 63 6f 6d 6d 61 g the.<em>-comma
4f80: 6e 64 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e nd</em> and <em>
4f90: 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f -password</em> o
4fa0: 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20 74 6f ptions passed to
4fb0: 20 65 69 74 68 65 72 20 6f 66 0a 3c 73 74 72 6f either of.<stro
4fc0: 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f ng>tls::socket</
4fd0: 73 74 72 6f 6e 67 3e 20 6f 72 20 3c 73 74 72 6f strong> or <stro
4fe0: 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f ng>tls::import</
4ff0: 73 74 72 6f 6e 67 3e 2e 0a 3c 2f 70 3e 0a 0a 3c strong>..</p>..<
5000: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 64 6c 3e blockquote>.<dl>
5010: 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e .. <dt><stron
5020: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f g>-command</stro
5030: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ng> <em>callback
5040: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c </em></dt>. <
5050: 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 dd>..Invokes the
5060: 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 specified <em>c
5070: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 allback</em> scr
5080: 69 70 74 20 61 74 0a 09 73 65 76 65 72 61 6c 20 ipt at..several
5090: 70 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 points during th
50a0: 65 20 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 e OpenSSL handsh
50b0: 61 6b 65 2e 0a 09 45 78 63 65 70 74 20 61 73 20 ake...Except as
50c0: 69 6e 64 69 63 61 74 65 64 20 62 65 6c 6f 77 2c indicated below,
50d0: 20 76 61 6c 75 65 73 20 72 65 74 75 72 6e 65 64 values returned
50e0: 20 66 72 6f 6d 20 74 68 65 0a 09 63 61 6c 6c 62 from the..callb
50f0: 61 63 6b 20 61 72 65 20 69 67 6e 6f 72 65 64 2e ack are ignored.
5100: 0a 09 41 72 67 75 6d 65 6e 74 73 20 61 70 70 65 ..Arguments appe
5110: 6e 64 65 64 20 74 6f 20 74 68 65 20 73 63 72 69 nded to the scri
5120: 70 74 20 75 70 6f 6e 20 63 61 6c 6c 62 61 63 6b pt upon callback
5130: 20 74 61 6b 65 20 6f 6e 65 20 6f 66 20 74 68 65 take one of the
5140: 0a 09 66 6f 6c 6c 6f 77 69 6e 67 20 66 6f 72 6d ..following form
5150: 73 3a 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e 0a s:...<br>..<br>.
5160: 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09 20 ..<dl>...<dt>..
5170: 20 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 <strong>alpn</s
5180: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f trong> <em>proto
5190: 63 6f 6c 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a col</em>..</dt>.
51a0: 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 .<dd>.. For ser
51b0: 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 vers, this form
51c0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
51d0: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 nvoked when the
51e0: 63 6c 69 65 6e 74 20 41 4c 50 4e 0a 09 20 20 68 client ALPN.. h
51f0: 65 61 64 65 72 20 69 73 20 72 65 63 65 69 76 65 eader is receive
5200: 64 20 61 6e 64 20 74 68 65 20 66 69 72 73 74 20 d and the first
5210: 3c 62 3e 2d 61 6c 70 6e 3c 2f 62 3e 20 73 70 65 <b>-alpn</b> spe
5220: 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 cified protocol
5230: 63 6f 6d 6d 6f 6e 0a 09 20 20 74 6f 20 74 68 65 common.. to the
5240: 20 62 6f 74 68 20 74 68 65 20 63 6c 69 65 6e 74 both the client
5250: 20 61 6e 64 20 73 65 72 76 65 72 20 69 73 20 73 and server is s
5260: 65 6c 65 63 74 65 64 2e 20 49 66 20 6e 6f 6e 65 elected. If none
5270: 2c 20 74 68 65 20 66 69 72 73 74 0a 09 20 20 63 , the first.. c
5280: 6c 69 65 6e 74 20 73 70 65 63 69 66 69 65 64 20 lient specified
5290: 70 72 6f 74 6f 63 6f 6c 20 69 73 20 75 73 65 64 protocol is used
52a0: 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a ...</dd>...<br>.
52b0: 0a 3c 21 2d 2d 09 54 68 69 73 20 66 6f 72 6d 20 .<!--.This form
52c0: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 64 of callback is d
52d0: 69 73 61 62 6c 65 64 2e 0a 0a 09 3c 64 74 3e 0a isabled....<dt>.
52e0: 09 20 20 3c 73 74 72 6f 6e 67 3e 65 72 72 6f 72 . <strong>error
52f0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
5300: 61 6e 6e 65 6c 20 6d 65 73 73 61 67 65 3c 2f 65 annel message</e
5310: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a m>..</dt>..<dd>.
5320: 09 20 20 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 . The <em>messa
5330: 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 ge</em> argument
5340: 20 63 6f 6e 74 61 69 6e 73 20 61 6e 20 65 72 72 contains an err
5350: 6f 72 20 6d 65 73 73 61 67 65 20 67 65 6e 65 72 or message gener
5360: 61 74 65 64 0a 09 20 20 62 79 20 74 68 65 20 4f ated.. by the O
5370: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a penSSL function.
5380: 09 20 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65 61 . <code>ERR_rea
5390: 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 son_error_string
53a0: 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f 64 64 ()</code>...</dd
53b0: 3e 0a 0a 09 3c 62 72 3e 0a 2d 2d 3e 0a 0a 09 3c >...<br>.-->...<
53c0: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 68 dt>.. <strong>h
53d0: 65 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ello</strong> <e
53e0: 6d 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d m>servername</em
53f0: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 >..</dt>..<dd>..
5400: 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 For servers, t
5410: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c his form of call
5420: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 back is invoked
5430: 64 75 72 69 6e 67 20 63 6c 69 65 6e 74 20 68 65 during client he
5440: 6c 6c 6f 0a 09 20 20 6d 65 73 73 61 67 65 20 70 llo.. message p
5450: 72 6f 63 65 73 73 69 6e 67 2e 0a 09 3c 2f 64 64 rocessing...</dd
5460: 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a >...<br>...<dt>.
5470: 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e 66 6f 3c . <strong>info<
5480: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 /strong> <em>cha
5490: 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 6e 6f 72 nnel major minor
54a0: 20 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 3c message</em>..<
54b0: 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 /dt>..<dd>.. Th
54c0: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 is form of callb
54d0: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 ack is invoked b
54e0: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 y the OpenSSL fu
54f0: 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e nction.. <code>
5500: 53 53 4c 5f 43 54 58 5f 73 65 74 5f 69 6e 66 6f SSL_CTX_set_info
5510: 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 63 6f 64 _callback()</cod
5520: 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54 e>... <br>.. T
5530: 68 65 20 3c 65 6d 3e 6d 61 6a 6f 72 3c 2f 65 6d he <em>major</em
5540: 3e 20 61 6e 64 20 3c 65 6d 3e 6d 69 6e 6f 72 3c > and <em>minor<
5550: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 73 20 61 /em> arguments a
5560: 72 65 20 75 73 65 64 20 74 6f 0a 09 20 20 72 65 re used to.. re
5570: 70 72 65 73 65 6e 74 20 74 68 65 20 73 74 61 74 present the stat
5580: 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 62 69 e information bi
5590: 74 6d 61 73 6b 2e 0a 09 20 20 3c 64 6c 3e 0a 09 tmask... <dl>..
55a0: 20 20 3c 64 74 3e 50 6f 73 73 69 62 6c 65 20 76 <dt>Possible v
55b0: 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 alues for <em>ma
55c0: 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 3c 2f 64 jor</em> are:</d
55d0: 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 6f 64 65 3e t>.. <dd><code>
55e0: 68 61 6e 64 73 68 61 6b 65 2c 20 61 6c 65 72 74 handshake, alert
55f0: 2c 20 63 6f 6e 6e 65 63 74 2c 20 61 63 63 65 70 , connect, accep
5600: 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 64 3e 0a 09 t</code>.</dd>..
5610: 20 20 3c 64 74 3e 50 6f 73 73 69 62 6c 65 20 76 <dt>Possible v
5620: 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 69 alues for <em>mi
5630: 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 3c 2f 64 nor</em> are:</d
5640: 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 6f 64 65 3e t>.. <dd><code>
5650: 73 74 61 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61 start, done, rea
5660: 64 2c 20 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 d, write, loop,
5670: 65 78 69 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 64 exit</code>.</dd
5680: 3e 0a 09 20 20 3c 2f 64 6c 3e 0a 09 20 20 54 68 >.. </dl>.. Th
5690: 65 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 e <em>message</e
56a0: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 m> argument is a
56b0: 20 64 65 73 63 72 69 70 74 69 76 65 20 73 74 72 descriptive str
56c0: 69 6e 67 20 77 68 69 63 68 20 6d 61 79 0a 09 20 ing which may..
56d0: 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 65 69 be generated ei
56e0: 74 68 65 72 20 62 79 0a 09 20 20 3c 63 6f 64 65 ther by.. <code
56f0: 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 72 69 6e >SSL_state_strin
5700: 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e 20 g_long()</code>
5710: 6f 72 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e 53 or by.. <code>S
5720: 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f 73 74 SL_alert_desc_st
5730: 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 ring_long()</cod
5740: 65 3e 2c 0a 09 20 20 64 65 70 65 6e 64 69 6e 67 e>,.. depending
5750: 20 6f 6e 20 63 6f 6e 74 65 78 74 2e 0a 09 3c 2f on context...</
5760: 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 dd>...<br>...<dt
5770: 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 73 65 73 >.. <strong>ses
5780: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 sion</strong> <e
5790: 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 20 74 69 63 m>session_id tic
57a0: 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f 65 6d ket lifetime</em
57b0: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 >..</dt>..<dd>..
57c0: 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 This form of c
57d0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
57e0: 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 ed by the OpenSS
57f0: 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 L function.. <c
5800: 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 73 73 ode>SSL_CTX_sess
5810: 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f 63 _set_new_cb()</c
5820: 6f 64 65 3e 2e 0a 09 20 20 57 68 65 72 65 20 3c ode>... Where <
5830: 65 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 65 em>session_id</e
5840: 6d 3e 20 69 73 20 74 68 65 20 63 75 72 72 65 6e m> is the curren
5850: 74 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 t session identi
5860: 66 69 65 72 2c 0a 09 20 20 3c 65 6d 3e 74 69 63 fier,.. <em>tic
5870: 6b 65 74 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 ket</em> is the
5880: 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 69 session ticket i
5890: 6e 66 6f 2c 20 61 6e 64 20 3c 65 6d 3e 6c 69 66 nfo, and <em>lif
58a0: 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 20 20 69 73 etime</em>.. is
58b0: 20 74 68 65 20 74 68 65 20 74 69 63 6b 65 74 20 the the ticket
58c0: 6c 69 66 65 74 69 6d 65 20 69 6e 20 73 65 63 6f lifetime in seco
58d0: 6e 64 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 nds...</dd>...<b
58e0: 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 r>...<dt>.. <st
58f0: 72 6f 6e 67 3e 73 6e 69 3c 2f 73 74 72 6f 6e 67 rong>sni</strong
5900: 3e 20 3c 65 6d 3e 73 65 72 76 65 72 6e 61 6d 65 > <em>servername
5910: 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 </em>..</dt>..<d
5920: 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72 d>.. For server
5930: 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 s, this form of
5940: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
5950: 6b 65 64 20 77 68 65 6e 20 74 68 65 20 53 4e 49 ked when the SNI
5960: 20 68 65 61 64 65 72 0a 09 20 20 66 72 6f 6d 20 header.. from
5970: 74 68 65 20 63 6c 69 65 6e 74 20 69 73 20 72 65 the client is re
5980: 63 65 69 76 65 64 2e 20 57 68 65 72 65 20 3c 69 ceived. Where <i
5990: 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 69 3e 20 >servername</i>
59a0: 69 73 20 74 68 65 20 63 6c 69 65 6e 74 0a 09 20 is the client..
59b0: 20 73 70 65 63 69 66 69 65 64 20 73 65 72 76 65 specified serve
59c0: 72 6e 61 6d 65 2e 20 54 68 69 73 20 69 73 20 75 rname. This is u
59d0: 73 65 64 20 77 68 65 6e 20 61 20 73 65 72 76 65 sed when a serve
59e0: 72 20 73 75 70 70 6f 72 74 73 20 6d 75 6c 74 69 r supports multi
59f0: 70 6c 65 0a 09 20 20 6e 61 6d 65 73 2c 20 73 6f ple.. names, so
5a00: 20 74 68 65 20 72 69 67 68 74 20 63 65 72 74 69 the right certi
5a10: 66 69 63 61 74 65 20 63 61 6e 20 62 65 20 75 73 ficate can be us
5a20: 65 64 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 ed...</dd>...<br
5a30: 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 >..<br>...<dt>..
5a40: 20 20 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 <strong>verify
5a50: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
5a60: 61 6e 6e 65 6c 20 64 65 70 74 68 20 63 65 72 74 annel depth cert
5a70: 20 73 74 61 74 75 73 20 65 72 72 6f 72 3c 2f 65 status error</e
5a80: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a m>..</dt>..<dd>.
5a90: 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 . This form of
5aa0: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
5ab0: 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c 20 77 ked by OpenSSL w
5ac0: 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74 69 66 hen a new certif
5ad0: 69 63 61 74 65 0a 09 20 20 69 73 20 72 65 63 65 icate.. is rece
5ae0: 69 76 65 64 20 66 72 6f 6d 20 74 68 65 20 70 65 ived from the pe
5af0: 65 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74 68 er. It allows th
5b00: 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 65 63 e client to chec
5b10: 6b 20 74 68 65 0a 09 20 20 63 65 72 74 69 66 69 k the.. certifi
5b20: 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f cate verificatio
5b30: 6e 20 72 65 73 75 6c 74 20 61 6e 64 20 63 68 6f n result and cho
5b40: 6f 73 65 20 77 68 65 74 68 65 72 20 74 6f 20 63 ose whether to c
5b50: 6f 6e 74 69 6e 75 65 20 6f 72 20 6e 6f 74 2e 0a ontinue or not..
5b60: 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c . <br>.. The <
5b70: 65 6d 3e 64 65 70 74 68 3c 2f 65 6d 3e 20 61 72 em>depth</em> ar
5b80: 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 69 6e 74 gument is an int
5b90: 65 67 65 72 20 72 65 70 72 65 73 65 6e 74 69 6e eger representin
5ba0: 67 20 74 68 65 0a 09 20 20 63 75 72 72 65 6e 74 g the.. current
5bb0: 20 64 65 70 74 68 20 6f 6e 20 74 68 65 20 63 65 depth on the ce
5bc0: 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c rtificate chain,
5bd0: 20 77 69 74 68 0a 09 20 20 3c 63 6f 64 65 3e 30 with.. <code>0
5be0: 3c 2f 63 6f 64 65 3e 20 61 73 20 74 68 65 20 73 </code> as the s
5bf0: 75 62 6a 65 63 74 20 63 65 72 74 69 66 69 63 61 ubject certifica
5c00: 74 65 20 61 6e 64 20 68 69 67 68 65 72 20 76 61 te and higher va
5c10: 6c 75 65 73 0a 09 20 20 64 65 6e 6f 74 69 6e 67 lues.. denoting
5c20: 20 70 72 6f 67 72 65 73 73 69 76 65 6c 79 20 6d progressively m
5c30: 6f 72 65 20 69 6e 64 69 72 65 63 74 20 69 73 73 ore indirect iss
5c40: 75 65 72 20 63 65 72 74 69 66 69 63 61 74 65 73 uer certificates
5c50: 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 ... <br>.. The
5c60: 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 20 61 <em>cert</em> a
5c70: 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 rgument is a lis
5c80: 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 t of key-value p
5c90: 61 69 72 73 20 73 69 6d 69 6c 61 72 0a 09 20 20 airs similar..
5ca0: 74 6f 20 74 68 6f 73 65 20 72 65 74 75 72 6e 65 to those returne
5cb0: 64 20 62 79 0a 09 20 20 3c 61 20 68 72 65 66 3d d by.. <a href=
5cc0: 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c "#tls::status"><
5cd0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 strong>tls::stat
5ce0: 75 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 2e us</strong></a>.
5cf0: 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 .. <br>.. The
5d00: 3c 65 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 <em>status</em>
5d10: 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 69 argument is an i
5d20: 6e 74 65 67 65 72 20 72 65 70 72 65 73 65 6e 74 nteger represent
5d30: 69 6e 67 20 74 68 65 0a 09 20 20 63 75 72 72 65 ing the.. curre
5d40: 6e 74 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 nt validity of t
5d50: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a he certificate..
5d60: 09 20 20 41 20 76 61 6c 75 65 20 6f 66 20 3c 63 . A value of <c
5d70: 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65 61 ode>0</code> mea
5d80: 6e 73 20 74 68 65 20 63 65 72 74 69 66 69 63 61 ns the certifica
5d90: 74 65 20 69 73 20 64 65 65 6d 65 64 20 69 6e 76 te is deemed inv
5da0: 61 6c 69 64 2e 0a 09 20 20 41 20 76 61 6c 75 65 alid... A value
5db0: 20 6f 66 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f 64 of <code>1</cod
5dc0: 65 3e 20 6d 65 61 6e 73 20 74 68 65 20 63 65 72 e> means the cer
5dd0: 74 69 66 69 63 61 74 65 20 69 73 20 64 65 65 6d tificate is deem
5de0: 65 64 20 76 61 6c 69 64 2e 0a 09 20 20 3c 62 72 ed valid... <br
5df0: 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 65 72 72 >.. The <em>err
5e00: 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 or</em> argument
5e10: 20 73 75 70 70 6c 69 65 73 20 74 68 65 20 6d 65 supplies the me
5e20: 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 ssage, if any, g
5e30: 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20 3c enerated.. by <
5e40: 63 6f 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f code>X509_STORE_
5e50: 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c CTX_get_error()<
5e60: 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a /code>... <br>.
5e70: 09 20 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 63 . <br>.. The c
5e80: 61 6c 6c 62 61 63 6b 20 6d 61 79 20 6f 76 65 72 allback may over
5e90: 72 69 64 65 20 6e 6f 72 6d 61 6c 20 76 61 6c 69 ride normal vali
5ea0: 64 61 74 69 6f 6e 20 70 72 6f 63 65 73 73 69 6e dation processin
5eb0: 67 20 62 79 20 65 78 70 6c 69 63 69 74 6c 79 0a g by explicitly.
5ec0: 09 20 20 72 65 74 75 72 6e 69 6e 67 20 6f 6e 65 . returning one
5ed0: 20 6f 66 20 74 68 65 20 61 62 6f 76 65 20 3c 65 of the above <e
5ee0: 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 76 61 m>status</em> va
5ef0: 6c 75 65 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c lues...</dd>...<
5f00: 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 0a /dl>. </dd>..
5f10: 20 20 20 20 3c 62 72 3e 0a 0a 20 20 20 20 3c 64 <br>.. <d
5f20: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 t><strong>-passw
5f30: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ord</strong> <em
5f40: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f >callback</em></
5f50: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e dt>. <dd>..In
5f60: 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 vokes the specif
5f70: 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ied <em>callback
5f80: 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 77 68 65 </em> script whe
5f90: 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 20 n OpenSSL needs
5fa0: 74 6f 0a 09 6f 62 74 61 69 6e 20 61 20 70 61 73 to..obtain a pas
5fb0: 73 77 6f 72 64 2e 20 20 54 68 65 20 63 61 6c 6c sword. The call
5fc0: 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 back should retu
5fd0: 72 6e 20 61 20 73 74 72 69 6e 67 20 77 68 69 63 rn a string whic
5fe0: 68 0a 09 72 65 70 72 65 73 65 6e 74 73 20 74 68 h..represents th
5ff0: 65 20 70 61 73 73 77 6f 72 64 20 74 6f 20 62 65 e password to be
6000: 20 75 73 65 64 2e 0a 09 4e 6f 20 61 72 67 75 6d used...No argum
6010: 65 6e 74 73 20 61 72 65 20 61 70 70 65 6e 64 65 ents are appende
6020: 64 20 74 6f 20 74 68 65 20 73 63 72 69 70 74 20 d to the script
6030: 75 70 6f 6e 20 63 61 6c 6c 62 61 63 6b 2e 0a 20 upon callback..
6040: 20 20 20 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c </dd>.</dl>.<
6050: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 3c 70 /blockquote>..<p
6060: 3e 0a 52 65 66 65 72 65 6e 63 65 20 69 6d 70 6c >.Reference impl
6070: 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74 ementations of t
6080: 68 65 73 65 20 63 61 6c 6c 62 61 63 6b 73 20 61 hese callbacks a
6090: 72 65 20 70 72 6f 76 69 64 65 64 20 69 6e 20 74 re provided in t
60a0: 68 65 0a 64 69 73 74 72 69 62 75 74 69 6f 6e 20 he.distribution
60b0: 61 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a as <strong>tls::
60c0: 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 callback</strong
60d0: 3e 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e 74 6c > and.<strong>tl
60e0: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 s::password</str
60f0: 6f 6e 67 3e 20 72 65 73 70 65 63 74 69 76 65 6c ong> respectivel
6100: 79 2e 20 20 4e 6f 74 65 20 74 68 61 74 20 74 68 y. Note that th
6110: 65 73 65 20 61 72 65 0a 3c 65 6d 3e 73 61 6d 70 ese are.<em>samp
6120: 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e le</em> implemen
6130: 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 2e 20 20 49 tations only. I
6140: 6e 20 61 20 6d 6f 72 65 20 72 65 61 6c 69 73 74 n a more realist
6150: 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 0a 79 6f ic deployment.yo
6160: 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20 u would specify
6170: 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 your own callbac
6180: 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63 k scripts on eac
6190: 68 20 54 4c 53 20 63 68 61 6e 6e 65 6c 0a 75 73 h TLS channel.us
61a0: 69 6e 67 20 74 68 65 20 3c 65 6d 3e 2d 63 6f 6d ing the <em>-com
61b0: 6d 61 6e 64 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 mand</em> and <e
61c0: 6d 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e m>-password</em>
61d0: 20 6f 70 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a options..</p>..
61e0: 3c 70 3e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 <p>.The default
61f0: 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 behavior when th
6200: 65 20 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f e <em>-command</
6210: 65 6d 3e 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f em> option is no
6220: 74 20 73 70 65 63 69 66 69 65 64 20 69 73 20 66 t specified is f
6230: 6f 72 0a 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 or.TLS to proces
6240: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 s the associated
6250: 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 library callbac
6260: 6b 73 20 69 6e 74 65 72 6e 61 6c 6c 79 2e 0a 54 ks internally..T
6270: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 he default behav
6280: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 65 6d ior when the <em
6290: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e 20 >-password</em>
62a0: 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 73 70 option is not sp
62b0: 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 0a 54 ecified is for.T
62c0: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 LS to process th
62d0: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 e associated lib
62e0: 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 rary callbacks b
62f0: 79 20 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 y attempting to
6300: 63 61 6c 6c 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 call.<strong>tls
6310: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f ::password</stro
6320: 6e 67 3e 2e 0a 54 68 65 20 64 69 66 66 65 72 65 ng>..The differe
6330: 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 65 73 nce between thes
6340: 65 20 74 77 6f 20 62 65 68 61 76 69 6f 72 73 20 e two behaviors
6350: 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 is a consequence
6360: 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 0a of maintaining.
6370: 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 compatibility wi
6380: 74 68 20 65 61 72 6c 69 65 72 20 69 6d 70 6c 65 th earlier imple
6390: 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70 3e mentations..</p>
63a0: 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 74 72 6f 6e ..<p>.The <stron
63b0: 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 g>tls::debug</st
63c0: 72 6f 6e 67 3e 20 76 61 72 69 61 62 6c 65 20 70 rong> variable p
63d0: 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64 rovides some add
63e0: 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c 20 itional.control
63f0: 6f 76 65 72 20 74 68 65 73 65 20 72 65 66 65 72 over these refer
6400: 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 2e 20 ence callbacks.
6410: 20 49 74 73 20 76 61 6c 75 65 20 69 73 20 7a 65 Its value is ze
6420: 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e 0a 48 ro by default..H
6430: 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f igher values pro
6440: 64 75 63 65 20 6d 6f 72 65 20 64 69 61 67 6e 6f duce more diagno
6450: 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61 6e 64 stic output, and
6460: 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 will also force
6470: 20 74 68 65 0a 76 65 72 69 66 79 20 6d 65 74 68 the.verify meth
6480: 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67 3e 74 6c od in <strong>tl
6490: 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 s::callback</str
64a0: 6f 6e 67 3e 20 74 6f 20 61 63 63 65 70 74 20 74 ong> to accept t
64b0: 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20 he.certificate,
64c0: 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 73 20 even when it is
64d0: 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a 3c invalid..</p>..<
64e0: 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 p>.<em>.The use
64f0: 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 65 of the reference
6500: 20 63 61 6c 6c 62 61 63 6b 73 20 3c 73 74 72 6f callbacks <stro
6510: 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b ng>tls::callback
6520: 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 0a 3c 73 </strong> and.<s
6530: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 trong>tls::passw
6540: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 69 73 20 ord</strong> is
6550: 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e not recommended.
6560: 20 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 65 They may be re
6570: 6d 6f 76 65 64 0a 66 72 6f 6d 20 66 75 74 75 72 moved.from futur
6580: 65 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d e releases..</em
6590: 3e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e >.</p>..<p>.<em>
65a0: 0a 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 .The use of the
65b0: 76 61 72 69 61 62 6c 65 20 3c 73 74 72 6f 6e 67 variable <strong
65c0: 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72 >tls::debug</str
65d0: 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f ong> is not reco
65e0: 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 6d 61 79 20 mmended..It may
65f0: 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 be removed from
6600: 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e future releases.
6610: 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 .</em>.</p>..<h3
6620: 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 42 55 47 22 ><a name="DEBUG"
6630: 3e 44 45 42 55 47 3c 2f 61 3e 3c 2f 68 33 3e 0a >DEBUG</a></h3>.
6640: 0a 54 4c 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 .TLS key logging
6650: 20 63 61 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 can be enabled
6660: 62 79 20 73 65 74 74 69 6e 67 20 74 68 65 20 65 by setting the e
6670: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 nvironment varia
6680: 62 6c 65 0a 3c 62 3e 53 53 4c 4b 45 59 4c 4f 47 ble.<b>SSLKEYLOG
6690: 46 49 4c 45 3c 2f 62 3e 20 74 6f 20 74 68 65 20 FILE</b> to the
66a0: 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 name of the file
66b0: 20 74 6f 20 6c 6f 67 20 74 6f 2e 20 54 68 65 6e to log to. Then
66c0: 20 77 68 65 6e 65 76 65 72 20 54 4c 53 0a 6b 65 whenever TLS.ke
66d0: 79 20 6d 61 74 65 72 69 61 6c 20 69 73 20 67 65 y material is ge
66e0: 6e 65 72 61 74 65 64 20 6f 72 20 72 65 63 65 69 nerated or recei
66f0: 76 65 64 20 69 74 20 77 69 6c 6c 20 62 65 20 6c ved it will be l
6700: 6f 67 67 65 64 20 74 6f 20 74 68 65 20 66 69 6c ogged to the fil
6710: 65 2e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d e...<h3><a name=
6720: 22 48 54 54 50 53 20 45 58 41 4d 50 4c 45 22 3e "HTTPS EXAMPLE">
6730: 48 54 54 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61 HTTPS EXAMPLE</a
6740: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 ></h3>..<p>This
6750: 65 78 61 6d 70 6c 65 20 75 73 65 73 20 61 20 73 example uses a s
6760: 61 6d 70 6c 65 20 73 65 72 76 65 72 2e 70 65 6d ample server.pem
6770: 20 70 72 6f 76 69 64 65 64 20 77 69 74 68 20 74 provided with t
6780: 68 65 20 54 4c 53 20 72 65 6c 65 61 73 65 2c 0a he TLS release,.
6790: 63 6f 75 72 74 65 73 79 20 6f 66 20 74 68 65 20 courtesy of the
67a0: 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c <strong>OpenSSL<
67b0: 2f 73 74 72 6f 6e 67 3e 20 70 72 6f 6a 65 63 74 /strong> project
67c0: 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e 3c 63 6f 64 .</p>..<pre><cod
67d0: 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 e>.package requi
67e0: 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 re http.package
67f0: 72 65 71 75 69 72 65 20 74 6c 73 0a 0a 68 74 74 require tls..htt
6800: 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 p::register http
6810: 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c s 443 [list ::tl
6820: 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 s::socket -autos
6830: 65 72 76 65 72 6e 61 6d 65 20 74 72 75 65 20 2d ervername true -
6840: 72 65 71 75 69 72 65 20 74 72 75 65 20 2d 63 61 require true -ca
6850: 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72 dir /etc/ssl/cer
6860: 74 73 5d 0a 0a 73 65 74 20 74 6f 6b 20 5b 68 74 ts]..set tok [ht
6870: 74 70 3a 3a 67 65 74 75 72 6c 20 68 74 74 70 73 tp::geturl https
6880: 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f 5d 0a ://www.tcl.tk/].
6890: 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e 0a 0a 3c </code></pre>..<
68a0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 50 45 43 h3><a name="SPEC
68b0: 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f IAL CONSIDERATIO
68c0: 4e 53 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53 NS">SPECIAL CONS
68d0: 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f IDERATIONS</a></
68e0: 68 33 3e 0a 0a 3c 70 3e 54 68 65 20 63 61 70 61 h3>..<p>The capa
68f0: 62 69 6c 69 74 69 65 73 20 6f 66 20 74 68 69 73 bilities of this
6900: 20 70 61 63 6b 61 67 65 20 63 61 6e 20 76 61 72 package can var
6910: 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20 62 61 73 y enormously bas
6920: 65 64 0a 75 70 6f 6e 20 68 6f 77 20 79 6f 75 72 ed.upon how your
6930: 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 OpenSSL library
6940: 20 77 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20 was configured
6950: 61 6e 64 20 62 75 69 6c 74 2e 20 41 74 20 74 68 and built. At th
6960: 65 0a 6d 6f 73 74 20 6d 61 63 72 6f 2d 6c 65 76 e.most macro-lev
6970: 65 6c 20 4f 70 65 6e 53 53 4c 20 73 75 70 70 6f el OpenSSL suppo
6980: 72 74 73 20 61 20 26 71 75 6f 74 3b 6e 6f 20 70 rts a "no p
6990: 61 74 65 6e 74 73 26 71 75 6f 74 3b 20 62 75 69 atents" bui
69a0: 6c 64 2c 0a 77 68 69 63 68 20 64 69 73 61 62 6c ld,.which disabl
69b0: 65 73 20 52 53 41 2c 20 49 44 45 41 2c 20 52 43 es RSA, IDEA, RC
69c0: 28 32 2c 34 2c 35 29 20 61 6e 64 20 53 53 4c 32 (2,4,5) and SSL2
69d0: 20 2d 20 69 66 20 79 6f 75 72 20 4f 70 65 6e 53 - if your OpenS
69e0: 53 4c 20 69 73 0a 63 6f 6e 66 69 67 75 72 65 64 SL is.configured
69f0: 20 74 68 69 73 20 77 61 79 20 74 68 65 6e 20 79 this way then y
6a00: 6f 75 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f 20 ou will need to
6a10: 62 75 69 6c 64 20 54 4c 53 20 77 69 74 68 20 74 build TLS with t
6a20: 68 65 0a 2d 44 4e 4f 5f 50 41 54 45 4e 54 53 20 he.-DNO_PATENTS
6a30: 6f 70 74 69 6f 6e 20 2d 20 61 6e 64 20 74 68 65 option - and the
6a40: 20 72 65 73 75 6c 74 61 6e 74 20 6d 6f 64 75 6c resultant modul
6a50: 65 20 77 69 6c 6c 20 66 75 6e 63 74 69 6f 6e 0a e will function.
6a60: 63 6f 72 72 65 63 74 6c 79 20 61 6e 64 20 61 6c correctly and al
6a70: 73 6f 20 73 75 70 70 6f 72 74 20 41 44 48 20 63 so support ADH c
6a80: 65 72 74 69 66 69 63 61 74 65 2d 6c 65 73 73 20 ertificate-less
6a90: 65 6e 63 72 79 70 74 69 6f 6e 2c 0a 68 6f 77 65 encryption,.howe
6aa0: 76 65 72 20 79 6f 75 20 77 69 6c 6c 20 62 65 20 ver you will be
6ab0: 75 6e 61 62 6c 65 20 74 6f 20 75 74 69 6c 69 7a unable to utiliz
6ac0: 65 20 74 68 69 73 20 74 6f 20 73 70 65 61 6b 20 e this to speak
6ad0: 74 6f 20 6e 6f 72 6d 61 6c 20 57 65 62 0a 53 65 to normal Web.Se
6ae0: 72 76 65 72 73 2c 20 77 68 69 63 68 20 74 79 70 rvers, which typ
6af0: 69 63 61 6c 6c 79 20 72 65 71 75 69 72 65 20 52 ically require R
6b00: 53 41 20 73 75 70 70 6f 72 74 2e 20 50 6c 65 61 SA support. Plea
6b10: 73 65 20 73 65 65 20 3c 61 0a 68 72 65 66 3d 22 se see <a.href="
6b20: 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 http://www.opens
6b30: 73 6c 2e 6f 72 67 2f 22 3e 68 74 74 70 3a 2f 2f sl.org/">http://
6b40: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f www.openssl.org/
6b50: 3c 2f 61 3e 20 66 6f 72 0a 6d 6f 72 65 20 69 6e </a> for.more in
6b60: 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 formation on the
6b70: 20 77 68 6f 6c 65 20 69 73 73 75 65 20 6f 66 20 whole issue of
6b80: 70 61 74 65 6e 74 73 20 61 6e 64 20 55 53 20 65 patents and US e
6b90: 78 70 6f 72 74 0a 72 65 73 74 72 69 63 74 69 6f xport.restrictio
6ba0: 6e 73 2e 20 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 ns. </p>..<h3><a
6bb0: 20 6e 61 6d 65 3d 22 53 45 45 20 41 4c 53 4f 22 name="SEE ALSO"
6bc0: 3e 53 45 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 68 >SEE ALSO</a></h
6bd0: 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 3e 73 3>..<p><strong>s
6be0: 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 ocket</strong>,
6bf0: 3c 73 74 72 6f 6e 67 3e 66 69 6c 65 65 76 65 6e <strong>fileeven
6c00: 74 2c 20 3c 2f 73 74 72 6f 6e 67 3e 3c 61 0a 68 t, </strong><a.h
6c10: 72 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e ref="http://www.
6c20: 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 3c 73 openssl.org/"><s
6c30: 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 trong>OpenSSL</s
6c40: 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a 0a trong></a></p>..
6c50: 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a 43 6f 70 79 <hr>..<pre>.Copy
6c60: 72 69 67 68 74 20 26 63 6f 70 79 3b 20 31 39 39 right © 199
6c70: 39 20 4d 61 74 74 20 4e 65 77 6d 61 6e 2e 0a 43 9 Matt Newman..C
6c80: 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 opyright ©
6c90: 32 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 2004 Starfish Sy
6ca0: 73 74 65 6d 73 2e 0a 3c 2f 70 72 65 3e 0a 3c 2f stems..</pre>.</
6cb0: 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c 3e 0a body>.</html>.