0000: 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 0a <!DOCTYPE html>.
0010: 3c 68 74 6d 6c 20 6c 61 6e 67 3d 22 65 6e 22 3e <html lang="en">
0020: 0a 3c 68 65 61 64 3e 0a 3c 6d 65 74 61 20 68 74 .<head>.<meta ht
0030: 74 70 2d 65 71 75 69 76 3d 22 43 6f 6e 74 65 6e tp-equiv="Conten
0040: 74 2d 54 79 70 65 22 0a 63 6f 6e 74 65 6e 74 3d t-Type".content=
0050: 22 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72 "text/html; char
0060: 73 65 74 3d 69 73 6f 2d 38 38 35 39 2d 31 22 3e set=iso-8859-1">
0070: 0a 3c 6d 65 74 61 20 6e 61 6d 65 3d 22 43 6f 70 .<meta name="Cop
0080: 79 72 69 67 68 74 22 20 63 6f 6e 74 65 6e 74 3d yright" content=
0090: 22 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61 "1999 Matt Newma
00a0: 6e 20 2f 20 32 30 30 34 20 53 74 61 72 66 69 73 n / 2004 Starfis
00b0: 68 20 53 79 73 74 65 6d 73 22 3e 0a 3c 74 69 74 h Systems">.<tit
00c0: 6c 65 3e 54 4c 53 20 28 53 53 4c 29 20 54 43 4c le>TLS (SSL) TCL
00d0: 20 43 6f 6d 6d 61 6e 64 73 3c 2f 74 69 74 6c 65 Commands</title
00e0: 3e 0a 3c 6c 69 6e 6b 20 72 65 6c 3d 22 73 74 79 >.<link rel="sty
00f0: 6c 65 73 68 65 65 74 22 20 68 72 65 66 3d 22 64 lesheet" href="d
0100: 6f 63 73 2e 63 73 73 22 20 74 79 70 65 3d 22 74 ocs.css" type="t
0110: 65 78 74 2f 63 73 73 22 20 6d 65 64 69 61 3d 22 ext/css" media="
0120: 61 6c 6c 22 3e 0a 3c 2f 68 65 61 64 3e 0a 0a 3c all">.</head>..<
0130: 62 6f 64 79 20 63 6c 61 73 73 3d 22 76 73 63 2d body class="vsc-
0140: 69 6e 69 74 69 61 6c 69 7a 65 64 22 3e 0a 0a 3c initialized">..<
0150: 68 32 3e 54 63 6c 20 54 6c 73 20 45 78 74 65 6e h2>Tcl Tls Exten
0160: 73 69 6f 6e 20 44 6f 63 75 6d 65 6e 74 61 74 69 sion Documentati
0170: 6f 6e 3c 2f 68 32 3e 0a 0a 3c 64 6c 3e 0a 20 20 on</h2>..<dl>.
0180: 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 <dd><a href="#
0190: 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 3e 0a 20 NAME">NAME</a>.
01a0: 20 20 20 3c 64 6c 3e 0a 09 3c 64 64 3e 3c 62 3e <dl>..<dd><b>
01b0: 74 6c 73 3c 2f 62 3e 20 2d 20 62 69 6e 64 69 6e tls</b> - bindin
01c0: 67 20 74 6f 20 3c 62 3e 4f 70 65 6e 53 53 4c 3c g to <b>OpenSSL<
01d0: 2f 62 3e 20 6c 69 62 72 61 72 79 0a 09 66 6f 72 /b> library..for
01e0: 20 73 6f 63 6b 65 74 20 61 6e 64 20 49 2f 4f 20 socket and I/O
01f0: 63 68 61 6e 6e 65 6c 20 63 6f 6d 6d 75 6e 69 63 channel communic
0200: 61 74 69 6f 6e 73 2e 3c 2f 64 64 3e 0a 20 20 20 ations.</dd>.
0210: 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e </dl>. </dd>
0220: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 . <dd><a href
0230: 3d 22 23 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e ="#SYNOPSIS">SYN
0240: 4f 50 53 49 53 3c 2f 61 3e 20 3c 2f 64 64 3e 0a OPSIS</a> </dd>.
0250: 20 20 20 20 3c 64 64 3e 3c 64 6c 3e 0a 09 20 20 <dd><dl>..
0260: 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 <dd><b>package
0270: 20 72 65 71 75 69 72 65 20 54 63 6c 3c 2f 62 3e require Tcl</b>
0280: 20 3c 65 6d 3e 3f 3c 62 3e 38 2e 35 3c 2f 62 3e <em>?<b>8.5</b>
0290: 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 ?</em></dd>..
02a0: 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 <dd><b>package
02b0: 72 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e 3c require tls</b><
02c0: 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74 3e 26 6e /dd>.. <dt>&n
02d0: 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20 20 20 3c bsp;</dt>.. <
02e0: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c dd><b>tls::init<
02f0: 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 /b> <em>?options
0300: 3f 3c 2f 65 6d 3e 20 3c 2f 64 64 3e 0a 09 20 20 ?</em> </dd>..
0310: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f <dd><b>tls::so
0320: 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 cket</b> <em>?op
0330: 74 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 74 tions? host port
0340: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 </em></dd>..
0350: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b <dd><b>tls::sock
0360: 65 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d 73 65 72 et</b> <em>?-ser
0370: 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 ver command? ?op
0380: 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 6d 3e tions? port</em>
0390: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c </dd>.. <dd><
03a0: 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 b>tls::handshake
03b0: 3c 2f 62 3e 20 3c 65 6d 3e 20 63 68 61 6e 6e 65 </b> <em> channe
03c0: 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 l</em></dd>..
03d0: 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 <dd><b>tls::sta
03e0: 74 75 73 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d 6c 6f tus</b> <em>?-lo
03f0: 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d cal? channel</em
0400: 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e ></dd>.. <dd>
0410: 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 <b>tls::connecti
0420: 6f 6e 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e 6e on</b> <em>chann
0430: 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 el</em></dd>..
0440: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6d <dd><b>tls::im
0450: 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 port</b> <em>cha
0460: 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f nnel ?options?</
0470: 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 em></dd>.. <d
0480: 64 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f d><b>tls::unimpo
0490: 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e 6e rt</b> <em>chann
04a0: 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 el</em></dd>..
04b0: 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 <dt> </dt
04c0: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c >.. <dd><b>tl
04d0: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e s::protocols</b>
04e0: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c </dd>.. <dd><
04f0: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f b>tls::version</
0500: 62 3e 3c 2f 64 64 3e 0a 09 3c 2f 64 6c 3e 0a 20 b></dd>..</dl>.
0510: 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 </dd>. <dd
0520: 3e 3c 61 20 68 72 65 66 3d 22 23 43 4f 4d 4d 41 ><a href="#COMMA
0530: 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f 61 NDS">COMMANDS</a
0540: 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c ></dd>. <dd><
0550: 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 a href="#CALLBAC
0560: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 K OPTIONS">CALLB
0570: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c ACK OPTIONS</a><
0580: 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 /dd>. <dd><a
0590: 68 72 65 66 3d 22 23 48 54 54 50 53 20 45 58 41 href="#HTTPS EXA
05a0: 4d 50 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d MPLE">HTTPS EXAM
05b0: 50 4c 45 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 PLE</a></dd>.
05c0: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 <dd><a href="#S
05d0: 45 45 20 41 4c 53 4f 22 3e 53 50 45 43 49 41 4c EE ALSO">SPECIAL
05e0: 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c CONSIDERATIONS<
05f0: 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 /a></dd>. <dd
0600: 3e 3c 61 20 68 72 65 66 3d 22 23 53 45 45 20 41 ><a href="#SEE A
0610: 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61 LSO">SEE ALSO</a
0620: 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 ></dd>.</dl>..<h
0630: 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d r>..<h3><a name=
0640: 22 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 3e 3c "NAME">NAME</a><
0650: 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 /h3>..<p><strong
0660: 3e 74 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 2d 20 >tls</strong> -
0670: 62 69 6e 64 69 6e 67 20 74 6f 20 3c 73 74 72 6f binding to <stro
0680: 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f ng>OpenSSL</stro
0690: 6e 67 3e 20 6c 69 62 72 61 72 79 0a 66 6f 72 20 ng> library.for
06a0: 73 6f 63 6b 65 74 20 61 6e 64 20 49 2f 4f 20 63 socket and I/O c
06b0: 68 61 6e 6e 65 6c 20 63 6f 6d 6d 75 6e 69 63 61 hannel communica
06c0: 74 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e tions.</p>..<h3>
06d0: 3c 61 20 6e 61 6d 65 3d 22 53 59 4e 4f 50 53 49 <a name="SYNOPSI
06e0: 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c S">SYNOPSIS</a><
06f0: 2f 68 33 3e 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b /h3>..<p><b>pack
0700: 61 67 65 20 72 65 71 75 69 72 65 20 54 63 6c 3c age require Tcl<
0710: 2f 62 3e 20 3c 65 6d 3e 3f 3c 62 3e 38 2e 35 3c /b> <em>?<b>8.5<
0720: 2f 62 3e 3f 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 62 /b>?</em><br>.<b
0730: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 >package require
0740: 20 74 6c 73 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 72 tls</b><br>.<br
0750: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a >.<a href="#tls:
0760: 3a 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 :init"><b>tls::i
0770: 6e 69 74 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 nit</b> <i>?opti
0780: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e ons?</i></a><br>
0790: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
07a0: 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a socket"><b>tls::
07b0: 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f 6f socket</b> <i>?o
07c0: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 ptions? host por
07d0: 74 3c 2f 69 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 t</i><br>.<a hre
07e0: 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 f="#tls::socket"
07f0: 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c ><b>tls::socket<
0800: 2f 62 3e 20 3c 69 3e 3f 2d 73 65 72 76 65 72 20 /b> <i>?-server
0810: 63 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e command? ?option
0820: 73 3f 20 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c s? port</i></a><
0830: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0840: 73 3a 3a 73 74 61 74 75 73 22 3e 3c 62 3e 74 6c s::status"><b>tl
0850: 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 69 s::status</b> <i
0860: 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 >?-local? channe
0870: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 l</i></a><br>.<a
0880: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 6f 6e href="#tls::con
0890: 6e 65 63 74 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a nection"><b>tls:
08a0: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 :connection</b>
08b0: 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f <i>channel</i></
08c0: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 a><br>.<a href="
08d0: 23 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 22 #tls::handshake"
08e0: 3e 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 ><b>tls::handsha
08f0: 6b 65 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 ke</b> <i>channe
0900: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 l</i></a><br>.<a
0910: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 href="#tls::imp
0920: 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 ort"><b>tls::imp
0930: 6f 72 74 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e ort</b> <i>chann
0940: 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e el ?options?</i>
0950: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 </a><br>.<a href
0960: 3d 22 23 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 ="#tls::unimport
0970: 22 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f "><b>tls::unimpo
0980: 72 74 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 rt</b> <i>channe
0990: 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 62 l</i></a><br>.<b
09a0: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 r>.<a href="#tls
09b0: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e 3c 62 3e ::protocols"><b>
09c0: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f tls::protocols</
09d0: 62 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 b></a><br>.<a hr
09e0: 65 66 3d 22 23 74 6c 73 3a 3a 76 65 72 73 69 6f ef="#tls::versio
09f0: 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69 n"><b>tls::versi
0a00: 6f 6e 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c on</b></a><br>.<
0a10: 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 /p>..<h3><a name
0a20: 3d 22 44 45 53 43 52 49 50 54 49 4f 4e 22 3e 44 ="DESCRIPTION">D
0a30: 45 53 43 52 49 50 54 49 4f 4e 3c 2f 61 3e 3c 2f ESCRIPTION</a></
0a40: 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 65 78 74 h3>..<p>This ext
0a50: 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64 65 73 20 ension provides
0a60: 54 43 4c 20 73 63 72 69 70 74 20 61 63 63 65 73 TCL script acces
0a70: 73 20 74 6f 20 73 65 63 75 72 65 20 73 6f 63 6b s to secure sock
0a80: 65 74 20 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e et communication
0a90: 73 0a 75 73 69 6e 67 20 74 68 65 20 54 72 61 6e s.using the Tran
0aa0: 73 70 6f 72 74 20 4c 61 79 65 72 20 53 65 63 75 sport Layer Secu
0ab0: 72 69 74 79 20 28 54 4c 53 29 20 70 72 6f 74 6f rity (TLS) proto
0ac0: 63 6f 6c 2e 20 49 74 20 70 72 6f 76 69 64 65 73 col. It provides
0ad0: 20 61 20 67 65 6e 65 72 69 63 0a 62 69 6e 64 69 a generic.bindi
0ae0: 6e 67 20 74 6f 20 3c 61 20 68 72 65 66 3d 22 68 ng to <a href="h
0af0: 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 ttp://www.openss
0b00: 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c l.org/">OpenSSL<
0b10: 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e 67 20 74 /a>, utilizing t
0b20: 68 65 0a 3c 73 74 72 6f 6e 67 3e 54 63 6c 5f 53 he.<strong>Tcl_S
0b30: 74 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f 73 74 72 tackChannel</str
0b40: 6f 6e 67 3e 20 41 50 49 20 69 6e 20 54 63 6c 20 ong> API in Tcl
0b50: 38 2e 34 20 61 6e 64 20 68 69 67 68 65 72 2e 0a 8.4 and higher..
0b60: 54 68 65 73 65 20 73 6f 63 6b 65 74 73 20 62 65 These sockets be
0b70: 68 61 76 65 20 65 78 61 63 74 6c 79 20 74 68 65 have exactly the
0b80: 20 73 61 6d 65 20 61 73 20 63 68 61 6e 6e 65 6c same as channel
0b90: 73 20 63 72 65 61 74 65 64 20 75 73 69 6e 67 20 s created using
0ba0: 74 68 65 20 62 75 69 6c 74 2d 69 6e 0a 3c 73 74 the built-in.<st
0bb0: 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 rong>socket</str
0bc0: 6f 6e 67 3e 20 63 6f 6d 6d 61 6e 64 2c 20 61 6c ong> command, al
0bd0: 6f 6e 67 20 77 69 74 68 20 61 64 64 69 74 69 6f ong with additio
0be0: 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 nal options for
0bf0: 63 6f 6e 74 72 6f 6c 6c 69 6e 67 0a 74 68 65 20 controlling.the
0c00: 53 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 3c 2f 70 SSL session..</p
0c10: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
0c20: 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e COMMANDS">COMMAN
0c30: 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e DS</a></h3>..<p>
0c40: 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65 20 77 6f Typically one wo
0c50: 75 6c 64 20 75 73 65 20 74 68 65 20 3c 73 74 72 uld use the <str
0c60: 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 ong>tls::socket
0c70: 3c 2f 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 </strong>command
0c80: 0a 77 68 69 63 68 20 70 72 6f 76 69 64 65 73 20 .which provides
0c90: 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 compatibility wi
0ca0: 74 68 20 74 68 65 20 6e 61 74 69 76 65 20 54 63 th the native Tc
0cb0: 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 l <strong>socket
0cc0: 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e </strong>.comman
0cd0: 64 2e 20 49 6e 20 73 75 63 68 20 63 61 73 65 73 d. In such cases
0ce0: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d <strong>tls::im
0cf0: 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 port</strong> sh
0d00: 6f 75 6c 64 20 6e 6f 74 20 62 65 0a 75 73 65 64 ould not be.used
0d10: 20 64 69 72 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a directly.</p>..
0d20: 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 <dl>. <dt><a
0d30: 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 name="tls::init"
0d40: 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f ><b>tls::init </
0d50: 62 3e 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f b><i>?options?</
0d60: 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 i></a></dt>.
0d70: 3c 64 64 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e <dd>Optional fun
0d80: 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 ction to set the
0d90: 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 default options
0da0: 20 75 73 65 64 20 62 79 0a 09 3c 73 74 72 6f 6e used by..<stron
0db0: 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 g>tls::socket</s
0dc0: 74 72 6f 6e 67 3e 2e 20 49 66 20 79 6f 75 20 63 trong>. If you c
0dd0: 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a all <strong>tls:
0de0: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e :import</strong>
0df0: 0a 09 64 69 72 65 63 74 6c 79 20 74 68 69 73 20 ..directly this
0e00: 72 6f 75 74 69 6e 65 20 68 61 73 20 6e 6f 20 65 routine has no e
0e10: 66 66 65 63 74 2e 20 41 6e 79 20 6f 66 20 74 68 ffect. Any of th
0e20: 65 20 6f 70 74 69 6f 6e 73 0a 09 74 68 61 74 20 e options..that
0e30: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 <strong>tls::soc
0e40: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63 ket</strong> acc
0e50: 65 70 74 73 20 63 61 6e 20 62 65 20 73 65 74 0a epts can be set.
0e60: 09 75 73 69 6e 67 20 74 68 69 73 20 63 6f 6d 6d .using this comm
0e70: 61 6e 64 2c 20 74 68 6f 75 67 68 20 79 6f 75 20 and, though you
0e80: 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20 79 6f 75 should limit you
0e90: 72 20 6f 70 74 69 6f 6e 73 0a 09 74 6f 20 6f 6e r options..to on
0ea0: 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20 6f ly TLS related o
0eb0: 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 nes.</dd>. <d
0ec0: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 t> </dt>.
0ed0: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
0ee0: 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 ls::socket"><b>t
0ef0: 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c ls::socket </b><
0f00: 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 09 68 6f em>?options?..ho
0f10: 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 61 3e st port</em></a>
0f20: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 62 </dt>. <dt><b
0f30: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e >tls::socket</b>
0f40: 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f <em> ?-server co
0f50: 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f mmand? ?options?
0f60: 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a port</em></dt>.
0f70: 20 20 20 20 3c 64 64 3e 54 68 69 73 20 69 73 20 <dd>This is
0f80: 61 20 68 65 6c 70 65 72 20 66 75 6e 63 74 69 6f a helper functio
0f90: 6e 20 74 68 61 74 20 75 74 69 6c 69 7a 65 73 20 n that utilizes
0fa0: 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 0a 09 the underlying..
0fb0: 63 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e commands (<stron
0fc0: 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 g>tls::import</s
0fd0: 74 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 trong>). It beha
0fe0: 76 65 73 0a 09 65 78 61 63 74 6c 79 20 74 68 65 ves..exactly the
0ff0: 20 73 61 6d 65 20 61 73 20 74 68 65 20 6e 61 74 same as the nat
1000: 69 76 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e ive Tcl <strong>
1010: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a socket</strong>.
1020: 09 63 6f 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 .command except
1030: 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 6e 20 the options can
1040: 61 6c 73 6f 20 69 6e 63 6c 75 64 65 20 61 6e 79 also include any
1050: 20 6f 66 20 74 68 65 0a 09 61 70 70 6c 69 63 61 of the..applica
1060: 62 6c 65 20 3c 61 20 68 72 65 66 3d 22 23 74 6c ble <a href="#tl
1070: 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72 6f s::import"><stro
1080: 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f 73 ng>tls:import</s
1090: 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 09 6f 70 74 69 trong></a>..opti
10a0: 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 64 64 ons with one add
10b0: 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 3a 3c itional option:<
10c0: 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 /dd>.<blockquote
10d0: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e >. <dl>..<dt>
10e0: 3c 73 74 72 6f 6e 67 3e 2d 61 75 74 6f 73 65 72 <strong>-autoser
10f0: 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e vername</strong>
1100: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f <em>bool</em></
1110: 64 74 3e 0a 09 3c 64 64 3e 41 75 74 6f 6d 61 74 dt>..<dd>Automat
1120: 69 63 61 6c 6c 79 20 73 65 74 20 74 68 65 20 2d ically set the -
1130: 73 65 72 76 65 72 6e 61 6d 65 20 61 72 67 75 6d servername argum
1140: 65 6e 74 20 74 6f 20 74 68 65 20 3c 65 6d 3e 68 ent to the <em>h
1150: 6f 73 74 3c 2f 65 6d 3e 0a 09 20 20 20 20 61 72 ost</em>.. ar
1160: 67 75 6d 65 6e 74 20 28 64 65 66 61 75 6c 74 20 gument (default
1170: 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d is <em>false</em
1180: 3e 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 >).</dd>. </d
1190: 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e l>.</blockquote>
11a0: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d .. <dt><a nam
11b0: 65 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e e="tls::import">
11c0: 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c <b>tls::import <
11d0: 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a 09 3f /b><i>channel..?
11e0: 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e options?</i></a>
11f0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 41 64 </dt>. <dd>Ad
1200: 64 20 53 53 4c 2f 54 4c 53 20 65 6e 63 72 79 70 d SSL/TLS encryp
1210: 74 69 6f 6e 20 74 6f 20 61 20 72 65 67 75 6c 61 tion to a regula
1220: 72 20 54 63 6c 20 63 68 61 6e 6e 65 6c 2e 20 49 r Tcl channel. I
1230: 74 20 6e 65 65 64 0a 09 6e 6f 74 20 62 65 20 61 t need..not be a
1240: 20 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 socket, but mus
1250: 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 t provide bi-dir
1260: 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 ectional flow. A
1270: 6c 73 6f 0a 09 73 65 74 20 73 65 73 73 69 6f 6e lso..set session
1280: 20 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72 20 parameters for
1290: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f SSL handshake.</
12a0: 64 64 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 dd>..<blockquote
12b0: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e >. <dl>..<dt>
12c0: 3c 73 74 72 6f 6e 67 3e 2d 61 6c 70 6e 3c 2f 73 <strong>-alpn</s
12d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c trong> <em>list<
12e0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c /em></dt>..<dd>L
12f0: 69 73 74 20 6f 66 20 70 72 6f 74 6f 63 6f 6c 73 ist of protocols
1300: 20 74 6f 20 6f 66 66 65 72 20 64 75 72 69 6e 67 to offer during
1310: 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 Application-Lay
1320: 65 72 0a 09 20 20 20 20 50 72 6f 74 6f 63 6f 6c er.. Protocol
1330: 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c Negotiation (AL
1340: 50 4e 29 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 PN). For example
1350: 3a 20 3c 65 6d 3e 68 32 3c 2f 65 6d 3e 20 61 6e : <em>h2</em> an
1360: 64 0a 09 20 20 20 20 3c 65 6d 3e 68 74 74 70 2f d.. <em>http/
1370: 31 2e 31 3c 2f 65 6d 3e 2c 20 62 75 74 20 6e 6f 1.1</em>, but no
1380: 74 20 3c 65 6d 3e 68 33 3c 2f 65 6d 3e 20 6f 72 t <em>h3</em> or
1390: 20 3c 65 6d 3e 71 75 69 63 3c 2f 65 6d 3e 2e 3c <em>quic</em>.<
13a0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
13b0: 67 3e 2d 63 61 64 69 72 3c 2f 73 74 72 6f 6e 67 g>-cadir</strong
13c0: 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 6d 3e 3c 2f > <em>dir</em></
13d0: 64 74 3e 0a 09 3c 64 64 3e 53 65 74 20 74 68 65 dt>..<dd>Set the
13e0: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 73 CA certificates
13f0: 20 70 61 74 68 2e 20 54 68 65 20 64 65 66 61 75 path. The defau
1400: 6c 74 20 64 69 72 65 63 74 6f 72 79 20 69 73 20 lt directory is
1410: 70 6c 61 74 66 6f 72 6d 0a 09 20 20 20 20 73 70 platform.. sp
1420: 65 63 69 66 69 63 20 61 6e 64 20 63 61 6e 20 62 ecific and can b
1430: 65 20 73 65 74 20 61 74 20 63 6f 6d 70 69 6c 65 e set at compile
1440: 20 74 69 6d 65 2e 20 54 68 69 73 20 63 61 6e 20 time. This can
1450: 62 65 20 6f 76 65 72 72 69 64 64 65 6e 0a 09 20 be overridden..
1460: 20 20 20 76 69 61 20 74 68 65 20 3c 62 3e 53 53 via the <b>SS
1470: 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 65 L_CERT_DIR</b> e
1480: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 nvironment varia
1490: 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ble.</dd>..<dt><
14a0: 73 74 72 6f 6e 67 3e 2d 63 61 66 69 6c 65 20 3c strong>-cafile <
14b0: 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 /strong><em>file
14c0: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 name</em></dt>..
14d0: 3c 64 64 3e 53 65 74 20 74 68 65 20 63 65 72 74 <dd>Set the cert
14e0: 69 66 69 63 61 74 65 20 61 75 74 68 6f 72 69 74 ificate authorit
14f0: 79 20 28 43 41 29 20 63 65 72 74 69 66 69 63 61 y (CA) certifica
1500: 74 65 73 20 66 69 6c 65 2e 20 54 68 65 20 64 65 tes file. The de
1510: 66 61 75 6c 74 0a 09 20 20 20 20 69 73 20 74 68 fault.. is th
1520: 65 20 63 65 72 74 2e 70 65 6d 20 66 69 6c 65 20 e cert.pem file
1530: 69 6e 20 74 68 65 20 4f 70 73 6e 53 53 4c 20 64 in the OpsnSSL d
1540: 69 72 65 63 74 6f 72 79 2e 20 54 68 69 73 20 63 irectory. This c
1550: 61 6e 20 61 6c 73 6f 20 62 65 0a 09 20 20 20 20 an also be..
1560: 6f 76 65 72 72 69 64 64 65 6e 20 76 69 61 20 74 overridden via t
1570: 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 46 he <b>SSL_CERT_F
1580: 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d ILE</b> environm
1590: 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c 2f 64 ent variable.</d
15a0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
15b0: 2d 63 65 72 74 66 69 6c 65 3c 2f 73 74 72 6f 6e -certfile</stron
15c0: 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c g> <em>filename<
15d0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 /em></dt>..<dd>S
15e0: 70 65 63 69 66 79 20 74 68 65 20 66 69 6c 65 6e pecify the filen
15f0: 61 6d 65 20 77 69 74 68 20 74 68 65 20 63 65 72 ame with the cer
1600: 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 2e tificate to use.
1610: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
1620: 6e 67 3e 2d 63 65 72 74 3c 2f 73 74 72 6f 6e 67 ng>-cert</strong
1630: 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f > <em>filename</
1640: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 em></dt>..<dd>Sp
1650: 65 63 69 66 79 20 74 68 65 20 63 6f 6e 74 65 6e ecify the conten
1660: 74 73 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 ts of a certific
1670: 61 74 65 20 74 6f 20 75 73 65 2c 20 61 73 20 61 ate to use, as a
1680: 20 44 45 52 0a 09 20 20 20 20 65 6e 63 6f 64 65 DER.. encode
1690: 64 20 62 69 6e 61 72 79 20 76 61 6c 75 65 20 28 d binary value (
16a0: 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f 64 64 3e X.509 DER).</dd>
16b0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 ..<dt><strong>-c
16c0: 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c ipher</strong> <
16d0: 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f em>string</em></
16e0: 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 dt>..<dd>List of
16f0: 20 63 69 70 68 65 72 73 20 74 6f 20 75 73 65 2e ciphers to use.
1700: 20 53 74 72 69 6e 67 20 69 73 20 61 20 63 6f 6c String is a col
1710: 6f 6e 20 28 22 3a 22 29 20 73 65 70 61 72 61 74 on (":") separat
1720: 65 64 20 6c 69 73 74 0a 09 20 20 20 20 6f 66 20 ed list.. of
1730: 63 69 70 68 65 72 73 2e 20 43 69 70 68 65 72 73 ciphers. Ciphers
1740: 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 can be combined
1750: 0a 09 20 20 20 20 75 73 69 6e 67 20 74 68 65 20 .. using the
1760: 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72 61 63 74 <b>+</b> charact
1770: 65 72 2e 20 50 72 65 66 69 78 65 73 20 63 61 6e er. Prefixes can
1780: 20 62 65 20 75 73 65 64 20 74 6f 20 70 65 72 6d be used to perm
1790: 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20 72 65 6d anently.. rem
17a0: 6f 76 65 20 28 22 21 22 29 2c 20 64 65 6c 65 74 ove ("!"), delet
17b0: 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d 6f 76 65 e ("-"), or move
17c0: 20 61 20 63 79 70 68 65 72 20 74 6f 20 74 68 65 a cypher to the
17d0: 20 65 6e 64 20 6f 66 0a 09 20 20 20 20 74 68 65 end of.. the
17e0: 20 6c 69 73 74 20 28 22 2b 22 29 2e 20 4b 65 79 list ("+"). Key
17f0: 77 6f 72 64 73 20 3c 62 3e 40 53 54 52 45 4e 47 words <b>@STRENG
1800: 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 TH</b> (sort by
1810: 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20 20 20 6b algorithm.. k
1820: 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c 62 3e 40 ey length), <b>@
1830: 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e 3c 69 3e SECLEVEL=</b><i>
1840: 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65 63 75 72 n</i> (set secur
1850: 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a 09 20 20 ity level to..
1860: 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e 44 45 46 n), and <b>DEF
1870: 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65 20 64 65 AULT</b> (use de
1880: 66 61 75 6c 74 20 63 69 70 68 65 72 20 6c 69 73 fault cipher lis
1890: 74 2c 20 61 74 20 73 74 61 72 74 20 6f 6e 6c 79 t, at start only
18a0: 29 0a 09 20 20 20 20 63 61 6e 20 61 6c 73 6f 20 ).. can also
18b0: 62 65 20 73 70 65 63 69 66 69 65 64 2e 20 53 65 be specified. Se
18c0: 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63 75 6d 65 e OpenSSL docume
18d0: 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 ntation for the
18e0: 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73 74 20 6f full.. list o
18f0: 66 20 76 61 6c 69 64 20 76 61 6c 75 65 73 2e 20 f valid values.
1900: 28 54 4c 53 20 31 2e 32 20 61 6e 64 20 65 61 72 (TLS 1.2 and ear
1910: 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a lier only)</dd>.
1920: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 .<dt><strong>-ci
1930: 70 68 65 72 73 75 69 74 65 73 3c 2f 73 74 72 6f phersuites</stro
1940: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ng> <em>string</
1950: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 em></dt>..<dd>Li
1960: 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 st of cipher sui
1970: 74 65 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69 tes to use. Stri
1980: 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 ng is a colon ("
1990: 3a 22 29 0a 09 20 20 20 20 73 65 70 61 72 61 74 :").. separat
19a0: 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 ed list of ciphe
19b0: 72 20 73 75 69 74 65 20 6e 61 6d 65 73 2e 20 28 r suite names. (
19c0: 54 4c 53 20 31 2e 33 20 6f 6e 6c 79 29 3c 2f 64 TLS 1.3 only)</d
19d0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
19e0: 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 -command</strong
19f0: 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f > <em>callback</
1a00: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 em></dt>..<dd>Ca
1a10: 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 llback command t
1a20: 6f 20 69 6e 76 6f 6b 65 20 61 74 20 73 65 76 65 o invoke at seve
1a30: 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 6e ral points durin
1a40: 67 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 2e g the handshake.
1a50: 0a 09 20 20 20 20 54 68 69 73 20 69 73 20 75 73 .. This is us
1a60: 65 64 20 74 6f 20 70 61 73 73 20 65 72 72 6f 72 ed to pass error
1a70: 73 20 61 6e 64 20 74 72 61 63 69 6e 67 20 69 6e s and tracing in
1a80: 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 0a 09 formation, and..
1a90: 20 20 20 20 69 74 20 63 61 6e 20 61 6c 6c 6f 77 it can allow
1aa0: 20 54 63 6c 20 73 63 72 69 70 74 73 20 74 6f 20 Tcl scripts to
1ab0: 70 65 72 66 6f 72 6d 20 74 68 65 69 72 20 6f 77 perform their ow
1ac0: 6e 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 n certificate..
1ad0: 20 20 20 76 61 6c 69 64 61 74 69 6f 6e 20 69 6e validation in
1ae0: 20 70 6c 61 63 65 20 6f 66 20 74 68 65 20 64 65 place of the de
1af0: 66 61 75 6c 74 20 76 61 6c 69 64 61 74 69 6f 6e fault validation
1b00: 20 70 72 6f 76 69 64 65 64 20 62 79 0a 09 20 20 provided by..
1b10: 20 20 4f 70 65 6e 53 53 4c 2e 20 53 65 65 20 3c OpenSSL. See <
1b20: 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 a href="#CALLBAC
1b30: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 K OPTIONS">CALLB
1b40: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a ACK OPTIONS</a>.
1b50: 09 20 20 20 20 66 6f 72 20 66 75 72 74 68 65 72 . for further
1b60: 20 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 discussion.</dd
1b70: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1b80: 64 68 70 61 72 61 6d 73 20 3c 2f 73 74 72 6f 6e dhparams </stron
1b90: 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f g><em>filename</
1ba0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 em></dt>..<dd>Sp
1bb0: 65 63 69 66 79 20 74 68 65 20 44 69 66 66 69 65 ecify the Diffie
1bc0: 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 6d 65 74 -Hellman paramet
1bd0: 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a 09 ers file.</dd>..
1be0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 <dt><strong>-key
1bf0: 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 file</strong> <e
1c00: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c m>filename</em><
1c10: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 /dt>..<dd>Specif
1c20: 79 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 y the private ke
1c30: 79 20 66 69 6c 65 2e 20 28 64 65 66 61 75 6c 74 y file. (default
1c40: 20 69 73 0a 09 20 20 20 20 76 61 6c 75 65 20 6f is.. value o
1c50: 66 20 2d 63 65 72 74 66 69 6c 65 29 3c 2f 64 64 f -certfile)</dd
1c60: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1c70: 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d key</strong> <em
1c80: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f >filename</em></
1c90: 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 dt>..<dd>Specify
1ca0: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 the private key
1cb0: 20 74 6f 20 75 73 65 20 61 73 20 61 20 44 45 52 to use as a DER
1cc0: 20 65 6e 63 6f 64 65 64 20 76 61 6c 75 65 20 28 encoded value (
1cd0: 50 4b 43 53 23 31 20 44 45 52 29 3c 2f 64 64 3e PKCS#1 DER)</dd>
1ce0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6d ..<dt><strong>-m
1cf0: 6f 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 odel</strong> <e
1d00: 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f m>channel</em></
1d10: 64 74 3e 0a 09 3c 64 64 3e 46 6f 72 63 65 20 74 dt>..<dd>Force t
1d20: 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73 his channel to s
1d30: 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 3c 65 hare the same <e
1d40: 6d 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c 5f 43 54 m><strong>SSL_CT
1d50: 58 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65 6d 3e 0a X</strong></em>.
1d60: 09 20 20 20 20 73 74 72 75 63 74 75 72 65 20 61 . structure a
1d70: 73 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 s the specified
1d80: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e <em>channel</em>
1d90: 2c 20 61 6e 64 0a 09 20 20 20 20 74 68 65 72 65 , and.. there
1da0: 66 6f 72 65 20 73 68 61 72 65 20 63 61 6c 6c 62 fore share callb
1db0: 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 3e 0a 09 acks etc.</dd>..
1dc0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 <dt><strong>-pas
1dd0: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c sword</strong> <
1de0: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
1df0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6c 6c 62 </dt>..<dd>Callb
1e00: 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 ack command to i
1e10: 6e 76 6f 6b 65 20 77 68 65 6e 20 4f 70 65 6e 53 nvoke when OpenS
1e20: 53 4c 20 6e 65 65 64 73 20 74 6f 20 6f 62 74 61 SL needs to obta
1e30: 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 0a 09 in a password...
1e40: 20 20 20 20 54 79 70 69 63 61 6c 6c 79 20 75 73 Typically us
1e50: 65 64 20 74 6f 20 75 6e 6c 6f 63 6b 20 74 68 65 ed to unlock the
1e60: 20 70 72 69 76 61 74 65 20 6b 65 79 20 6f 66 20 private key of
1e70: 61 20 63 65 72 74 69 66 69 63 61 74 65 2e 20 54 a certificate. T
1e80: 68 65 0a 09 20 20 20 20 63 61 6c 6c 62 61 63 6b he.. callback
1e90: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 should return a
1ea0: 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 72 65 string which re
1eb0: 70 72 65 73 65 6e 74 73 20 74 68 65 20 70 61 73 presents the pas
1ec0: 73 77 6f 72 64 0a 09 20 20 20 20 74 6f 20 62 65 sword.. to be
1ed0: 20 75 73 65 64 2e 20 53 65 65 20 3c 61 20 68 72 used. See <a hr
1ee0: 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 ef="#CALLBACK OP
1ef0: 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 TIONS">CALLBACK
1f00: 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 OPTIONS</a>..
1f10: 20 66 6f 72 20 66 75 72 74 68 65 72 20 64 69 73 for further dis
1f20: 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c cussion.</dd>..<
1f30: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 6f 73 74 dt><strong>-post
1f40: 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 6f _handshake</stro
1f50: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
1f60: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 6c 6c 6f ></dt>..<dd>Allo
1f70: 77 20 70 6f 73 74 2d 68 61 6e 64 73 68 61 6b 65 w post-handshake
1f80: 20 74 69 63 6b 65 74 20 75 70 64 61 74 65 73 2e ticket updates.
1f90: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
1fa0: 6e 67 3e 2d 72 65 71 75 65 73 74 20 3c 2f 73 74 ng>-request </st
1fb0: 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 rong><em>bool</e
1fc0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71 m></dt>..<dd>Req
1fd0: 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 uest a certifica
1fe0: 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 te from peer dur
1ff0: 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b ing SSL handshak
2000: 65 2e 0a 09 20 20 20 20 28 64 65 66 61 75 6c 74 e... (default
2010: 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d is <em>true</em
2020: 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 >)</dd>..<dt><st
2030: 72 6f 6e 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 rong>-require</s
2040: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
2050: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 52 /em></dt>..<dd>R
2060: 65 71 75 69 72 65 20 61 20 76 61 6c 69 64 20 63 equire a valid c
2070: 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 ertificate from
2080: 70 65 65 72 20 64 75 72 69 6e 67 20 53 53 4c 20 peer during SSL
2090: 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 handshake...
20a0: 49 66 20 74 68 69 73 20 69 73 20 73 65 74 20 74 If this is set t
20b0: 6f 20 74 72 75 65 2c 20 74 68 65 6e 20 3c 73 74 o true, then <st
20c0: 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 3c 2f 73 rong>-request</s
20d0: 74 72 6f 6e 67 3e 20 6d 75 73 74 0a 09 20 20 20 trong> must..
20e0: 20 61 6c 73 6f 20 62 65 20 73 65 74 20 74 6f 20 also be set to
20f0: 74 72 75 65 20 61 6e 64 20 61 20 65 69 74 68 65 true and a eithe
2100: 72 20 61 20 2d 63 61 64 69 72 2c 20 2d 63 61 66 r a -cadir, -caf
2110: 69 6c 65 2c 20 6f 72 20 70 6c 61 74 66 6f 72 6d ile, or platform
2120: 0a 09 20 20 20 20 64 65 66 61 75 6c 74 20 6d 75 .. default mu
2130: 73 74 20 62 65 20 70 72 6f 76 69 64 65 64 20 69 st be provided i
2140: 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 6c 69 64 n order to valid
2150: 61 74 65 20 61 67 61 69 6e 73 74 2e 0a 09 20 20 ate against...
2160: 20 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 (default is <e
2170: 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 m>false</em>)</d
2180: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
2190: 2d 73 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c -security_level<
21a0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69 6e 74 /strong> <em>int
21b0: 65 67 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 eger</em></dt>..
21c0: 3c 64 64 3e 53 65 74 20 73 65 63 75 72 69 74 79 <dd>Set security
21d0: 20 6c 65 76 65 6c 2e 20 4d 75 73 74 20 62 65 20 level. Must be
21e0: 30 20 74 6f 20 35 2e 20 54 68 65 20 73 65 63 75 0 to 5. The secu
21f0: 72 69 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63 rity level affec
2200: 74 73 0a 09 20 20 20 20 74 68 65 20 63 69 70 68 ts.. the ciph
2210: 65 72 20 73 75 69 74 65 20 65 6e 63 72 79 70 74 er suite encrypt
2220: 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 ion algorithms,
2230: 73 75 70 70 6f 72 74 65 64 20 45 43 43 20 63 75 supported ECC cu
2240: 72 76 65 73 2c 0a 09 20 20 20 20 73 75 70 70 6f rves,.. suppo
2250: 72 74 65 64 20 73 69 67 6e 61 74 75 72 65 20 61 rted signature a
2260: 6c 67 6f 72 69 74 68 6d 73 2c 20 44 48 20 70 61 lgorithms, DH pa
2270: 72 61 6d 65 74 65 72 20 73 69 7a 65 73 2c 20 63 rameter sizes, c
2280: 65 72 74 69 66 69 63 61 74 65 0a 09 20 20 20 20 ertificate..
2290: 6b 65 79 20 73 69 7a 65 73 20 61 6e 64 20 73 69 key sizes and si
22a0: 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 gnature algorith
22b0: 6d 73 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 ms. The default
22c0: 69 73 20 31 2e 0a 09 20 20 20 20 4c 65 76 65 6c is 1... Level
22d0: 20 33 20 61 6e 64 20 68 69 67 68 65 72 20 64 69 3 and higher di
22e0: 73 61 62 6c 65 20 73 75 70 70 6f 72 74 20 66 6f sable support fo
22f0: 72 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 r session ticket
2300: 73 20 61 6e 64 20 6f 6e 6c 79 0a 09 20 20 20 20 s and only..
2310: 61 63 63 65 70 74 20 63 69 70 68 65 72 20 73 75 accept cipher su
2320: 69 74 65 73 20 74 68 61 74 20 70 72 6f 76 69 64 ites that provid
2330: 65 20 66 6f 72 77 61 72 64 20 73 65 63 72 65 63 e forward secrec
2340: 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 y.</dd>..<dt><st
2350: 72 6f 6e 67 3e 2d 73 65 72 76 65 72 3c 2f 73 74 rong>-server</st
2360: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f rong> <em>bool</
2370: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 em></dt>..<dd>Se
2380: 74 20 74 6f 20 61 63 74 20 61 73 20 61 20 73 65 t to act as a se
2390: 72 76 65 72 20 61 6e 64 20 72 65 73 70 6f 6e 64 rver and respond
23a0: 20 77 69 74 68 20 61 20 73 65 72 76 65 72 20 68 with a server h
23b0: 61 6e 64 73 68 61 6b 65 20 77 68 65 6e 0a 09 20 andshake when..
23c0: 20 20 20 61 20 63 6c 69 65 6e 74 20 63 6f 6e 6e a client conn
23d0: 65 63 74 73 20 61 6e 64 20 70 72 6f 76 69 64 65 ects and provide
23e0: 73 20 61 20 63 6c 69 65 6e 74 20 68 61 6e 64 73 s a client hands
23f0: 68 61 6b 65 2e 0a 09 20 20 20 20 28 64 65 66 61 hake... (defa
2400: 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 ult is <em>false
2410: 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 </em>)</dd>..<dt
2420: 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 65 72 ><strong>-server
2430: 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 name</strong> <e
2440: 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e m>host</em></dt>
2450: 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 20 73 65 ..<dd>Specify se
2460: 72 76 65 72 27 73 20 68 6f 73 74 6e 61 6d 65 2e rver's hostname.
2470: 20 55 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 Used to set the
2480: 20 54 4c 53 20 27 53 65 72 76 65 72 20 4e 61 6d TLS 'Server Nam
2490: 65 0a 09 20 20 20 20 49 6e 64 69 63 61 74 69 6f e.. Indicatio
24a0: 6e 27 20 28 53 4e 49 29 20 65 78 74 65 6e 73 69 n' (SNI) extensi
24b0: 6f 6e 2e 20 53 65 74 20 74 6f 20 74 68 65 20 65 on. Set to the e
24c0: 78 70 65 63 74 65 64 20 73 65 72 76 65 72 6e 61 xpected serverna
24d0: 6d 65 0a 09 20 20 20 20 69 6e 20 74 68 65 20 73 me.. in the s
24e0: 65 72 76 65 72 27 73 20 63 65 72 74 69 66 69 63 erver's certific
24f0: 61 74 65 20 6f 72 20 6f 6e 65 20 6f 66 20 74 68 ate or one of th
2500: 65 20 73 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65 e subjectAltName
2510: 0a 09 20 20 20 20 61 6c 74 65 72 6e 61 74 65 73 .. alternates
2520: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
2530: 6f 6e 67 3e 2d 73 65 73 73 69 6f 6e 5f 69 64 3c ong>-session_id<
2540: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 /strong> <em>str
2550: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ing</em></dt>..<
2560: 64 64 3e 53 65 73 73 69 6f 6e 20 69 64 20 74 6f dd>Session id to
2570: 20 72 65 73 75 6d 65 20 73 65 73 73 69 6f 6e 2e resume session.
2580: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
2590: 6e 67 3e 2d 73 73 6c 32 3c 2f 73 74 72 6f 6e 67 ng>-ssl2</strong
25a0: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c > <em>bool</em><
25b0: 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 /dt>..<dd>Enable
25c0: 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32 2e 20 use of SSL v2.
25d0: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
25e0: 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e false</em>)</dd>
25f0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 ..<dt><strong>-s
2600: 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d sl3 </strong><em
2610: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
2620: 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 .<dd>Enable use
2630: 6f 66 20 53 53 4c 20 76 33 2e 20 28 64 65 66 61 of SSL v3. (defa
2640: 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 ult is <em>false
2650: 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 </em>)</dd>..<dt
2660: 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 3c 2f >-<strong>tls1</
2670: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c strong> <em>bool
2680: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
2690: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c Enable use of TL
26a0: 53 20 76 31 2e 20 28 64 65 66 61 75 6c 74 20 69 S v1. (default i
26b0: 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 s <em>true</em>)
26c0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 </dd>..<dt>-<str
26d0: 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73 74 72 6f ong>tls1.1</stro
26e0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
26f0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 ></dt>..<dd>Enab
2700: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
2710: 2e 31 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c .1 (default is <
2720: 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 em>true</em>)</d
2730: 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 d>..<dt>-<strong
2740: 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67 3e >tls1.2</strong>
2750: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f <em>bool</em></
2760: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 dt>..<dd>Enable
2770: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 20 use of TLS v1.2
2780: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
2790: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a true</em>)</dd>.
27a0: 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c .<dt>-<strong>tl
27b0: 73 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 s1.3</strong> <e
27c0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e m>bool</em></dt>
27d0: 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 ..<dd>Enable use
27e0: 20 6f 66 20 54 4c 53 20 76 31 2e 33 20 28 64 65 of TLS v1.3 (de
27f0: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 fault is <em>tru
2800: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 e</em>)</dd>..<d
2810: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 t><strong>-valid
2820: 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f atecommand</stro
2830: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ng> <em>callback
2840: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
2850: 43 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 Callback command
2860: 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 76 65 to invoke to ve
2870: 72 69 66 79 20 6f 72 20 76 61 6c 69 64 61 74 65 rify or validate
2880: 20 70 72 6f 74 6f 63 6f 6c 20 63 6f 6e 66 69 67 protocol config
2890: 0a 09 20 20 20 20 70 61 72 61 6d 65 74 65 72 73 .. parameters
28a0: 20 64 75 72 69 6e 67 20 74 68 65 20 70 72 6f 74 during the prot
28b0: 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 74 69 6f 6e ocol negotiation
28c0: 20 70 68 61 73 65 2e 20 53 65 65 0a 09 20 20 20 phase. See..
28d0: 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 <a href="#CALLB
28e0: 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c ACK OPTIONS">CAL
28f0: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 LBACK OPTIONS</a
2900: 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 72 74 68 >.. for furth
2910: 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f er discussion.</
2920: 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f dd>. </dl>.</
2930: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 blockquote>..
2940: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
2950: 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e s::unimport"><b>
2960: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 3c 2f tls::unimport </
2970: 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e b><i>channel</i>
2980: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
2990: 64 3e 50 72 6f 76 69 64 65 64 20 66 6f 72 20 73 d>Provided for s
29a0: 79 6d 6d 65 74 72 79 20 74 6f 20 3c 73 74 72 6f ymmetry to <stro
29b0: 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f ng>tls::import</
29c0: 73 74 72 6f 6e 67 3e 2c 20 74 68 69 73 0a 20 20 strong>, this.
29d0: 20 20 20 20 75 6e 73 74 61 63 6b 73 20 74 68 65 unstacks the
29e0: 20 65 6e 63 72 79 70 74 69 6f 6e 20 6f 66 20 61 encryption of a
29f0: 20 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68 61 regular Tcl cha
2a00: 6e 6e 65 6c 2e 20 41 6e 20 65 72 72 6f 72 0a 20 nnel. An error.
2a10: 20 20 20 20 20 69 73 20 74 68 72 6f 77 6e 20 69 is thrown i
2a20: 66 20 54 4c 53 20 69 73 20 6e 6f 74 20 74 68 65 f TLS is not the
2a30: 20 74 6f 70 20 73 74 61 63 6b 65 64 20 63 68 61 top stacked cha
2a40: 6e 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 64 3e 0a nnel type.</dd>.
2a50: 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f <dt> </
2a60: 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e dt>. <dt><a n
2a70: 61 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e 64 73 68 ame="tls::handsh
2a80: 61 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 ake"><strong>tls
2a90: 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 73 74 72 ::handshake</str
2aa0: 6f 6e 67 3e 0a 09 3c 65 6d 3e 63 68 61 6e 6e 65 ong>..<em>channe
2ab0: 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a l</em></a></dt>.
2ac0: 20 20 20 20 3c 64 64 3e 46 6f 72 63 65 73 20 68 <dd>Forces h
2ad0: 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61 6b 65 andshake to take
2ae0: 20 70 6c 61 63 65 2c 20 61 6e 64 20 72 65 74 75 place, and retu
2af0: 72 6e 73 20 30 20 69 66 0a 09 68 61 6e 64 73 68 rns 0 if..handsh
2b00: 61 6b 65 20 69 73 20 73 74 69 6c 6c 20 69 6e 20 ake is still in
2b10: 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e 2d 62 6c progress (non-bl
2b20: 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31 20 69 66 ocking), or 1 if
2b30: 0a 09 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 ..the handshake
2b40: 77 61 73 20 73 75 63 63 65 73 73 66 75 6c 2e 20 was successful.
2b50: 49 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 If the handshake
2b60: 20 66 61 69 6c 65 64 0a 09 74 68 69 73 20 72 6f failed..this ro
2b70: 75 74 69 6e 65 20 77 69 6c 6c 20 74 68 72 6f 77 utine will throw
2b80: 20 61 6e 20 65 72 72 6f 72 2e 3c 2f 64 64 3e 0a an error.</dd>.
2b90: 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f <dt> </
2ba0: 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e dt>. <dt><a n
2bb0: 61 6d 65 3d 22 74 6c 73 3a 3a 73 74 61 74 75 73 ame="tls::status
2bc0: 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 "><strong>tls::s
2bd0: 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 tatus</strong>.
2be0: 20 20 20 3c 65 6d 3e 3f 3c 2f 65 6d 3e 3c 62 3e <em>?</em><b>
2bf0: 2d 6c 6f 63 61 6c 3c 2f 62 3e 3c 65 6d 3e 3f 20 -local</b><em>?
2c00: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e channel</em></a>
2c10: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 </dt>. <dd>Re
2c20: 74 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e turns the curren
2c30: 74 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 t status of an S
2c40: 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 SL channel. The
2c50: 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 result is a list
2c60: 0a 09 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 ..of key-value p
2c70: 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 airs describing
2c80: 74 68 65 20 53 53 4c 2c 20 63 65 72 74 69 66 69 the SSL, certifi
2c90: 63 61 74 65 2c 20 61 6e 64 20 63 65 72 74 69 66 cate, and certif
2ca0: 69 63 61 74 65 0a 09 76 65 72 69 66 69 63 61 74 icate..verificat
2cb0: 69 6f 6e 20 73 74 61 74 75 73 2e 20 49 66 20 74 ion status. If t
2cc0: 68 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 he SSL handshake
2cd0: 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d has not yet com
2ce0: 70 6c 65 74 65 64 2c 0a 09 61 6e 20 65 6d 70 74 pleted,..an empt
2cf0: 79 20 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e y list is return
2d00: 65 64 2e 20 49 66 20 3c 62 3e 2d 6c 6f 63 61 6c ed. If <b>-local
2d10: 3c 2f 62 3e 20 69 73 20 73 70 65 63 69 66 69 65 </b> is specifie
2d20: 64 2c 20 74 68 65 6e 20 74 68 65 0a 09 6c 6f 63 d, then the..loc
2d30: 61 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 al certificate i
2d40: 73 20 75 73 65 64 2e 3c 2f 64 64 3e 0a 3c 62 6c s used.</dd>.<bl
2d50: 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 ockquote>..<b>SS
2d60: 4c 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 L Status</b>.
2d70: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f <dl>..<dt><stro
2d80: 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e ng>alpn</strong>
2d90: 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 <em>protocol</e
2da0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
2db0: 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 protocol select
2dc0: 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 ed after Applica
2dd0: 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f tion-Layer Proto
2de0: 63 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 col.. Negotia
2df0: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 tion (ALPN).</dd
2e00: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 >..<dt><strong>c
2e10: 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c ipher</strong> <
2e20: 65 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e 3c 2f em>cipher</em></
2e30: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 75 72 dt>..<dd>The cur
2e40: 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 75 rent cipher in u
2e50: 73 65 20 62 65 74 77 65 65 6e 20 66 6f 72 20 74 se between for t
2e60: 68 65 20 63 68 61 6e 6e 65 6c 2e 3c 2f 64 64 3e he channel.</dd>
2e70: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 65 ..<dt><strong>pe
2e80: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 ername</strong>
2e90: 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 <em>name</em></d
2ea0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 65 65 72 t>..<dd>The peer
2eb0: 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 name from the ce
2ec0: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
2ed0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f .<dt><strong>pro
2ee0: 74 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c tocol</strong> <
2ef0: 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c em>version</em><
2f00: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 /dt>..<dd>The pr
2f10: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 otocol version u
2f20: 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e sed for the conn
2f30: 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 53 53 4c ection:.. SSL
2f40: 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 2, SSL3, TLS1, T
2f50: 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54 LS1.1, TLS1.2, T
2f60: 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 LS1.3, or unknow
2f70: 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 n.</dd>..<dt><st
2f80: 72 6f 6e 67 3e 73 62 69 74 73 3c 2f 73 74 72 6f rong>sbits</stro
2f90: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f ng> <em>n</em></
2fa0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d dt>..<dd>The num
2fb0: 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 ber of bits used
2fc0: 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e for the session
2fd0: 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e key.</dd>..<dt>
2fe0: 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 <strong>signatur
2ff0: 65 48 61 73 68 41 6c 67 6f 72 69 74 68 6d 3c 2f eHashAlgorithm</
3000: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f strong> <em>algo
3010: 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a rithm</em></dt>.
3020: 09 3c 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 .<dd>The signatu
3030: 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 re hash algorith
3040: 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 m.</dd>..<dt><st
3050: 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 54 79 rong>signatureTy
3060: 70 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e pe</strong> <em>
3070: 74 79 70 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 type</em></dt>..
3080: 3c 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 <dd>The signatur
3090: 65 20 74 79 70 65 20 76 61 6c 75 65 2e 3c 2f 64 e type value.</d
30a0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
30b0: 76 65 72 69 66 79 44 65 70 74 68 3c 2f 73 74 72 verifyDepth</str
30c0: 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c ong> <em>n</em><
30d0: 2f 64 74 3e 0a 09 3c 64 64 3e 4d 61 78 69 6d 75 /dt>..<dd>Maximu
30e0: 6d 20 64 65 70 74 68 20 66 6f 72 20 74 68 65 20 m depth for the
30f0: 63 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 certificate chai
3100: 6e 20 76 65 72 69 66 69 63 61 74 69 6f 6e 2e 0a n verification..
3110: 09 20 20 20 20 44 65 66 61 75 6c 74 20 69 73 20 . Default is
3120: 2d 31 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c -1, to check all
3130: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
3140: 6f 6e 67 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f ong>verifyMode</
3150: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 strong> <em>list
3160: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3170: 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 List of certific
3180: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e ate verification
3190: 20 6d 6f 64 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 modes.</dd>..<d
31a0: 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 t><strong>verify
31b0: 52 65 73 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 20 Result</strong>
31c0: 3c 65 6d 3e 72 65 73 75 6c 74 3c 2f 65 6d 3e 3c <em>result</em><
31d0: 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 /dt>..<dd>Certif
31e0: 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 icate verificati
31f0: 6f 6e 20 72 65 73 75 6c 74 2e 3c 2f 64 64 3e 0a on result.</dd>.
3200: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 61 5f .<dt><strong>ca_
3210: 6e 61 6d 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c names</strong> <
3220: 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 em>list</em></dt
3230: 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 74 >..<dd>List of t
3240: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 he Certificate A
3250: 75 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 uthorities used
3260: 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 65 to create the ce
3270: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
3280: 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 </dl>.</bloc
3290: 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 kquote>.<blockqu
32a0: 6f 74 65 3e 0a 09 3c 62 3e 43 65 72 74 69 66 69 ote>..<b>Certifi
32b0: 63 61 74 65 20 53 74 61 74 75 73 3c 2f 62 3e 0a cate Status</b>.
32c0: 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 <dl>..<dt><s
32d0: 74 72 6f 6e 67 3e 61 6c 6c 3c 2f 73 74 72 6f 6e trong>all</stron
32e0: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
32f0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 44 75 6d m></dt>..<dd>Dum
3300: 70 20 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 69 p of all certifi
3310: 63 61 74 65 20 69 6e 66 6f 2e 3c 2f 64 64 3e 0a cate info.</dd>.
3320: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 ..<dt><strong>ve
3330: 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c rsion</strong> <
3340: 65 6d 3e 76 61 6c 75 65 3c 2f 65 6d 3e 3c 2f 64 em>value</em></d
3350: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 65 72 74 t>..<dd>The cert
3360: 69 66 69 63 61 74 65 20 76 65 72 73 69 6f 6e 2e ificate version.
3370: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3380: 6e 67 3e 73 65 72 69 61 6c 4e 75 6d 62 65 72 3c ng>serialNumber<
3390: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f /strong> <em>n</
33a0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
33b0: 65 20 73 65 72 69 61 6c 20 6e 75 6d 62 65 72 20 e serial number
33c0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
33d0: 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69 te as a hex stri
33e0: 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 ng.</dd>..<dt><s
33f0: 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 3c trong>signature<
3400: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 /strong> <em>alg
3410: 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e orithm</em></dt>
3420: 0a 09 3c 64 64 3e 43 69 70 68 65 72 20 61 6c 67 ..<dd>Cipher alg
3430: 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72 20 orithm used for
3440: 63 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e certificate sign
3450: 61 74 75 72 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 ature.</dd>..<dt
3460: 3e 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 3c ><strong>issuer<
3470: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c /strong> <em>dn<
3480: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
3490: 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 he distinguished
34a0: 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 name (DN) of th
34b0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 e certificate is
34c0: 73 75 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e suer.</dd>..<dt>
34d0: 3c 73 74 72 6f 6e 67 3e 6e 6f 74 42 65 66 6f 72 <strong>notBefor
34e0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 e</strong> <em>d
34f0: 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ate</em></dt>..<
3500: 64 64 3e 54 68 65 20 62 65 67 69 6e 20 64 61 74 dd>The begin dat
3510: 65 20 66 6f 72 20 74 68 65 20 76 61 6c 69 64 69 e for the validi
3520: 74 79 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 ty of the certif
3530: 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 icate.</dd>..<dt
3540: 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 66 74 65 ><strong>notAfte
3550: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 r</strong> <em>d
3560: 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ate</em></dt>..<
3570: 64 64 3e 54 68 65 20 65 78 70 69 72 61 74 69 6f dd>The expiratio
3580: 6e 20 64 61 74 65 20 66 6f 72 20 74 68 65 20 63 n date for the c
3590: 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e ertificate.</dd>
35a0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 ..<dt><strong>su
35b0: 62 6a 65 63 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c bject</strong> <
35c0: 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a em>dn</em></dt>.
35d0: 09 3c 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67 .<dd>The disting
35e0: 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 uished name (DN)
35f0: 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 of the certific
3600: 61 74 65 20 73 75 62 6a 65 63 74 2e 0a 09 20 20 ate subject...
3610: 20 20 46 69 65 6c 64 73 20 69 6e 63 6c 75 64 65 Fields include
3620: 3a 20 43 6f 6d 6d 6f 6e 20 4e 61 6d 65 20 28 43 : Common Name (C
3630: 4e 29 2c 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e N), Organization
3640: 20 28 4f 29 2c 20 4c 6f 63 61 6c 69 74 79 0a 09 (O), Locality..
3650: 20 20 20 20 6f 72 20 43 69 74 79 20 28 4c 29 2c or City (L),
3660: 20 53 74 61 74 65 20 6f 72 20 50 72 6f 76 69 6e State or Provin
3670: 63 65 20 28 53 29 2c 20 61 6e 64 20 43 6f 75 6e ce (S), and Coun
3680: 74 72 79 20 4e 61 6d 65 20 28 43 29 2e 3c 2f 64 try Name (C).</d
3690: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
36a0: 69 73 73 75 65 72 55 6e 69 71 75 65 49 44 3c 2f issuerUniqueID</
36b0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 strong> <em>stri
36c0: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ng</em></dt>..<d
36d0: 64 3e 54 68 65 20 69 73 73 75 65 72 20 75 6e 69 d>The issuer uni
36e0: 71 75 65 20 69 64 2e 3c 2f 64 64 3e 0a 09 3c 64 que id.</dd>..<d
36f0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 t><strong>subjec
3700: 74 55 6e 69 71 75 65 49 44 3c 2f 73 74 72 6f 6e tUniqueID</stron
3710: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
3720: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
3730: 20 73 75 62 6a 65 63 74 20 75 6e 69 71 75 65 20 subject unique
3740: 69 64 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c id.</dd>...<dt><
3750: 73 74 72 6f 6e 67 3e 6e 75 6d 5f 65 78 74 65 6e strong>num_exten
3760: 73 69 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c sions</strong> <
3770: 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 em>n</em></dt>..
3780: 3c 64 64 3e 4e 75 6d 62 65 72 20 6f 66 20 63 65 <dd>Number of ce
3790: 72 74 69 66 69 63 61 74 65 20 65 78 74 65 6e 73 rtificate extens
37a0: 69 6f 6e 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e ions.</dd>..<dt>
37b0: 3c 73 74 72 6f 6e 67 3e 65 78 74 65 6e 73 69 6f <strong>extensio
37c0: 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ns</strong> <em>
37d0: 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 list</em></dt>..
37e0: 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 <dd>List of cert
37f0: 69 66 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f ificate extensio
3800: 6e 20 6e 61 6d 65 73 2e 3c 2f 64 64 3e 0a 09 3c n names.</dd>..<
3810: 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 75 74 68 6f dt><strong>autho
3820: 72 69 74 79 4b 65 79 49 64 65 6e 74 69 66 69 65 rityKeyIdentifie
3830: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 r</strong> <em>s
3840: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
3850: 09 3c 64 64 3e 28 41 4b 49 29 20 4b 65 79 20 69 .<dd>(AKI) Key i
3860: 64 65 6e 74 69 66 69 65 72 20 6f 66 20 74 68 65 dentifier of the
3870: 20 49 73 73 75 69 6e 67 20 43 41 20 63 65 72 74 Issuing CA cert
3880: 69 66 69 63 61 74 65 20 74 68 61 74 20 73 69 67 ificate that sig
3890: 6e 65 64 0a 09 20 20 20 20 74 68 65 20 53 53 4c ned.. the SSL
38a0: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 certificate as
38b0: 61 20 68 65 78 20 73 74 72 69 6e 67 2e 20 54 68 a hex string. Th
38c0: 69 73 20 76 61 6c 75 65 20 6d 61 74 63 68 65 73 is value matches
38d0: 20 74 68 65 20 53 4b 49 0a 09 20 20 20 20 76 61 the SKI.. va
38e0: 6c 75 65 20 6f 66 20 74 68 65 20 49 6e 74 65 72 lue of the Inter
38f0: 6d 65 64 69 61 74 65 20 43 41 20 63 65 72 74 69 mediate CA certi
3900: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 ficate.</dd>..<d
3910: 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 t><strong>subjec
3920: 74 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f tKeyIdentifier</
3930: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 strong> <em>stri
3940: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ng</em></dt>..<d
3950: 64 3e 28 53 4b 49 29 20 48 61 73 68 20 6f 66 20 d>(SKI) Hash of
3960: 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 69 the public key i
3970: 6e 73 69 64 65 20 74 68 65 20 63 65 72 74 69 66 nside the certif
3980: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 0a 09 icate as a hex..
3990: 20 20 20 73 74 72 69 6e 67 2e 20 55 73 65 64 20 string. Used
39a0: 74 6f 20 69 64 65 6e 74 69 66 79 20 63 65 72 74 to identify cert
39b0: 69 66 69 63 61 74 65 73 20 74 68 61 74 20 63 6f ificates that co
39c0: 6e 74 61 69 6e 20 61 20 70 61 72 74 69 63 75 6c ntain a particul
39d0: 61 72 0a 09 20 20 20 70 75 62 6c 69 63 20 6b 65 ar.. public ke
39e0: 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 y.</dd>..<dt><st
39f0: 72 6f 6e 67 3e 73 75 62 6a 65 63 74 41 6c 74 4e rong>subjectAltN
3a00: 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ame</strong> <em
3a10: 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >list</em></dt>.
3a20: 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c 6c .<dd>List of all
3a30: 20 6f 66 20 74 68 65 20 61 6c 74 65 72 6e 61 74 of the alternat
3a40: 69 76 65 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 73 ive domain names
3a50: 2c 20 73 75 62 20 64 6f 6d 61 69 6e 73 2c 0a 09 , sub domains,..
3a60: 20 20 20 20 61 6e 64 20 49 50 20 61 64 64 72 65 and IP addre
3a70: 73 73 65 73 20 74 68 61 74 20 61 72 65 20 73 65 sses that are se
3a80: 63 75 72 65 64 20 62 79 20 74 68 65 20 63 65 72 cured by the cer
3a90: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 tificate.</dd>..
3aa0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6f 63 73 70 <dt><strong>ocsp
3ab0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 </strong> <em>li
3ac0: 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 st</em></dt>..<d
3ad0: 64 3e 4c 69 73 74 20 6f 66 20 61 6c 6c 20 4f 6e d>List of all On
3ae0: 6c 69 6e 65 20 43 65 72 74 69 66 69 63 61 74 65 line Certificate
3af0: 20 53 74 61 74 75 73 20 50 72 6f 74 6f 63 6f 6c Status Protocol
3b00: 20 28 4f 43 53 50 29 20 55 52 4c 73 2e 3c 2f 64 (OCSP) URLs.</d
3b10: 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 d>...<dt><strong
3b20: 3e 63 65 72 74 69 66 69 63 61 74 65 3c 2f 73 74 >certificate</st
3b30: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 65 72 74 3c 2f rong> <em>cert</
3b40: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
3b50: 65 20 50 45 4d 20 65 6e 63 6f 64 65 64 20 63 65 e PEM encoded ce
3b60: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a rtificate.</dd>.
3b70: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 ..<dt><strong>si
3b80: 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 74 68 6d gnatureAlgorithm
3b90: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c </strong> <em>al
3ba0: 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 gorithm</em></dt
3bb0: 3e 0a 09 3c 64 64 3e 43 69 70 68 65 72 20 61 6c >..<dd>Cipher al
3bc0: 67 6f 72 69 74 68 6d 20 75 73 65 64 20 66 6f 72 gorithm used for
3bd0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
3be0: 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e signature.</dd>
3bf0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 ..<dt><strong>si
3c00: 67 6e 61 74 75 72 65 56 61 6c 75 65 3c 2f 73 74 gnatureValue</st
3c10: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 rong> <em>string
3c20: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3c30: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e Certificate sign
3c40: 61 74 75 72 65 20 61 73 20 61 20 68 65 78 20 73 ature as a hex s
3c50: 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 tring.</dd>..<dt
3c60: 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 ><strong>signatu
3c70: 72 65 44 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 reDigest</strong
3c80: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 > <em>version</e
3c90: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 m></dt>..<dd>Cer
3ca0: 74 69 66 69 63 61 74 65 20 73 69 67 6e 69 6e 67 tificate signing
3cb0: 20 64 69 67 65 73 74 20 61 73 20 61 20 68 65 78 digest as a hex
3cc0: 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c string.</dd>..<
3cd0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 dt><strong>publi
3ce0: 63 4b 65 79 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 cKeyAlgorithm</s
3cf0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 trong> <em>algor
3d00: 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 ithm</em></dt>..
3d10: 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 <dd>Certificate
3d20: 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 signature public
3d30: 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 3c key algorithm.<
3d40: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3d50: 67 3e 70 75 62 6c 69 63 4b 65 79 3c 2f 73 74 72 g>publicKey</str
3d60: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c ong> <em>string<
3d70: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 /em></dt>..<dd>C
3d80: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
3d90: 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 ture public key
3da0: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e as a hex string.
3db0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3dc0: 6e 67 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e ng>bits</strong>
3dd0: 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e <em>n</em></dt>
3de0: 0a 09 3c 64 64 3e 4e 75 6d 62 65 72 20 6f 66 20 ..<dd>Number of
3df0: 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 65 bits used for ce
3e00: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 rtificate signat
3e10: 75 72 65 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c ure key.</dd>..<
3e20: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 6c 66 5f dt><strong>self_
3e30: 73 69 67 6e 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 signed</strong>
3e40: 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e <em>boolean</em>
3e50: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 </dt>..<dd>Wheth
3e60: 65 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61 er the certifica
3e70: 74 65 20 73 69 67 6e 61 74 75 72 65 20 69 73 20 te signature is
3e80: 73 65 6c 66 20 73 69 67 6e 65 64 2e 3c 2f 64 64 self signed.</dd
3e90: 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e >...<dt><strong>
3ea0: 73 68 61 31 5f 68 61 73 68 3c 2f 73 74 72 6f 6e sha1_hash</stron
3eb0: 67 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e g> <em>hash</em>
3ec0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 </dt>..<dd>The S
3ed0: 48 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 HA1 hash of the
3ee0: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 61 certificate as a
3ef0: 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 hex string.</dd
3f00: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
3f10: 68 61 32 35 36 5f 68 61 73 68 3c 2f 73 74 72 6f ha256_hash</stro
3f20: 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d ng> <em>hash</em
3f30: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
3f40: 53 48 41 32 35 36 20 68 61 73 68 20 6f 66 20 74 SHA256 hash of t
3f50: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 he certificate a
3f60: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c s a hex string.<
3f70: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c /dd>. </dl>.<
3f80: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 /blockquote>..
3f90: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
3fa0: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e ls::connection">
3fb0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 6f 6e <strong>tls::con
3fc0: 6e 65 63 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e nection</strong>
3fd0: 0a 20 20 20 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c . <em>channel
3fe0: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
3ff0: 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 <dd>Returns t
4000: 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65 he current conne
4010: 63 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66 20 ction status of
4020: 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 an SSL channel.
4030: 54 68 65 0a 09 72 65 73 75 6c 74 20 69 73 20 61 The..result is a
4040: 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c list of key-val
4050: 75 65 20 70 61 69 72 73 20 64 65 73 63 72 69 62 ue pairs describ
4060: 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 ing the connecti
4070: 6f 6e 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71 on.</dd>.<blockq
4080: 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c 20 53 74 uote>..<b>SSL St
4090: 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c atus</b>. <dl
40a0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
40b0: 74 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 tate</strong> <e
40c0: 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 m>state</em></dt
40d0: 3e 0a 09 3c 64 64 3e 53 74 61 74 65 20 6f 66 20 >..<dd>State of
40e0: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c the connection.<
40f0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4100: 67 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 g>servername</st
4110: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f rong> <em>name</
4120: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
4130: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f e name of the co
4140: 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 nnected to serve
4150: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 r.</dd>..<dt><st
4160: 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 73 rong>protocol</s
4170: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 trong> <em>versi
4180: 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 on</em></dt>..<d
4190: 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 d>The protocol v
41a0: 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 ersion used for
41b0: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 0a the connection:.
41c0: 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c 33 2c . SSL2, SSL3,
41d0: 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 TLS1, TLS1.1, T
41e0: 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f LS1.2, TLS1.3, o
41f0: 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a r unknown.</dd>.
4200: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 65 6e .<dt><strong>ren
4210: 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c 6f 77 egotiation_allow
4220: 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ed</strong> <em>
4230: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 boolean</em></dt
4240: 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20 70 >..<dd>Whether p
4250: 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f 74 69 rotocol renegoti
4260: 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f 72 74 ation is support
4270: 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a ed or not.</dd>.
4280: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 .<dt><strong>sec
4290: 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 73 74 72 urity_level</str
42a0: 6f 6e 67 3e 20 3c 65 6d 3e 6c 65 76 65 6c 3c 2f ong> <em>level</
42b0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
42c0: 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c e security level
42d0: 20 75 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74 used for select
42e0: 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20 ion of ciphers,
42f0: 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f key size, etc.</
4300: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4310: 3e 73 65 73 73 69 6f 6e 5f 72 65 75 73 65 64 3c >session_reused<
4320: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
4330: 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 lean</em></dt>..
4340: 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 20 <dd>Whether the
4350: 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65 65 6e session has been
4360: 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74 2e 3c reused or not.<
4370: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4380: 67 3e 69 73 5f 73 65 72 76 65 72 3c 2f 73 74 72 g>is_server</str
4390: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e ong> <em>boolean
43a0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
43b0: 57 68 65 74 68 65 72 20 74 68 65 20 63 6f 6e 6e Whether the conn
43c0: 65 63 74 69 6f 6e 20 69 73 20 63 6f 6e 66 69 67 ection is config
43d0: 75 72 65 64 20 61 73 20 61 20 73 65 72 76 65 72 ured as a server
43e0: 20 28 31 29 20 6f 72 20 63 6c 69 65 6e 74 20 28 (1) or client (
43f0: 30 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 0).</dd>..<dt><s
4400: 74 72 6f 6e 67 3e 63 6f 6d 70 72 65 73 73 69 6f trong>compressio
4410: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d n</strong> <em>m
4420: 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ode</em></dt>..<
4430: 64 64 3e 43 6f 6d 70 72 65 73 73 69 6f 6e 20 6d dd>Compression m
4440: 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 ethod.</dd>..<dt
4450: 3e 3c 73 74 72 6f 6e 67 3e 65 78 70 61 6e 73 69 ><strong>expansi
4460: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e on</strong> <em>
4470: 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 mode</em></dt>..
4480: 3c 64 64 3e 45 78 70 61 6e 73 69 6f 6e 20 6d 65 <dd>Expansion me
4490: 74 68 6f 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e thod.</dd>..<dt>
44a0: 3c 73 74 72 6f 6e 67 3e 63 61 4c 69 73 74 3c 2f <strong>caList</
44b0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 strong> <em>list
44c0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
44d0: 4c 69 73 74 20 6f 66 20 43 65 72 74 69 66 69 63 List of Certific
44e0: 61 74 65 20 41 75 74 68 6f 72 69 74 69 65 73 20 ate Authorities
44f0: 28 43 41 29 20 66 6f 72 20 58 2e 35 30 39 20 63 (CA) for X.509 c
4500: 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e ertificate.</dd>
4510: 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f . </dl>.</blo
4520: 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 ckquote>.<blockq
4530: 75 6f 74 65 3e 0a 09 3c 62 3e 43 69 70 68 65 72 uote>..<b>Cipher
4540: 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c 64 Info</b>. <d
4550: 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e l>..<dt><strong>
4560: 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 cipher</strong>
4570: 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e 3c <em>cipher</em><
4580: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 75 /dt>..<dd>The cu
4590: 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e 20 rrent cipher in
45a0: 75 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e use for the conn
45b0: 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 ection.</dd>..<d
45c0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 6e 64 61 t><strong>standa
45d0: 72 64 5f 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e rd_name</strong>
45e0: 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f <em>name</em></
45f0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 74 61 dt>..<dd>The sta
4600: 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 20 6f ndard RFC name o
4610: 66 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 f cipher.</dd>..
4620: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 67 6f <dt><strong>algo
4630: 72 69 74 68 6d 5f 62 69 74 73 3c 2f 73 74 72 6f rithm_bits</stro
4640: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f ng> <em>n</em></
4650: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d dt>..<dd>The num
4660: 62 65 72 20 6f 66 20 70 72 6f 63 65 73 73 65 64 ber of processed
4670: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 bits used for c
4680: 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 ipher.</dd>..<dt
4690: 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 72 65 74 5f ><strong>secret_
46a0: 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 bits</strong> <e
46b0: 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c m>n</em></dt>..<
46c0: 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 dd>The number of
46d0: 20 73 65 63 72 65 74 20 62 69 74 73 20 75 73 65 secret bits use
46e0: 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64 d for cipher.</d
46f0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
4700: 6d 69 6e 5f 76 65 72 73 69 6f 6e 3c 2f 73 74 72 min_version</str
4710: 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e ong> <em>version
4720: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
4730: 54 68 65 20 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 The minimum prot
4740: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 66 6f 72 ocol version for
4750: 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c cipher.</dd>..<
4760: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65 dt><strong>ciphe
4770: 72 5f 69 73 5f 61 65 61 64 3c 2f 73 74 72 6f 6e r_is_aead</stron
4780: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f g> <em>boolean</
4790: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 em></dt>..<dd>Wh
47a0: 65 74 68 65 72 20 74 68 65 20 63 69 70 68 65 72 ether the cipher
47b0: 20 69 73 20 41 75 74 68 65 6e 74 69 63 61 74 65 is Authenticate
47c0: 64 20 45 6e 63 72 79 70 74 69 6f 6e 20 77 69 74 d Encryption wit
47d0: 68 0a 09 41 73 73 6f 63 69 61 74 65 64 20 44 61 h..Associated Da
47e0: 74 61 20 28 41 45 41 44 29 2e 3c 2f 64 64 3e 0a ta (AEAD).</dd>.
47f0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 .<dt><strong>cip
4800: 68 65 72 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 her_id</strong>
4810: 3c 65 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f 64 74 3e <em>id</em></dt>
4820: 0a 09 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 ..<dd>The OpenSS
4830: 4c 20 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 L cipher id.</dd
4840: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 64 >..<dt><strong>d
4850: 65 73 63 72 69 70 74 69 6f 6e 3c 2f 73 74 72 6f escription</stro
4860: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ng> <em>string</
4870: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 20 em></dt>..<dd>A
4880: 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e text description
4890: 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c of the cipher.<
48a0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
48b0: 67 3e 68 61 6e 64 73 68 61 6b 65 5f 64 69 67 65 g>handshake_dige
48c0: 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e st</strong> <em>
48d0: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 boolean</em></dt
48e0: 3e 0a 09 3c 64 64 3e 44 69 67 65 73 74 20 75 73 >..<dd>Digest us
48f0: 65 64 20 64 75 72 69 6e 67 20 68 61 6e 64 73 68 ed during handsh
4900: 61 6b 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f ake.</dd>. </
4910: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 dl>.</blockquote
4920: 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 >.<blockquote>..
4930: 3c 62 3e 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c <b>Session Info<
4940: 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 /b>. <dl>..<d
4950: 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f t><strong>alpn</
4960: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 strong> <em>prot
4970: 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 ocol</em></dt>..
4980: 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c <dd>The protocol
4990: 20 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 selected after
49a0: 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 Application-Laye
49b0: 72 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 r Protocol..
49c0: 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 Negotiation (ALP
49d0: 4e 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 N).</dd>..<dt><s
49e0: 74 72 6f 6e 67 3e 72 65 73 75 6d 61 62 6c 65 3c trong>resumable<
49f0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
4a00: 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 lean</em></dt>..
4a10: 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 20 <dd>Whether the
4a20: 73 65 73 73 69 6f 6e 20 63 61 6e 20 62 65 20 72 session can be r
4a30: 65 73 75 6d 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f esumed or not.</
4a40: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4a50: 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f 73 74 72 >start_time</str
4a60: 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64 73 ong> <em>seconds
4a70: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
4a80: 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73 69 Time since sessi
4a90: 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73 65 on started in se
4aa0: 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f 63 conds since epoc
4ab0: 68 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 h.</dd>..<dt><st
4ac0: 72 6f 6e 67 3e 74 69 6d 65 6f 75 74 3c 2f 73 74 rong>timeout</st
4ad0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64 rong> <em>second
4ae0: 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 s</em></dt>..<dd
4af0: 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e 20 6f 66 >Max duration of
4b00: 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 65 63 6f session in seco
4b10: 6e 64 73 20 62 65 66 6f 72 65 20 74 69 6d 65 2d nds before time-
4b20: 6f 75 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c out.</dd>..<dt><
4b30: 73 74 72 6f 6e 67 3e 6c 69 66 65 74 69 6d 65 3c strong>lifetime<
4b40: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 /strong> <em>sec
4b50: 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 onds</em></dt>..
4b60: 3c 64 64 3e 53 65 73 73 69 6f 6e 20 74 69 63 6b <dd>Session tick
4b70: 65 74 20 6c 69 66 65 74 69 6d 65 20 68 69 6e 74 et lifetime hint
4b80: 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 64 64 in seconds.</dd
4b90: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
4ba0: 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f 6e ession_id</stron
4bb0: 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 74 g> <em>binary_st
4bc0: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 ring</em></dt>..
4bd0: 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69 <dd>Unique sessi
4be0: 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69 6e on id for use in
4bf0: 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 65 resuming the se
4c00: 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 ssion.</dd>..<dt
4c10: 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e ><strong>session
4c20: 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e _ticket</strong>
4c30: 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 74 72 69 <em>binary_stri
4c40: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ng</em></dt>..<d
4c50: 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e d>Unique session
4c60: 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73 65 20 ticket for use
4c70: 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 in resuming the
4c80: 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c session.</dd>..<
4c90: 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 63 6b 65 dt><strong>ticke
4ca0: 74 5f 61 70 70 5f 64 61 74 61 3c 2f 73 74 72 6f t_app_data</stro
4cb0: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 ng> <em>binary_s
4cc0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
4cd0: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 .<dd>Unique sess
4ce0: 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c 69 ion ticket appli
4cf0: 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 64 64 cation data.</dd
4d00: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6d >..<dt><strong>m
4d10: 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 72 6f 6e aster_key</stron
4d20: 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 74 g> <em>binary_st
4d30: 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 ring</em></dt>..
4d40: 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69 <dd>Unique sessi
4d50: 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c 2f on master key.</
4d60: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4d70: 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d >session_cache_m
4d80: 6f 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ode</strong> <em
4d90: 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >mode</em></dt>.
4da0: 09 3c 64 64 3e 53 65 72 76 65 72 20 63 61 63 68 .<dd>Server cach
4db0: 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e 74 2c 20 e mode (client,
4dc0: 73 65 72 76 65 72 2c 20 6f 72 20 62 6f 74 68 29 server, or both)
4dd0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e .</dd>. </dl>
4de0: 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a .</blockquote>..
4df0: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
4e00: 22 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 "tls::protocols"
4e10: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 ><strong>tls::pr
4e20: 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e otocols</strong>
4e30: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
4e40: 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 d>Returns a list
4e50: 20 6f 66 20 74 68 65 20 73 75 70 70 6f 72 74 65 of the supporte
4e60: 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c d protocols. Val
4e70: 69 64 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 09 id values are:..
4e80: 3c 62 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e <b>ssl2</b>, <b>
4e90: 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 ssl3</b>, <b>tls
4ea0: 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 1</b>, <b>tls1.1
4eb0: 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c </b>, <b>tls1.2<
4ec0: 2f 62 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 /b>,..and <b>tls
4ed0: 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 1.3</b>. Exact l
4ee0: 69 73 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f ist depends on O
4ef0: 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 penSSL version a
4f00: 6e 64 0a 09 63 6f 6d 70 69 6c 65 20 74 69 6d 65 nd..compile time
4f10: 20 66 6c 61 67 73 2e 3c 2f 64 64 3e 0a 0a 20 20 flags.</dd>..
4f20: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
4f30: 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 73 74 ls::version"><st
4f40: 72 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 73 69 6f rong>tls::versio
4f50: 6e 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f n</strong></a></
4f60: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 dt>. <dd>Retu
4f70: 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 rns the OpenSSL
4f80: 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c version string.<
4f90: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 33 3e /dd>.</dl>..<h3>
4fa0: 3c 61 20 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43 <a name="CALLBAC
4fb0: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 K OPTIONS">CALLB
4fc0: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c ACK OPTIONS</a><
4fd0: 2f 68 33 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64 /h3>..<p>.As ind
4fe0: 69 63 61 74 65 64 20 61 62 6f 76 65 2c 20 69 6e icated above, in
4ff0: 64 69 76 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c dividual channel
5000: 73 20 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 s can be given t
5010: 68 65 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 heir own callbac
5020: 6b 73 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 ks.to handle int
5030: 65 72 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 ermediate proces
5040: 73 69 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e sing by the Open
5050: 53 53 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 SSL library, usi
5060: 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 2d ng the.<strong>-
5070: 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e command</strong>
5080: 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 , <strong>-passw
5090: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e ord</strong>, an
50a0: 64 0a 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 d.<strong>-valid
50b0: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 ate_command</str
50c0: 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 20 70 61 73 ong> options pas
50d0: 73 65 64 20 74 6f 20 65 69 74 68 65 72 20 6f 66 sed to either of
50e0: 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f .<strong>tls::so
50f0: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 6f 72 cket</strong> or
5100: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d <strong>tls::im
5110: 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 49 port</strong>..I
5120: 66 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 67 f the callback g
5130: 65 6e 65 72 61 74 65 73 20 61 6e 20 65 72 72 6f enerates an erro
5140: 72 2c 20 74 68 65 20 3c 62 3e 62 67 65 72 72 6f r, the <b>bgerro
5150: 72 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 77 69 r</b> command wi
5160: 6c 6c 20 62 65 0a 69 6e 76 6f 6b 65 64 20 77 69 ll be.invoked wi
5170: 74 68 20 74 68 65 20 65 72 72 6f 72 20 69 6e 66 th the error inf
5180: 6f 72 6d 61 74 69 6f 6e 2e 0a 3c 2f 70 3e 0a 0a ormation..</p>..
5190: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 64 6c <blockquote>.<dl
51a0: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f >.. <dt><stro
51b0: 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 ng>-command</str
51c0: 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 ong> <em>callbac
51d0: 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 k</em></dt>.
51e0: 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 <dd>..Invokes th
51f0: 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e e specified <em>
5200: 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 callback</em> sc
5210: 72 69 70 74 20 61 74 20 73 65 76 65 72 61 6c 20 ript at several
5220: 70 6f 69 6e 74 73 0a 09 64 75 72 69 6e 67 20 74 points..during t
5230: 68 65 20 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 he OpenSSL hands
5240: 68 61 6b 65 20 61 6e 64 20 75 73 65 2e 20 53 65 hake and use. Se
5250: 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 e below for the
5260: 70 6f 73 73 69 62 6c 65 0a 09 61 72 67 75 6d 65 possible..argume
5270: 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 nts passed to th
5280: 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 e callback scrip
5290: 74 2e 20 56 61 6c 75 65 73 20 72 65 74 75 72 6e t. Values return
52a0: 65 64 20 66 72 6f 6d 20 74 68 65 0a 09 63 61 6c ed from the..cal
52b0: 6c 62 61 63 6b 20 61 72 65 20 69 67 6e 6f 72 65 lback are ignore
52c0: 64 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e 0a d....<br>..<br>.
52d0: 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09 20 ..<dl>...<dt>..
52e0: 20 3c 73 74 72 6f 6e 67 3e 65 72 72 6f 72 3c 2f <strong>error</
52f0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e strong> <em>chan
5300: 6e 65 6c 49 64 20 6d 65 73 73 61 67 65 3c 2f 65 nelId 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 69 73 20 66 6f 72 6d 20 6f 66 20 . This form of
5330: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f callback is invo
5340: 6b 65 64 20 77 68 65 6e 65 76 65 72 20 61 6e 20 ked whenever an
5350: 65 72 72 6f 72 20 6f 63 63 75 72 73 20 64 75 72 error occurs dur
5360: 69 6e 67 20 74 68 65 0a 09 20 20 69 6e 69 74 69 ing the.. initi
5370: 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 al connection, h
5380: 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f andshake, or I/O
5390: 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 operations. The
53a0: 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 6d <em>message</em
53b0: 3e 0a 09 20 20 61 72 67 75 6d 65 6e 74 20 63 61 >.. argument ca
53c0: 6e 20 62 65 20 66 72 6f 6d 20 74 68 65 20 54 63 n be from the Tc
53d0: 6c 5f 45 72 72 6e 6f 4d 73 67 2c 20 4f 70 65 6e l_ErrnoMsg, Open
53e0: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 SSL function..
53f0: 3c 63 6f 64 65 3e 45 52 52 5f 72 65 61 73 6f 6e <code>ERR_reason
5400: 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 3c _error_string()<
5410: 2f 63 6f 64 65 3e 2c 20 6f 72 20 61 20 63 75 73 /code>, or a cus
5420: 74 6f 6d 20 6d 65 73 73 61 67 65 2e 0a 09 3c 2f tom message...</
5430: 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 dd>...<br>...<dt
5440: 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e 66 >.. <strong>inf
5450: 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 o</strong> <em>c
5460: 68 61 6e 6e 65 6c 49 64 20 6d 61 6a 6f 72 20 6d hannelId major m
5470: 69 6e 6f 72 20 6d 65 73 73 61 67 65 20 74 79 70 inor message typ
5480: 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c e</em>..</dt>..<
5490: 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d dd>.. This form
54a0: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
54b0: 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f invoked by the O
54c0: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a penSSL function.
54d0: 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 65 74 . <code>SSL_set
54e0: 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28 29 _info_callback()
54f0: 3c 2f 63 6f 64 65 3e 20 64 75 72 69 6e 67 20 74 </code> during t
5500: 68 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 he initial conne
5510: 63 74 69 6f 6e 0a 09 20 20 61 6e 64 20 68 61 6e ction.. and han
5520: 64 73 68 61 6b 65 20 6f 70 65 72 61 74 69 6f 6e dshake operation
5530: 73 2e 20 54 68 65 20 3c 65 6d 3e 74 79 70 65 3c s. The <em>type<
5540: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 /em> argument is
5550: 20 6e 65 77 20 66 6f 72 0a 09 20 20 54 4c 53 20 new for.. TLS
5560: 31 2e 38 2e 20 54 68 65 20 61 72 67 75 6d 65 6e 1.8. The argumen
5570: 74 73 20 61 72 65 3a 0a 09 20 20 3c 62 72 3e 0a ts are:.. <br>.
5580: 09 20 20 3c 75 6c 3e 0a 09 20 20 3c 6c 69 3e 50 . <ul>.. <li>P
5590: 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 ossible values f
55a0: 6f 72 20 3c 65 6d 3e 6d 61 6a 6f 72 3c 2f 65 6d or <em>major</em
55b0: 3e 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e > are:.. <code>
55c0: 68 61 6e 64 73 68 61 6b 65 2c 20 61 6c 65 72 74 handshake, alert
55d0: 2c 20 63 6f 6e 6e 65 63 74 2c 20 61 63 63 65 70 , connect, accep
55e0: 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 t</code>.</li>..
55f0: 20 20 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 20 76 <li>Possible v
5600: 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 69 alues for <em>mi
5610: 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 nor</em> are:..
5620: 20 3c 63 6f 64 65 3e 73 74 61 72 74 2c 20 64 6f <code>start, do
5630: 6e 65 2c 20 72 65 61 64 2c 20 77 72 69 74 65 2c ne, read, write,
5640: 20 6c 6f 6f 70 2c 20 65 78 69 74 3c 2f 63 6f 64 loop, exit</cod
5650: 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e e>.</li>.. <li>
5660: 54 68 65 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c The <em>message<
5670: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 /em> argument is
5680: 20 61 20 64 65 73 63 72 69 70 74 69 76 65 20 73 a descriptive s
5690: 74 72 69 6e 67 20 77 68 69 63 68 20 6d 61 79 0a tring which may.
56a0: 09 20 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 . be generated
56b0: 65 69 74 68 65 72 20 62 79 20 3c 63 6f 64 65 3e either by <code>
56c0: 53 53 4c 5f 73 74 61 74 65 5f 73 74 72 69 6e 67 SSL_state_string
56d0: 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e 20 6f _long()</code> o
56e0: 72 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e 53 53 r by.. <code>SS
56f0: 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f 73 74 72 L_alert_desc_str
5700: 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 ing_long()</code
5710: 3e 2c 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 >, depending on
5720: 74 68 65 20 63 6f 6e 74 65 78 74 2e 3c 2f 6c 69 the context.</li
5730: 3e 0a 09 20 20 3c 6c 69 3e 46 6f 72 20 61 6c 65 >.. <li>For ale
5740: 72 74 73 2c 20 74 68 65 20 70 6f 73 73 69 62 6c rts, the possibl
5750: 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d e values for <em
5760: 3e 74 79 70 65 3c 2f 65 6d 3e 20 61 72 65 3a 0a >type</em> are:.
5770: 09 20 20 3c 63 6f 64 65 3e 77 61 72 6e 69 6e 67 . <code>warning
5780: 2c 20 66 61 74 61 6c 2c 20 61 6e 64 20 75 6e 6b , fatal, and unk
5790: 6e 6f 77 6e 3c 2f 63 6f 64 65 3e 2e 20 46 6f 72 nown</code>. For
57a0: 20 6f 74 68 65 72 73 2c 0a 09 20 20 3c 63 6f 64 others,.. <cod
57b0: 65 3e 69 6e 66 6f 3c 2f 63 6f 64 65 3e 20 69 73 e>info</code> is
57c0: 20 75 73 65 64 2e 3c 2f 6c 69 3e 0a 09 20 20 3c used.</li>.. <
57d0: 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 64 /ul>..</dd>...<d
57e0: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 6d 65 t>.. <strong>me
57f0: 73 73 61 67 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c ssage</strong> <
5800: 65 6d 3e 63 68 61 6e 6e 65 6c 49 64 20 64 69 72 em>channelId dir
5810: 65 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e 20 63 ection version c
5820: 6f 6e 74 65 6e 74 5f 74 79 70 65 20 6d 65 73 73 ontent_type mess
5830: 61 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a age</em>..</dt>.
5840: 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f .<dd>.. This fo
5850: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 rm of callback i
5860: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 s invoked by the
5870: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f OpenSSL functio
5880: 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 n.. <code>SSL_s
5890: 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28 et_msg_callback(
58a0: 29 3c 2f 63 6f 64 65 3e 20 77 68 65 6e 65 76 65 )</code> wheneve
58b0: 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20 73 r a message is s
58c0: 65 6e 74 20 6f 72 0a 09 20 20 72 65 63 65 69 76 ent or.. receiv
58d0: 65 64 20 64 75 72 69 6e 67 20 74 68 65 20 69 6e ed during the in
58e0: 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e itial connection
58f0: 2c 20 68 61 6e 64 73 68 61 6b 65 2c 20 6f 72 20 , handshake, or
5900: 49 2f 4f 20 6f 70 65 72 61 74 69 6f 6e 73 2e 0a I/O operations..
5910: 09 20 20 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 . It is only av
5920: 61 69 6c 61 62 6c 65 20 77 68 65 6e 20 4f 70 65 ailable when Ope
5930: 6e 53 53 4c 20 69 73 20 63 6f 6d 70 6c 69 65 64 nSSL is complied
5940: 20 77 69 74 68 20 74 68 65 0a 09 20 20 3c 65 6d with the.. <em
5950: 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61 63 >enable-ssl-trac
5960: 65 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e 20 41 e</em> option. A
5970: 72 67 75 6d 65 6e 74 73 20 61 72 65 3a 20 3c 65 rguments are: <e
5980: 6d 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 65 6d 3e m>direction</em>
5990: 0a 09 20 20 69 73 20 3c 62 3e 53 65 6e 74 3c 2f .. is <b>Sent</
59a0: 62 3e 20 6f 72 20 3c 62 3e 52 65 63 65 69 76 65 b> or <b>Receive
59b0: 64 3c 2f 62 3e 2c 20 3c 65 6d 3e 76 65 72 73 69 d</b>, <em>versi
59c0: 6f 6e 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 70 on</em> is the p
59d0: 72 6f 74 6f 63 6f 6c 0a 09 20 20 76 65 72 73 69 rotocol.. versi
59e0: 6f 6e 2c 20 3c 65 6d 3e 63 6f 6e 74 65 6e 74 5f on, <em>content_
59f0: 74 79 70 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65 type</em> is the
5a00: 20 6d 65 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 message content
5a10: 20 74 79 70 65 2c 20 61 6e 64 0a 09 20 20 3c 65 type, and.. <e
5a20: 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 69 m>message</em> i
5a30: 73 20 6d 6f 72 65 20 69 6e 66 6f 20 66 72 6f 6d s more info from
5a40: 20 74 68 65 20 3c 63 6f 64 65 3e 53 53 4c 5f 74 the <code>SSL_t
5a50: 72 61 63 65 3c 2f 63 6f 64 65 3e 20 41 50 49 2e race</code> API.
5a60: 0a 09 20 20 54 68 69 73 20 63 61 6c 6c 62 61 63 .. This callbac
5a70: 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54 4c 53 k is new for TLS
5a80: 20 31 2e 38 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 1.8...</dd>..<b
5a90: 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 r>...<dt>.. <st
5aa0: 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 3c 2f 73 74 rong>session</st
5ab0: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 rong> <em>channe
5ac0: 6c 49 64 20 73 65 73 73 69 6f 6e 5f 69 64 20 74 lId session_id t
5ad0: 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f icket lifetime</
5ae0: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e em>..</dt>..<dd>
5af0: 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 .. This form of
5b00: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
5b10: 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e oked by the Open
5b20: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 SSL function..
5b30: 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 <code>SSL_CTX_se
5b40: 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c ss_set_new_cb()<
5b50: 2f 63 6f 64 65 3e 20 77 68 65 6e 65 76 65 72 20 /code> whenever
5b60: 61 20 6e 65 77 20 73 65 73 73 69 6f 6e 20 69 64 a new session id
5b70: 20 69 73 0a 09 20 20 73 65 6e 74 20 62 79 20 74 is.. sent by t
5b80: 68 65 20 73 65 72 76 65 72 20 64 75 72 69 6e 67 he server during
5b90: 20 74 68 65 20 69 6e 69 74 69 61 6c 20 63 6f 6e the initial con
5ba0: 6e 65 63 74 69 6f 6e 20 61 6e 64 20 68 61 6e 64 nection and hand
5bb0: 73 68 61 6b 65 2c 20 62 75 74 0a 09 20 20 63 61 shake, but.. ca
5bc0: 6e 20 61 6c 73 6f 20 62 65 20 72 65 63 65 69 76 n also be receiv
5bd0: 65 64 20 6c 61 74 65 72 20 69 66 20 74 68 65 20 ed later if the
5be0: 3c 62 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 <b>-post_handsha
5bf0: 6b 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 ke</b> option is
5c00: 0a 09 20 20 75 73 65 64 2e 20 41 72 67 75 6d 65 .. used. Argume
5c10: 6e 74 73 20 61 72 65 3a 20 3c 65 6d 3e 73 65 73 nts are: <em>ses
5c20: 73 69 6f 6e 5f 69 64 3c 2f 65 6d 3e 20 69 73 20 sion_id</em> is
5c30: 74 68 65 20 63 75 72 72 65 6e 74 0a 09 20 20 73 the current.. s
5c40: 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 65 ession identifie
5c50: 72 2c 20 3c 65 6d 3e 74 69 63 6b 65 74 3c 2f 65 r, <em>ticket</e
5c60: 6d 3e 20 69 73 20 74 68 65 20 73 65 73 73 69 6f m> is the sessio
5c70: 6e 20 74 69 63 6b 65 74 20 69 6e 66 6f 2c 20 61 n ticket info, a
5c80: 6e 64 0a 09 20 20 3c 65 6d 3e 6c 69 66 65 74 69 nd.. <em>lifeti
5c90: 6d 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 74 me</em> is the t
5ca0: 68 65 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 he ticket lifeti
5cb0: 6d 65 20 69 6e 20 73 65 63 6f 6e 64 73 2e 0a 09 me in seconds...
5cc0: 20 20 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 This callback
5cd0: 69 73 20 6e 65 77 20 66 6f 72 20 54 4c 53 20 31 is new for TLS 1
5ce0: 2e 38 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e .8...</dd>..<br>
5cf0: 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 ..</dl>. </dd
5d00: 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 20 20 20 >.. <br>..
5d10: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 <dt><strong>-pa
5d20: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 ssword</strong>
5d30: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d <em>callback</em
5d40: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a ></dt>. <dd>.
5d50: 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 .Invokes the spe
5d60: 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 cified <em>callb
5d70: 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 ack</em> script
5d80: 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 when OpenSSL nee
5d90: 64 73 20 74 6f 0a 09 6f 62 74 61 69 6e 20 61 20 ds to..obtain a
5da0: 70 61 73 73 77 6f 72 64 2e 20 53 65 65 20 62 65 password. See be
5db0: 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 low for the poss
5dc0: 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 20 70 ible arguments p
5dd0: 61 73 73 65 64 20 74 6f 0a 09 74 68 65 20 63 61 assed to..the ca
5de0: 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e 20 53 llback script. S
5df0: 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 76 61 6c ee below for val
5e00: 69 64 20 72 65 74 75 72 6e 20 76 61 6c 75 65 73 id return values
5e10: 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a ....<br>..<br>..
5e20: 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 .<dl>...<dt>..
5e30: 3c 73 74 72 6f 6e 67 3e 70 61 73 73 77 6f 72 64 <strong>password
5e40: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 72 77 </strong> <em>rw
5e50: 66 6c 61 67 20 73 69 7a 65 3c 2f 65 6d 3e 0a 09 flag size</em>..
5e60: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 49 </dt>..<dd>.. I
5e70: 6e 76 6f 6b 65 64 20 77 68 65 6e 20 6c 6f 61 64 nvoked when load
5e80: 69 6e 67 20 6f 72 20 73 74 6f 72 69 6e 67 20 61 ing or storing a
5e90: 20 50 45 4d 20 63 65 72 74 69 66 69 63 61 74 65 PEM certificate
5ea0: 20 77 69 74 68 20 65 6e 63 72 79 70 74 69 6f 6e with encryption
5eb0: 2e 0a 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 72 ... Where <em>r
5ec0: 77 66 6c 61 67 3c 2f 65 6d 3e 20 69 73 20 30 20 wflag</em> is 0
5ed0: 66 6f 72 20 72 65 61 64 69 6e 67 2f 64 65 63 72 for reading/decr
5ee0: 79 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f 72 0a yption or 1 for.
5ef0: 09 20 20 77 72 69 74 69 6e 67 2f 65 6e 63 72 79 . writing/encry
5f00: 70 74 69 6f 6e 20 28 63 61 6e 20 70 72 6f 6d 70 ption (can promp
5f10: 74 20 75 73 65 72 20 74 6f 20 63 6f 6e 66 69 72 t user to confir
5f20: 6d 29 20 61 6e 64 0a 09 20 20 3c 65 6d 3e 73 69 m) and.. <em>si
5f30: 7a 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 6d ze</em> is the m
5f40: 61 78 20 70 61 73 73 77 6f 72 64 20 6c 65 6e 67 ax password leng
5f50: 74 68 20 69 6e 20 62 79 74 65 73 2e 0a 09 20 20 th in bytes...
5f60: 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f The callback sho
5f70: 75 6c 64 20 72 65 74 75 72 6e 20 74 68 65 20 70 uld return the p
5f80: 61 73 73 77 6f 72 64 20 61 73 20 61 20 73 74 72 assword as a str
5f90: 69 6e 67 2e 0a 09 20 20 42 6f 74 68 20 61 72 67 ing... Both arg
5fa0: 75 6d 65 6e 74 73 20 61 72 65 20 6e 65 77 20 66 uments are new f
5fb0: 6f 72 20 54 4c 53 20 31 2e 38 2e 0a 09 3c 2f 64 or TLS 1.8...</d
5fc0: 64 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 d>. </dd>..
5fd0: 20 20 3c 62 72 3e 0a 0a 0a 20 20 20 20 3c 64 74 <br>... <dt
5fe0: 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 ><strong>-valida
5ff0: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e tecommand</stron
6000: 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c g> <em>callback<
6010: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 /em></dt>. <d
6020: 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 d>..Invokes the
6030: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 specified <em>ca
6040: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 llback</em> scri
6050: 70 74 20 64 75 72 69 6e 67 20 68 61 6e 64 73 68 pt during handsh
6060: 61 6b 65 20 69 6e 0a 09 6f 72 64 65 72 20 74 6f ake in..order to
6070: 20 76 61 6c 69 64 61 74 65 20 74 68 65 20 70 72 validate the pr
6080: 6f 76 69 64 65 64 20 76 61 6c 75 65 28 73 29 2e ovided value(s).
6090: 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 See below for t
60a0: 68 65 20 70 6f 73 73 69 62 6c 65 0a 09 61 72 67 he possible..arg
60b0: 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f uments passed to
60c0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 the callback sc
60d0: 72 69 70 74 2e 20 49 66 20 6e 6f 74 20 73 70 65 ript. If not spe
60e0: 63 69 66 69 65 64 2c 20 4f 70 65 6e 53 53 4c 0a cified, OpenSSL.
60f0: 09 77 69 6c 6c 20 61 63 63 65 70 74 20 76 61 6c .will accept val
6100: 69 64 20 63 65 72 74 69 66 69 63 61 74 65 73 20 id certificates
6110: 61 6e 64 20 65 78 74 65 6e 73 69 6f 6e 73 2e 0a and extensions..
6120: 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76 .To reject the v
6130: 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74 20 74 alue and abort t
6140: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 he connection, t
6150: 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 he callback shou
6160: 6c 64 20 72 65 74 75 72 6e 20 30 2e 0a 09 54 6f ld return 0...To
6170: 20 61 63 63 65 70 74 20 74 68 65 20 76 61 6c 75 accept the valu
6180: 65 20 61 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 e and continue t
6190: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 he connection, i
61a0: 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 t should return
61b0: 31 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 1...To reject th
61c0: 65 20 76 61 6c 75 65 2c 20 62 75 74 20 63 6f 6e e value, but con
61d0: 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 tinue the connec
61e0: 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 tion, it should
61f0: 72 65 74 75 72 6e 20 32 2e 0a 0a 09 3c 62 72 3e return 2....<br>
6200: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 ..<br>...<dl>...
6210: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e <dt>.. <strong>
6220: 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 alpn</strong> <e
6230: 6d 3e 63 68 61 6e 6e 65 6c 49 64 20 70 72 6f 74 m>channelId prot
6240: 6f 63 6f 6c 20 6d 61 74 63 68 3c 2f 65 6d 3e 0a ocol match</em>.
6250: 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 .</dt>..<dd>..
6260: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 For servers, thi
6270: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
6280: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 ck is invoked wh
6290: 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c en the client AL
62a0: 50 4e 0a 09 20 20 65 78 74 65 6e 73 69 6f 6e 20 PN.. extension
62b0: 69 73 20 72 65 63 65 69 76 65 64 2e 20 49 66 20 is received. If
62c0: 3c 65 6d 3e 6d 61 74 63 68 3c 2f 65 6d 3e 20 69 <em>match</em> i
62d0: 73 20 74 72 75 65 2c 20 3c 65 6d 3e 70 72 6f 74 s true, <em>prot
62e0: 6f 63 6f 6c 3c 2f 65 6d 3e 0a 09 20 20 69 73 20 ocol</em>.. is
62f0: 74 68 65 20 66 69 72 73 74 20 3c 62 3e 2d 61 6c the first <b>-al
6300: 70 6e 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 73 70 pn</b> option sp
6310: 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c ecified protocol
6320: 20 63 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74 68 0a common to both.
6330: 09 20 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e . the client an
6340: 64 20 73 65 72 76 65 72 2e 20 49 66 20 6e 6f 74 d server. If not
6350: 2c 20 74 68 65 20 66 69 72 73 74 20 63 6c 69 65 , the first clie
6360: 6e 74 20 73 70 65 63 69 66 69 65 64 20 70 72 6f nt specified pro
6370: 74 6f 63 6f 6c 20 69 73 0a 09 20 20 75 73 65 64 tocol is.. used
6380: 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20 61 . It is called a
6390: 66 74 65 72 20 74 68 65 20 68 65 6c 6c 6f 20 61 fter the hello a
63a0: 6e 64 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b nd ALPN callback
63b0: 73 2e 0a 09 20 20 54 68 69 73 20 63 61 6c 6c 62 s... This callb
63c0: 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54 ack is new for T
63d0: 4c 53 20 31 2e 38 2e 0a 09 3c 2f 64 64 3e 0a 0a LS 1.8...</dd>..
63e0: 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 .<br>...<dt>..
63f0: 3c 73 74 72 6f 6e 67 3e 68 65 6c 6c 6f 3c 2f 73 <strong>hello</s
6400: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e trong> <em>chann
6410: 65 6c 49 64 20 73 65 72 76 65 72 6e 61 6d 65 3c elId servername<
6420: 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 /em>..</dt>..<dd
6430: 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 >.. For servers
6440: 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 , this form of c
6450: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
6460: 65 64 20 64 75 72 69 6e 67 20 63 6c 69 65 6e 74 ed during client
6470: 20 68 65 6c 6c 6f 0a 09 20 20 6d 65 73 73 61 67 hello.. messag
6480: 65 20 70 72 6f 63 65 73 73 69 6e 67 2e 20 54 68 e processing. Th
6490: 65 20 70 75 72 70 6f 73 65 20 69 73 20 73 6f 20 e purpose is so
64a0: 74 68 65 20 73 65 72 76 65 72 20 63 61 6e 20 73 the server can s
64b0: 65 6c 65 63 74 20 74 68 65 0a 09 20 20 61 70 70 elect the.. app
64c0: 72 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69 ropriate certifi
64d0: 63 61 74 65 20 74 6f 20 70 72 65 73 65 6e 74 20 cate to present
64e0: 74 6f 20 74 68 65 20 63 6c 69 65 6e 74 2c 20 61 to the client, a
64f0: 6e 64 20 74 6f 20 6d 61 6b 65 20 6f 74 68 65 72 nd to make other
6500: 0a 09 20 20 63 6f 6e 66 69 67 75 72 61 74 69 6f .. configuratio
6510: 6e 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 n adjustments re
6520: 6c 65 76 61 6e 74 20 74 6f 20 74 68 61 74 20 73 levant to that s
6530: 65 72 76 65 72 20 6e 61 6d 65 20 61 6e 64 20 69 erver name and i
6540: 74 73 0a 09 20 20 63 6f 6e 66 69 67 75 72 61 74 ts.. configurat
6550: 69 6f 6e 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 ion. It is calle
6560: 64 20 62 65 66 6f 72 65 20 74 68 65 20 53 4e 49 d before the SNI
6570: 20 61 6e 64 20 41 4c 50 4e 20 63 61 6c 6c 62 61 and ALPN callba
6580: 63 6b 73 2e 0a 09 20 20 54 68 69 73 20 63 61 6c cks... This cal
6590: 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 lback is new for
65a0: 20 54 4c 53 20 31 2e 38 2e 0a 09 3c 2f 64 64 3e TLS 1.8...</dd>
65b0: 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 ...<br>...<dt>..
65c0: 20 20 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73 <strong>sni</s
65d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e trong> <em>chann
65e0: 65 6c 49 64 20 73 65 72 76 65 72 6e 61 6d 65 3c elId servername<
65f0: 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 /em>..</dt>..<dd
6600: 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 >.. For servers
6610: 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 , this form of c
6620: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
6630: 65 64 20 77 68 65 6e 20 74 68 65 20 53 65 72 76 ed when the Serv
6640: 65 72 20 4e 61 6d 65 0a 09 20 20 49 6e 64 69 63 er Name.. Indic
6650: 61 74 69 6f 6e 20 28 53 4e 49 29 20 65 78 74 65 ation (SNI) exte
6660: 6e 73 69 6f 6e 20 69 73 20 72 65 63 65 69 76 65 nsion is receive
6670: 64 2e 20 54 68 65 20 3c 65 6d 3e 73 65 72 76 65 d. The <em>serve
6680: 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 20 20 61 72 rname</em>.. ar
6690: 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 63 6c gument is the cl
66a0: 69 65 6e 74 20 70 72 6f 76 69 64 65 64 20 73 65 ient provided se
66b0: 72 76 65 72 20 6e 61 6d 65 20 69 6e 20 74 68 65 rver name in the
66c0: 20 3c 62 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c <b>-servername<
66d0: 2f 62 3e 0a 09 20 20 6f 70 74 69 6f 6e 2e 20 54 /b>.. option. T
66e0: 68 65 20 70 75 72 70 6f 73 65 20 69 73 20 73 6f he purpose is so
66f0: 20 77 68 65 6e 20 61 20 73 65 72 76 65 72 20 73 when a server s
6700: 75 70 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 upports multiple
6710: 20 6e 61 6d 65 73 2c 20 74 68 65 0a 09 20 20 72 names, the.. r
6720: 69 67 68 74 20 63 65 72 74 69 66 69 63 61 74 65 ight certificate
6730: 20 63 61 6e 20 62 65 20 75 73 65 64 2e 20 49 74 can be used. It
6740: 20 69 73 20 63 61 6c 6c 65 64 20 61 66 74 65 72 is called after
6750: 20 74 68 65 20 68 65 6c 6c 6f 20 63 61 6c 6c 62 the hello callb
6760: 61 63 6b 0a 09 20 20 62 75 74 20 62 65 66 6f 72 ack.. but befor
6770: 65 20 74 68 65 20 41 4c 50 4e 20 63 61 6c 6c 62 e the ALPN callb
6780: 61 63 6b 2e 0a 09 20 20 54 68 69 73 20 63 61 6c ack... This cal
6790: 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 lback is new for
67a0: 20 54 4c 53 20 31 2e 38 2e 0a 09 3c 2f 64 64 3e TLS 1.8...</dd>
67b0: 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 ...<br>...<dt>..
67c0: 20 20 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 <strong>verify
67d0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
67e0: 61 6e 6e 65 6c 49 64 20 64 65 70 74 68 20 63 65 annelId depth ce
67f0: 72 74 20 73 74 61 74 75 73 20 65 72 72 6f 72 3c rt status error<
6800: 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 /em>..</dt>..<dd
6810: 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f >.. This form o
6820: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e f callback is in
6830: 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c voked by OpenSSL
6840: 20 77 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74 when a new cert
6850: 69 66 69 63 61 74 65 0a 09 20 20 69 73 20 72 65 ificate.. is re
6860: 63 65 69 76 65 64 20 66 72 6f 6d 20 74 68 65 20 ceived from the
6870: 70 65 65 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20 peer. It allows
6880: 74 68 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 the client to ch
6890: 65 63 6b 20 74 68 65 0a 09 20 20 63 65 72 74 69 eck the.. certi
68a0: 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74 ficate verificat
68b0: 69 6f 6e 20 72 65 73 75 6c 74 73 20 61 6e 64 20 ion results and
68c0: 63 68 6f 6f 73 65 20 77 68 65 74 68 65 72 20 74 choose whether t
68d0: 6f 20 63 6f 6e 74 69 6e 75 65 0a 09 20 20 6f 72 o continue.. or
68e0: 20 6e 6f 74 2e 20 49 74 20 69 73 20 63 61 6c 6c not. It is call
68f0: 65 64 20 66 6f 72 20 65 61 63 68 20 63 65 72 74 ed for each cert
6900: 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 20 63 ificate in the c
6910: 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e ertificate chain
6920: 2e 0a 09 20 20 3c 75 6c 3e 0a 09 20 20 3c 6c 69 ... <ul>.. <li
6930: 3e 54 68 65 20 3c 65 6d 3e 64 65 70 74 68 3c 2f >The <em>depth</
6940: 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 em> argument is
6950: 74 68 65 20 69 6e 74 65 67 65 72 20 64 65 70 74 the integer dept
6960: 68 20 6f 66 20 74 68 65 0a 09 20 20 63 65 72 74 h of the.. cert
6970: 69 66 69 63 61 74 65 20 69 6e 20 74 68 65 20 63 ificate in the c
6980: 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e ertificate chain
6990: 2c 20 77 68 65 72 65 20 30 20 69 73 20 74 68 65 , where 0 is the
69a0: 20 70 65 65 72 20 63 65 72 74 69 66 69 63 61 74 peer certificat
69b0: 65 0a 09 20 20 61 6e 64 20 68 69 67 68 65 72 20 e.. and higher
69c0: 76 61 6c 75 65 73 20 67 6f 69 6e 67 20 75 70 20 values going up
69d0: 74 6f 20 74 68 65 20 43 65 72 74 69 66 69 63 61 to the Certifica
69e0: 74 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 te Authority (CA
69f0: 29 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54 ).</li>.. <li>T
6a00: 68 65 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e he <em>cert</em>
6a10: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c argument is a l
6a20: 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 ist of key-value
6a30: 20 70 61 69 72 73 20 73 69 6d 69 6c 61 72 0a 09 pairs similar..
6a40: 20 20 74 6f 20 74 68 6f 73 65 20 72 65 74 75 72 to those retur
6a50: 6e 65 64 20 62 79 0a 09 20 20 3c 61 20 68 72 65 ned by.. <a hre
6a60: 66 3d 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 22 f="#tls::status"
6a70: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 ><strong>tls::st
6a80: 61 74 75 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 atus</strong></a
6a90: 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54 >.</li>.. <li>T
6aa0: 68 65 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f 65 he <em>status</e
6ab0: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 m> argument is t
6ac0: 68 65 20 62 6f 6f 6c 65 61 6e 20 76 61 6c 69 64 he boolean valid
6ad0: 69 74 79 20 6f 66 20 74 68 65 0a 09 20 20 63 75 ity of the.. cu
6ae0: 72 72 65 6e 74 20 63 65 72 74 69 66 69 63 61 74 rrent certificat
6af0: 65 20 77 68 65 72 65 20 30 20 69 73 20 69 6e 76 e where 0 is inv
6b00: 61 6c 69 64 20 61 6e 64 20 31 20 69 73 20 76 61 alid and 1 is va
6b10: 6c 69 64 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 lid.</li>.. <li
6b20: 3e 54 68 65 20 3c 65 6d 3e 65 72 72 6f 72 3c 2f >The <em>error</
6b30: 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 em> argument is
6b40: 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73 61 67 the error messag
6b50: 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65 72 e, if any, gener
6b60: 61 74 65 64 0a 09 20 20 62 79 20 3c 63 6f 64 65 ated.. by <code
6b70: 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f >X509_STORE_CTX_
6b80: 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f 63 6f 64 get_error()</cod
6b90: 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 2f 75 6c e>.</li>.. </ul
6ba0: 3e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e 0a 09 >..</dd>..<br>..
6bb0: 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a </dl>. </dd>.
6bc0: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f </dl>.</blockquo
6bd0: 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 72 65 6e te>..<p>.Referen
6be0: 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f ce implementatio
6bf0: 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61 6c 6c ns of these call
6c00: 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76 69 64 backs are provid
6c10: 65 64 20 69 6e 20 74 68 65 0a 64 69 73 74 72 69 ed in the.distri
6c20: 62 75 74 69 6f 6e 20 61 73 20 3c 73 74 72 6f 6e bution as <stron
6c30: 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c g>tls::callback<
6c40: 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e /strong>, <stron
6c50: 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c g>tls::password<
6c60: 2f 73 74 72 6f 6e 67 3e 2c 0a 61 6e 64 20 3c 73 /strong>,.and <s
6c70: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c 69 64 trong>tls::valid
6c80: 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 ate_command</str
6c90: 6f 6e 67 3e 20 72 65 73 70 65 63 74 69 76 65 6c ong> respectivel
6ca0: 79 2e 20 20 4e 6f 74 65 20 74 68 61 74 20 74 68 y. Note that th
6cb0: 65 73 65 20 61 72 65 0a 3c 65 6d 3e 73 61 6d 70 ese are.<em>samp
6cc0: 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e le</em> implemen
6cd0: 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 2e 20 20 49 tations only. I
6ce0: 6e 20 61 20 6d 6f 72 65 20 72 65 61 6c 69 73 74 n a more realist
6cf0: 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 0a 79 6f ic deployment.yo
6d00: 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20 u would specify
6d10: 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 your own callbac
6d20: 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63 k scripts on eac
6d30: 68 20 54 4c 53 20 63 68 61 6e 6e 65 6c 20 75 73 h TLS channel us
6d40: 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e ing the.<strong>
6d50: 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 -command</strong
6d60: 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 >, <strong>-pass
6d70: 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 word</strong>, a
6d80: 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 nd <strong>-vali
6d90: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 date_command</st
6da0: 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 2e 0a 3c rong> options..<
6db0: 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 64 65 66 /p>..<p>.The def
6dc0: 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 ault behavior wh
6dd0: 65 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 2d en the <strong>-
6de0: 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e command</strong>
6df0: 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d 76 61 and <strong>-va
6e00: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f lidate_command</
6e10: 73 74 72 6f 6e 67 3e 0a 6f 70 74 69 6f 6e 73 20 strong>.options
6e20: 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66 69 65 are not specifie
6e30: 64 20 69 73 20 66 6f 72 20 54 4c 53 20 74 6f 20 d is for TLS to
6e40: 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f process the asso
6e50: 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 20 63 ciated library c
6e60: 61 6c 6c 62 61 63 6b 73 0a 69 6e 74 65 72 6e 61 allbacks.interna
6e70: 6c 6c 79 2e 20 54 68 65 20 64 65 66 61 75 6c 74 lly. The default
6e80: 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 behavior when t
6e90: 68 65 20 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 he <strong>-pass
6ea0: 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 word</strong> op
6eb0: 74 69 6f 6e 20 69 73 20 6e 6f 74 0a 73 70 65 63 tion is not.spec
6ec0: 69 66 69 65 64 20 69 73 20 66 6f 72 20 54 4c 53 ified is for TLS
6ed0: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 to process the
6ee0: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 associated libra
6ef0: 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 20 ry callbacks by
6f00: 61 74 74 65 6d 70 74 69 6e 67 0a 74 6f 20 63 61 attempting.to ca
6f10: 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a ll <strong>tls::
6f20: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 password</strong
6f30: 3e 2e 0a 54 68 65 20 64 69 66 66 65 72 65 6e 63 >..The differenc
6f40: 65 20 62 65 74 77 65 65 6e 20 74 68 65 73 65 20 e between these
6f50: 74 77 6f 20 62 65 68 61 76 69 6f 72 73 20 69 73 two behaviors is
6f60: 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f a consequence o
6f70: 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 0a 63 6f f maintaining.co
6f80: 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 mpatibility with
6f90: 20 65 61 72 6c 69 65 72 20 69 6d 70 6c 65 6d 65 earlier impleme
6fa0: 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a ntations..</p>..
6fb0: 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 <p>.<em>.The use
6fc0: 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 of the referenc
6fd0: 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c 73 74 72 e callbacks <str
6fe0: 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 ong>tls::callbac
6ff0: 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 3c 73 74 72 k</strong>,.<str
7000: 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 ong>tls::passwor
7010: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 20 d</strong>, and
7020: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c <strong>tls::val
7030: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 idate_command</s
7040: 74 72 6f 6e 67 3e 0a 69 73 20 6e 6f 74 20 72 65 trong>.is not re
7050: 63 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 79 commended. They
7060: 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 may be removed
7070: 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 from future rele
7080: 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e ases..</em>.</p>
7090: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 ..<h3><a name="D
70a0: 45 42 55 47 22 3e 44 45 42 55 47 3c 2f 61 3e 3c EBUG">DEBUG</a><
70b0: 2f 68 33 3e 0a 0a 54 4c 53 20 6b 65 79 20 6c 6f /h3>..TLS key lo
70c0: 67 67 69 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 gging can be ena
70d0: 62 6c 65 64 20 62 79 20 73 65 74 74 69 6e 67 20 bled by setting
70e0: 74 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 the environment
70f0: 76 61 72 69 61 62 6c 65 0a 3c 62 3e 53 53 4c 4b variable.<b>SSLK
7100: 45 59 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 6f EYLOGFILE</b> to
7110: 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 the name of the
7120: 20 66 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 2e file to log to.
7130: 20 54 68 65 6e 20 77 68 65 6e 65 76 65 72 20 54 Then whenever T
7140: 4c 53 0a 6b 65 79 20 6d 61 74 65 72 69 61 6c 20 LS.key material
7150: 69 73 20 67 65 6e 65 72 61 74 65 64 20 6f 72 20 is generated or
7160: 72 65 63 65 69 76 65 64 20 69 74 20 77 69 6c 6c received it will
7170: 20 62 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 68 be logged to th
7180: 65 20 66 69 6c 65 2e 20 54 68 69 73 0a 69 73 20 e file. This.is
7190: 75 73 65 66 75 6c 20 66 6f 72 20 6c 6f 67 67 69 useful for loggi
71a0: 6e 67 20 6b 65 79 20 64 61 74 61 20 66 6f 72 20 ng key data for
71b0: 6e 65 74 77 6f 72 6b 20 6c 6f 67 67 69 6e 67 20 network logging
71c0: 74 6f 6f 6c 73 20 74 6f 20 75 73 65 20 74 6f 0a tools to use to.
71d0: 64 65 63 72 79 70 74 20 74 68 65 20 64 61 74 61 decrypt the data
71e0: 2e 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 74 72 6f ...<p>.The <stro
71f0: 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 ng>tls::debug</s
7200: 74 72 6f 6e 67 3e 20 76 61 72 69 61 62 6c 65 20 trong> variable
7210: 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 provides some ad
7220: 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c ditional.control
7230: 20 6f 76 65 72 20 74 68 65 73 65 20 72 65 66 65 over these refe
7240: 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 2e rence callbacks.
7250: 20 20 49 74 73 20 76 61 6c 75 65 20 69 73 20 7a Its value is z
7260: 65 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e 0a ero by default..
7270: 48 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 Higher values pr
7280: 6f 64 75 63 65 20 6d 6f 72 65 20 64 69 61 67 6e oduce more diagn
7290: 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61 6e ostic output, an
72a0: 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 d will also forc
72b0: 65 20 74 68 65 0a 76 65 72 69 66 79 20 6d 65 74 e the.verify met
72c0: 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67 3e 74 hod in <strong>t
72d0: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 ls::callback</st
72e0: 72 6f 6e 67 3e 20 74 6f 20 61 63 63 65 70 74 20 rong> to accept
72f0: 74 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c the.certificate,
7300: 20 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 73 even when it is
7310: 20 69 6e 76 61 6c 69 64 20 69 66 20 74 68 65 20 invalid if the
7320: 3c 62 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 <b>tls::validate
7330: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 63 61 6c _command</b>.cal
7340: 6c 62 61 63 6b 20 69 73 20 75 73 65 64 20 66 6f lback is used fo
7350: 72 20 74 68 65 20 3c 62 3e 2d 76 61 6c 69 64 61 r the <b>-valida
7360: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 tecommand</b> op
7370: 74 69 6f 6e 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a tion..</p>..<p>.
7380: 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 6f 66 20 <em>.The use of
7390: 74 68 65 20 76 61 72 69 61 62 6c 65 20 3c 73 74 the variable <st
73a0: 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c rong>tls::debug<
73b0: 2f 73 74 72 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 /strong> is not
73c0: 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 recommended..It
73d0: 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66 may be removed f
73e0: 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61 rom future relea
73f0: 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a ses..</em>.</p>.
7400: 0a 3c 68 34 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 .<h4><a name="DE
7410: 42 55 47 5f 45 58 41 4d 50 4c 45 53 22 3e 44 65 BUG_EXAMPLES">De
7420: 62 75 67 20 45 78 61 6d 70 6c 65 73 3c 2f 61 3e bug Examples</a>
7430: 3c 2f 68 34 3e 0a 0a 3c 70 3e 54 68 65 73 65 20 </h4>..<p>These
7440: 65 78 61 6d 70 6c 65 73 20 75 73 65 20 74 68 65 examples use the
7450: 20 64 65 66 61 75 6c 74 20 55 6e 69 78 20 70 6c default Unix pl
7460: 61 74 66 6f 72 6d 20 53 53 4c 20 63 65 72 74 69 atform SSL certi
7470: 66 69 63 61 74 65 73 2e 20 46 6f 72 20 73 74 61 ficates. For sta
7480: 6e 64 61 72 64 0a 69 6e 73 74 61 6c 6c 61 74 69 ndard.installati
7490: 6f 6e 73 2c 20 2d 63 61 64 69 72 20 61 6e 64 20 ons, -cadir and
74a0: 2d 63 61 66 69 6c 65 20 73 68 6f 75 6c 64 20 6e -cafile should n
74b0: 6f 74 20 62 65 20 6e 65 65 64 65 64 2e 20 49 66 ot be needed. If
74c0: 20 79 6f 75 72 20 63 65 72 74 69 66 69 63 61 74 your certificat
74d0: 65 73 0a 61 72 65 20 69 6e 20 6e 6f 6e 2d 73 74 es.are in non-st
74e0: 61 6e 64 61 72 64 20 6c 6f 63 61 74 69 6f 6e 73 andard locations
74f0: 2c 20 75 70 64 61 74 65 20 2d 63 61 64 69 72 20 , update -cadir
7500: 6f 72 20 75 73 65 20 2d 63 61 66 69 6c 65 20 61 or use -cafile a
7510: 73 20 6e 65 65 64 65 64 2e 3c 2f 70 3e 0a 3c 62 s needed.</p>.<b
7520: 72 3e 0a 45 78 61 6d 70 6c 65 20 23 31 3a 20 55 r>.Example #1: U
7530: 73 65 20 48 54 54 50 20 70 61 63 6b 61 67 65 0a se HTTP package.
7540: 0a 0a 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 ..<pre><code>.pa
7550: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 ckage require ht
7560: 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 tp.package requi
7570: 72 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20 22 re tls.set url "
7580: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e https://www.tcl.
7590: 74 6b 2f 22 0a 0a 68 74 74 70 3a 3a 72 65 67 69 tk/"..http::regi
75a0: 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20 5b ster https 443 [
75b0: 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b list ::tls::sock
75c0: 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 et -autoserverna
75d0: 6d 65 20 74 72 75 65 20 2d 72 65 71 75 69 72 65 me true -require
75e0: 20 74 72 75 65 20 2d 63 61 64 69 72 20 2f 65 74 true -cadir /et
75f0: 63 2f 73 73 6c 2f 63 65 72 74 73 20 5c 0a 20 20 c/ssl/certs \.
7600: 20 20 2d 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 -command ::tls
7610: 3a 3a 63 61 6c 6c 62 61 63 6b 20 2d 70 61 73 73 ::callback -pass
7620: 77 6f 72 64 20 3a 3a 74 6c 73 3a 3a 70 61 73 73 word ::tls::pass
7630: 77 6f 72 64 20 2d 76 61 6c 69 64 61 74 65 63 6f word -validateco
7640: 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a 3a 76 61 6c mmand ::tls::val
7650: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5d 0a 0a idate_command]..
7660: 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72 6f # Check for erro
7670: 72 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 68 74 74 r.set token [htt
7680: 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 5d 0a p::geturl $url].
7690: 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74 75 if {[http::statu
76a0: 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 22 6f 6b s $token] ne "ok
76b0: 22 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 5b 66 "} {. puts [f
76c0: 6f 72 6d 61 74 20 22 45 72 72 6f 72 20 25 73 22 ormat "Error %s"
76d0: 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20 24 [http::status $
76e0: 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 20 47 65 74 token]].}..# Get
76f0: 20 77 65 62 20 70 61 67 65 0a 73 65 74 20 64 61 web page.set da
7700: 74 61 20 5b 68 74 74 70 3a 3a 64 61 74 61 20 24 ta [http::data $
7710: 74 6f 6b 65 6e 5d 0a 70 75 74 73 20 5b 73 74 72 token].puts [str
7720: 69 6e 67 20 6c 65 6e 67 74 68 20 24 64 61 74 61 ing length $data
7730: 5d 0a 0a 23 20 43 6c 65 61 6e 75 70 0a 3a 3a 68 ]..# Cleanup.::h
7740: 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f ttp::cleanup $to
7750: 6b 65 6e 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 ken.</code></pre
7760: 3e 0a 0a 45 78 61 6d 70 6c 65 20 23 32 3a 20 55 >..Example #2: U
7770: 73 65 20 72 61 77 20 73 6f 63 6b 65 74 0a 3c 70 se raw socket.<p
7780: 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67 re><code>.packag
7790: 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a 73 e require tls..s
77a0: 65 74 20 75 72 6c 20 22 77 77 77 2e 74 63 6c 2d et url "www.tcl-
77b0: 6c 61 6e 67 2e 6f 72 67 22 0a 73 65 74 20 70 6f lang.org".set po
77c0: 72 74 20 34 34 33 0a 0a 73 65 74 20 63 68 20 5b rt 443..set ch [
77d0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 tls::socket -aut
77e0: 6f 73 65 72 76 65 72 6e 61 6d 65 20 31 20 2d 73 oservername 1 -s
77f0: 65 72 76 65 72 6e 61 6d 65 20 24 75 72 6c 20 2d ervername $url -
7800: 72 65 71 75 65 73 74 20 31 20 2d 72 65 71 75 69 request 1 -requi
7810: 72 65 20 31 20 5c 0a 20 20 20 20 2d 61 6c 70 6e re 1 \. -alpn
7820: 20 7b 68 74 74 70 2f 31 2e 31 7d 20 2d 63 61 64 {http/1.1} -cad
7830: 69 72 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 ir /etc/ssl/cert
7840: 73 20 2d 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 s -command ::tls
7850: 3a 3a 63 61 6c 6c 62 61 63 6b 20 5c 0a 20 20 20 ::callback \.
7860: 20 2d 70 61 73 73 77 6f 72 64 20 3a 3a 74 6c 73 -password ::tls
7870: 3a 3a 70 61 73 73 77 6f 72 64 20 2d 76 61 6c 69 ::password -vali
7880: 64 61 74 65 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c datecommand ::tl
7890: 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d s::validate_comm
78a0: 61 6e 64 20 24 75 72 6c 20 24 70 6f 72 74 5d 0a and $url $port].
78b0: 63 68 61 6e 20 63 6f 6e 66 69 67 75 72 65 20 24 chan configure $
78c0: 63 68 20 2d 62 75 66 66 65 72 73 69 7a 65 20 36 ch -buffersize 6
78d0: 35 35 33 36 0a 74 6c 73 3a 3a 68 61 6e 64 73 68 5536.tls::handsh
78e0: 61 6b 65 20 24 63 68 0a 0a 70 75 74 73 20 24 63 ake $ch..puts $c
78f0: 68 20 22 47 45 54 20 2f 20 48 54 54 50 2f 31 2e h "GET / HTTP/1.
7900: 31 22 0a 66 6c 75 73 68 20 24 63 68 0a 61 66 74 1".flush $ch.aft
7910: 65 72 20 35 30 30 0a 73 65 74 20 64 61 74 61 20 er 500.set data
7920: 5b 72 65 61 64 20 24 63 68 5d 0a 0a 61 72 72 61 [read $ch]..arra
7930: 79 20 73 65 74 20 73 74 61 74 75 73 20 5b 74 6c y set status [tl
7940: 73 3a 3a 73 74 61 74 75 73 20 24 63 68 5d 0a 61 s::status $ch].a
7950: 72 72 61 79 20 73 65 74 20 63 6f 6e 6e 20 5b 74 rray set conn [t
7960: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 20 24 ls::connection $
7970: 63 68 5d 0a 61 72 72 61 79 20 73 65 74 20 63 68 ch].array set ch
7980: 61 6e 20 5b 63 68 61 6e 20 63 6f 6e 66 69 67 75 an [chan configu
7990: 72 65 20 24 63 68 5d 0a 63 6c 6f 73 65 20 24 63 re $ch].close $c
79a0: 68 0a 70 61 72 72 61 79 20 73 74 61 74 75 73 0a h.parray status.
79b0: 70 61 72 72 61 79 20 63 6f 6e 6e 0a 70 61 72 72 parray conn.parr
79c0: 61 79 20 63 68 61 6e 0a 3c 2f 63 6f 64 65 3e 3c ay chan.</code><
79d0: 2f 70 72 65 3e 0a 0a 0a 3c 68 33 3e 3c 61 20 6e /pre>...<h3><a n
79e0: 61 6d 65 3d 22 48 54 54 50 53 20 45 58 41 4d 50 ame="HTTPS EXAMP
79f0: 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c LE">HTTPS EXAMPL
7a00: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 E</a></h3>..<p>T
7a10: 68 65 73 65 20 65 78 61 6d 70 6c 65 73 20 75 73 hese examples us
7a20: 65 20 74 68 65 20 64 65 66 61 75 6c 74 20 55 6e e the default Un
7a30: 69 78 20 70 6c 61 74 66 6f 72 6d 20 53 53 4c 20 ix platform SSL
7a40: 63 65 72 74 69 66 69 63 61 74 65 73 2e 20 46 6f certificates. Fo
7a50: 72 20 73 74 61 6e 64 61 72 64 0a 69 6e 73 74 61 r standard.insta
7a60: 6c 6c 61 74 69 6f 6e 73 2c 20 2d 63 61 64 69 72 llations, -cadir
7a70: 20 61 6e 64 20 2d 63 61 66 69 6c 65 20 73 68 6f and -cafile sho
7a80: 75 6c 64 20 6e 6f 74 20 62 65 20 6e 65 65 64 65 uld not be neede
7a90: 64 2e 20 49 66 20 79 6f 75 72 20 63 65 72 74 69 d. If your certi
7aa0: 66 69 63 61 74 65 73 0a 61 72 65 20 69 6e 20 6e ficates.are in n
7ab0: 6f 6e 2d 73 74 61 6e 64 61 72 64 20 6c 6f 63 61 on-standard loca
7ac0: 74 69 6f 6e 73 2c 20 75 70 64 61 74 65 20 2d 63 tions, update -c
7ad0: 61 64 69 72 20 6f 72 20 75 73 65 20 2d 63 61 66 adir or use -caf
7ae0: 69 6c 65 20 61 73 20 6e 65 65 64 65 64 2e 3c 2f ile as needed.</
7af0: 70 3e 0a 0a 45 78 61 6d 70 6c 65 20 23 31 3a 20 p>..Example #1:
7b00: 47 65 74 20 77 65 62 20 70 61 67 65 0a 0a 3c 70 Get web page..<p
7b10: 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67 re><code>.packag
7b20: 65 20 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 e require http.p
7b30: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 ackage require t
7b40: 6c 73 0a 73 65 74 20 75 72 6c 20 22 68 74 74 70 ls.set url "http
7b50: 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b 2f 22 s://www.tcl.tk/"
7b60: 0a 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 ..http::register
7b70: 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 https 443 [list
7b80: 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d ::tls::socket -
7b90: 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 autoservername t
7ba0: 72 75 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 rue -require tru
7bb0: 65 20 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 e -cadir /etc/ss
7bc0: 6c 2f 63 65 72 74 73 5d 0a 0a 23 20 43 68 65 63 l/certs]..# Chec
7bd0: 6b 20 66 6f 72 20 65 72 72 6f 72 0a 73 65 74 20 k for error.set
7be0: 74 6f 6b 65 6e 20 5b 68 74 74 70 3a 3a 67 65 74 token [http::get
7bf0: 75 72 6c 20 24 75 72 6c 5d 0a 69 66 20 7b 5b 68 url $url].if {[h
7c00: 74 74 70 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b ttp::status $tok
7c10: 65 6e 5d 20 6e 65 20 22 6f 6b 22 7d 20 7b 0a 20 en] ne "ok"} {.
7c20: 20 20 20 70 75 74 73 20 5b 66 6f 72 6d 61 74 20 puts [format
7c30: 22 45 72 72 6f 72 20 25 73 22 20 5b 68 74 74 70 "Error %s" [http
7c40: 3a 3a 73 74 61 74 75 73 20 24 74 6f 6b 65 6e 5d ::status $token]
7c50: 5d 0a 7d 0a 0a 23 20 47 65 74 20 77 65 62 20 70 ].}..# Get web p
7c60: 61 67 65 0a 73 65 74 20 64 61 74 61 20 5b 68 74 age.set data [ht
7c70: 74 70 3a 3a 64 61 74 61 20 24 74 6f 6b 65 6e 5d tp::data $token]
7c80: 0a 70 75 74 73 20 24 64 61 74 61 0a 0a 23 20 43 .puts $data..# C
7c90: 6c 65 61 6e 75 70 0a 3a 3a 68 74 74 70 3a 3a 63 leanup.::http::c
7ca0: 6c 65 61 6e 75 70 20 24 74 6f 6b 65 6e 0a 3c 2f leanup $token.</
7cb0: 63 6f 64 65 3e 3c 2f 70 72 65 3e 0a 0a 45 78 61 code></pre>..Exa
7cc0: 6d 70 6c 65 20 23 32 3a 20 44 6f 77 6e 6c 6f 61 mple #2: Downloa
7cd0: 64 20 66 69 6c 65 0a 0a 3c 70 72 65 3e 3c 63 6f d file..<pre><co
7ce0: 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 de>.package requ
7cf0: 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 ire http.package
7d00: 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a 73 65 require tls..se
7d10: 74 20 75 72 6c 20 22 68 74 74 70 73 3a 2f 2f 77 t url "https://w
7d20: 69 6b 69 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67 iki.tcl-lang.org
7d30: 2f 73 69 74 65 6d 61 70 2e 78 6d 6c 22 0a 73 65 /sitemap.xml".se
7d40: 74 20 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65 t filename [file
7d50: 20 74 61 69 6c 20 24 75 72 6c 5d 0a 0a 68 74 74 tail $url]..htt
7d60: 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 p::register http
7d70: 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c s 443 [list ::tl
7d80: 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 s::socket -autos
7d90: 65 72 76 65 72 6e 61 6d 65 20 74 72 75 65 20 2d ervername true -
7da0: 72 65 71 75 69 72 65 20 74 72 75 65 20 2d 63 61 require true -ca
7db0: 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72 dir /etc/ssl/cer
7dc0: 74 73 5d 0a 0a 23 20 47 65 74 20 66 69 6c 65 0a ts]..# Get file.
7dd0: 73 65 74 20 63 68 20 5b 6f 70 65 6e 20 24 66 69 set ch [open $fi
7de0: 6c 65 6e 61 6d 65 20 77 62 5d 0a 73 65 74 20 74 lename wb].set t
7df0: 6f 6b 65 6e 20 5b 3a 3a 68 74 74 70 3a 3a 67 65 oken [::http::ge
7e00: 74 75 72 6c 20 24 75 72 6c 20 2d 62 6c 6f 63 6b turl $url -block
7e10: 73 69 7a 65 20 36 35 35 33 36 20 2d 63 68 61 6e size 65536 -chan
7e20: 6e 65 6c 20 24 63 68 5d 0a 0a 23 20 43 6c 65 61 nel $ch]..# Clea
7e30: 6e 75 70 0a 63 6c 6f 73 65 20 24 63 68 0a 3a 3a nup.close $ch.::
7e40: 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 http::cleanup $t
7e50: 6f 6b 65 6e 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 oken.</code></pr
7e60: 65 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d e>..<h3><a name=
7e70: 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 "SPECIAL CONSIDE
7e80: 52 41 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c RATIONS">SPECIAL
7e90: 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c CONSIDERATIONS<
7ea0: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 /a></h3>..<p>The
7eb0: 20 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 capabilities of
7ec0: 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 this package ca
7ed0: 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c n vary enormousl
7ee0: 79 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 y based upon how
7ef0: 20 74 68 65 0a 6c 69 6e 6b 65 64 20 74 6f 20 4f the.linked to O
7f00: 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77 penSSL library w
7f10: 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e as configured an
7f20: 64 20 62 75 69 6c 74 2e 20 4e 65 77 20 76 65 72 d built. New ver
7f30: 73 69 6f 6e 73 20 6d 61 79 20 6f 62 73 6f 6c 65 sions may obsole
7f40: 74 65 0a 6f 6c 64 65 72 20 70 72 6f 74 6f 63 6f te.older protoco
7f50: 6c 20 76 65 72 73 69 6f 6e 73 2c 20 61 64 64 20 l versions, add
7f60: 6f 72 20 72 65 6d 6f 76 65 20 63 69 70 68 65 72 or remove cipher
7f70: 73 2c 20 63 68 61 6e 67 65 20 64 65 66 61 75 6c s, change defaul
7f80: 74 20 76 61 6c 75 65 73 2c 20 65 74 63 2e 0a 55 t values, etc..U
7f90: 73 65 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 74 se the <strong>t
7fa0: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 ls::protocols</s
7fb0: 74 72 6f 6e 67 3e 20 63 6f 6d 6d 61 6e 64 73 20 trong> commands
7fc0: 74 6f 20 6f 62 74 61 69 6e 20 74 68 65 20 73 75 to obtain the su
7fd0: 70 70 6f 72 74 65 64 0a 70 72 6f 74 6f 63 6f 6c pported.protocol
7fe0: 20 76 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a versions.</p>..
7ff0: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 <h3><a name="SEE
8000: 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c ALSO">SEE ALSO<
8010: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 /a></h3>..<p><st
8020: 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 rong>socket</str
8030: 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 ong>, <strong>fi
8040: 6c 65 65 76 65 6e 74 3c 2f 73 74 72 6f 6e 67 3e leevent</strong>
8050: 2c 20 3c 73 74 72 6f 6e 67 3e 68 74 74 70 3c 2f , <strong>http</
8060: 73 74 72 6f 6e 67 3e 2c 0a 3c 61 20 68 72 65 66 strong>,.<a href
8070: 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 ="http://www.ope
8080: 6e 73 73 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72 6f nssl.org/"><stro
8090: 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f ng>OpenSSL</stro
80a0: 6e 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68 72 ng></a></p>..<hr
80b0: 3e 0a 0a 3c 70 72 65 3e 0a 43 6f 70 79 72 69 67 >..<pre>.Copyrig
80c0: 68 74 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d ht © 1999 M
80d0: 61 74 74 20 4e 65 77 6d 61 6e 2e 0a 43 6f 70 79 att Newman..Copy
80e0: 72 69 67 68 74 20 26 63 6f 70 79 3b 20 32 30 30 right © 200
80f0: 34 20 53 74 61 72 66 69 73 68 20 53 79 73 74 65 4 Starfish Syste
8100: 6d 73 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 ms..Copyright &c
8110: 6f 70 79 3b 20 32 30 32 33 20 42 72 69 61 6e 20 opy; 2023 Brian
8120: 4f 27 48 61 67 61 6e 2e 0a 3c 2f 70 72 65 3e 0a O'Hagan..</pre>.
8130: 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c 3e 0a </body>.</html>.