0000: 3c 21 64 6f 63 74 79 70 65 20 68 74 6d 6c 20 70 <!doctype html p
0010: 75 62 6c 69 63 20 22 2d 2f 2f 57 33 43 2f 2f 44 ublic "-//W3C//D
0020: 54 44 20 48 54 4d 4c 20 34 2e 30 20 54 72 61 6e TD HTML 4.0 Tran
0030: 73 69 74 69 6f 6e 61 6c 2f 2f 45 4e 22 3e 0a 0a sitional//EN">..
0040: 3c 68 74 6d 6c 3e 0a 0a 3c 68 65 61 64 3e 0a 3c <html>..<head>.<
0050: 6d 65 74 61 20 68 74 74 70 2d 65 71 75 69 76 3d meta http-equiv=
0060: 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 0a 63 "Content-Type".c
0070: 6f 6e 74 65 6e 74 3d 22 74 65 78 74 2f 68 74 6d ontent="text/htm
0080: 6c 3b 20 63 68 61 72 73 65 74 3d 69 73 6f 2d 38 l; charset=iso-8
0090: 38 35 39 2d 31 22 3e 0a 3c 6d 65 74 61 20 6e 61 859-1">.<meta na
00a0: 6d 65 3d 22 43 6f 70 79 72 69 67 68 74 22 20 63 me="Copyright" c
00b0: 6f 6e 74 65 6e 74 3d 22 31 39 39 39 20 4d 61 74 ontent="1999 Mat
00c0: 74 20 4e 65 77 6d 61 6e 20 2f 20 32 30 30 34 20 t Newman / 2004
00d0: 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 Starfish Systems
00e0: 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c 53 20 28 53 ">.<title>TLS (S
00f0: 53 4c 29 20 54 63 6c 20 43 6f 6d 6d 61 6e 64 73 SL) Tcl Commands
0100: 3c 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64 3e </title>.</head>
0110: 0a 0a 3c 62 6f 64 79 20 62 67 63 6f 6c 6f 72 3d ..<body bgcolor=
0120: 22 23 46 46 46 46 46 46 22 3e 0a 0a 3c 64 6c 3e "#FFFFFF">..<dl>
0130: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 . <dd><a href
0140: 3d 22 23 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 ="#NAME">NAME</a
0150: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 64 3e >. <dl>..<dd>
0160: 3c 62 3e 74 6c 73 3c 2f 62 3e 20 2d 20 62 69 6e <b>tls</b> - bin
0170: 64 69 6e 67 20 74 6f 20 3c 62 3e 4f 70 65 6e 53 ding to <b>OpenS
0180: 53 4c 3c 2f 62 3e 20 74 6f 6f 6c 6b 69 74 2e 3c SL</b> toolkit.<
0190: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 20 /dd>. </dl>.
01a0: 20 20 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 </dd>. <dd
01b0: 3e 3c 61 20 68 72 65 66 3d 22 23 53 59 4e 4f 50 ><a href="#SYNOP
01c0: 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 SIS">SYNOPSIS</a
01d0: 3e 20 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e > </dd>. <dd>
01e0: 3c 64 6c 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 <dl>.. <dd><b
01f0: 3e 70 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 >package require
0200: 20 54 63 6c 3c 2f 62 3e 20 3c 65 6d 3e 3f 38 2e Tcl</b> <em>?8.
0210: 34 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 4?</em></dd>..
0220: 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 <dd><b>package
0230: 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e require tls</b>
0240: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74 3e 26 </dd>.. <dt>&
0250: 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20 20 20 nbsp;</dt>..
0260: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 <dd><b>tls::init
0270: 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e </b> <em>?option
0280: 73 3f 3c 2f 65 6d 3e 20 3c 2f 64 64 3e 0a 09 20 s?</em> </dd>..
0290: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 <dd><b>tls::s
02a0: 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f ocket</b> <em>?o
02b0: 70 74 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 ptions? host por
02c0: 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 t</em></dd>..
02d0: 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 <dd><b>tls::soc
02e0: 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 20 3f 2d 73 ket</b> <em> ?-s
02f0: 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f erver command? ?
0300: 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65 options? port</e
0310: 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 m></dd>.. <dd
0320: 3e 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 ><b>tls::handsha
0330: 6b 65 3c 2f 62 3e 20 3c 65 6d 3e 20 63 68 61 6e ke</b> <em> chan
0340: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 nel</em></dd>..
0350: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 <dd><b>tls::s
0360: 74 61 74 75 73 20 3c 2f 62 3e 20 3c 65 6d 3e 3f tatus </b> <em>?
0370: 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c -local? channel<
0380: 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c /em></dd>.. <
0390: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 dd><b>tls::conne
03a0: 63 74 69 6f 6e 20 3c 2f 62 3e 20 3c 65 6d 3e 63 ction </b> <em>c
03b0: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e hannel</em></dd>
03c0: 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 .. <dd><b>tls
03d0: 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d ::import</b> <em
03e0: 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e >channel ?option
03f0: 73 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 s?</em></dd>..
0400: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 75 6e <dd><b>tls::un
0410: 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 import</b> <em>c
0420: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e hannel</em></dd>
0430: 0a 09 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b .. <dt>
0440: 3c 2f 64 74 3e 0a 09 20 20 20 20 3c 64 64 3e 3c </dt>.. <dd><
0450: 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f b>tls::ciphers</
0460: 62 3e 20 3c 65 6d 3e 3f 70 72 6f 74 6f 63 6f 6c b> <em>?protocol
0470: 3f 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 ? ?verbose? ?sup
0480: 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 64 ported?</em></dd
0490: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c >.. <dd><b>tl
04a0: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e s::protocols</b>
04b0: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c </dd>.. <dd><
04c0: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f b>tls::version</
04d0: 62 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74 b></dd>.. <dt
04e0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20 > </dt>..
04f0: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 64 69 <dd><b>tls::di
0500: 67 65 73 74 3c 2f 62 3e 20 3c 65 6d 3e 74 79 70 gest</b> <em>typ
0510: 65 20 3f 2d 62 69 6e 7c 2d 68 65 78 3f 20 5b 2d e ?-bin|-hex? [-
0520: 66 69 6c 65 20 66 69 6c 65 6e 61 6d 65 20 7c 20 file filename |
0530: 2d 63 68 61 6e 20 63 68 61 6e 6e 65 6c 20 7c 20 -chan channel |
0540: 3f 2d 64 61 74 61 3f 20 64 61 74 61 5d 3c 2f 65 ?-data? data]</e
0550: 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 m></dd>.. <dd
0560: 3e 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 73 ><b>tls::digests
0570: 3c 2f 62 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c </b></dd>.. <
0580: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 34 3c 2f dd><b>tls::md4</
0590: 62 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e b> <em>data</em>
05a0: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c </dd>.. <dd><
05b0: 62 3e 74 6c 73 3a 3a 6d 64 35 3c 2f 62 3e 20 3c b>tls::md5</b> <
05c0: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 em>data</em></dd
05d0: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c >.. <dd><b>tl
05e0: 73 3a 3a 73 68 61 31 3c 2f 62 3e 20 3c 65 6d 3e s::sha1</b> <em>
05f0: 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 data</em></dd>..
0600: 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a <dd><b>tls::
0610: 73 68 61 32 35 36 3c 2f 62 3e 20 3c 65 6d 3e 64 sha256</b> <em>d
0620: 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c ata</em></dd>..<
0630: 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 /dl>. </dd>.
0640: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 <dd><a href="
0650: 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 #COMMANDS">COMMA
0660: 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 NDS</a></dd>.
0670: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 <dd><a href="#C
0680: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 ALLBACK OPTIONS"
0690: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e >CALLBACK OPTION
06a0: 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c S</a></dd>. <
06b0: 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 54 dd><a href="#HTT
06c0: 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 PS EXAMPLE">HTTP
06d0: 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 S EXAMPLE</a></d
06e0: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 d>. <dd><a hr
06f0: 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 ef="#SEE ALSO">S
0700: 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 PECIAL CONSIDERA
0710: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 TIONS</a></dd>.
0720: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 <dd><a href="
0730: 23 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 #SEE ALSO">SEE A
0740: 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 LSO</a></dd>.</d
0750: 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 l>..<hr>..<h3><a
0760: 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d name="NAME">NAM
0770: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c E</a></h3>..<p><
0780: 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f strong>tls</stro
0790: 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f ng> - binding to
07a0: 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c <strong>OpenSSL
07b0: 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 </strong>.toolki
07c0: 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e t.</p>..<h3><a n
07d0: 61 6d 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53 ame="SYNOPSIS">S
07e0: 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e YNOPSIS</a></h3>
07f0: 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20 ..<p><b>package
0800: 72 65 71 75 69 72 65 20 54 63 6c 20 38 2e 35 3c require Tcl 8.5<
0810: 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 /b><br>.<b>packa
0820: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f ge require tls</
0830: 62 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 b><br>.<br>.<a h
0840: 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6e 69 74 22 ref="#tls::init"
0850: 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 ><b>tls::init</b
0860: 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f > <i>?options?</
0870: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
0880: 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 ef="#tls::socket
0890: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 "><b>tls::socket
08a0: 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 </b> <i>?options
08b0: 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f 69 3e 3c ? host port</i><
08c0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
08d0: 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c s::socket"><b>tl
08e0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69 s::socket</b> <i
08f0: 3e 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e >?-server comman
0900: 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 d? ?options? por
0910: 74 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 t</i></a><br>.<a
0920: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61 href="#tls::sta
0930: 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 tus"><b>tls::sta
0940: 74 75 73 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63 tus</b> <i>?-loc
0950: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c al? channel</i><
0960: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
0970: 22 23 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f "#tls::connectio
0980: 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 n"><b>tls::conne
0990: 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61 ction</b> <i>cha
09a0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e nnel</i></a><br>
09b0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
09c0: 68 61 6e 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c handshake"><b>tl
09d0: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e s::handshake</b>
09e0: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c <i>channel</i><
09f0: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
0a00: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c "#tls::import"><
0a10: 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 b>tls::import</b
0a20: 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 > <i>channel ?op
0a30: 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 tions?</i></a><b
0a40: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 r>.<a href="#tls
0a50: 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 ::unimport"><b>t
0a60: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e ls::unimport</b>
0a70: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c <i>channel</i><
0a80: 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 /a><br>.<br>.<a
0a90: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68 href="#tls::ciph
0aa0: 65 72 73 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 ers"><b>tls::cip
0ab0: 68 65 72 73 3c 2f 62 3e 20 3c 69 3e 3f 70 72 6f hers</b> <i>?pro
0ac0: 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f tocol? ?verbose?
0ad0: 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f 69 3e ?supported?</i>
0ae0: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 </a><br>.<a href
0af0: 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c ="#tls::protocol
0b00: 73 22 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f s"><b>tls::proto
0b10: 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 3e cols</b></a><br>
0b20: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
0b30: 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a version"><b>tls:
0b40: 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e :version</b></a>
0b50: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65 <br>.<br>.<a hre
0b60: 66 3d 22 23 74 6c 73 3a 3a 64 69 67 65 73 74 22 f="#tls::digest"
0b70: 3e 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c ><b>tls::digest<
0b80: 2f 62 3e 20 3c 69 3e 74 79 70 65 20 3f 2d 62 69 /b> <i>type ?-bi
0b90: 6e 7c 2d 68 65 78 3f 20 5b 2d 66 69 6c 65 20 66 n|-hex? [-file f
0ba0: 69 6c 65 6e 61 6d 65 20 7c 20 2d 63 68 61 6e 20 ilename | -chan
0bb0: 63 68 61 6e 6e 65 6c 20 7c 20 3f 2d 64 61 74 61 channel | ?-data
0bc0: 3f 20 64 61 74 61 5d 3c 2f 69 3e 3c 2f 61 3e 3c ? data]</i></a><
0bd0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0be0: 73 3a 3a 64 69 67 65 73 74 73 22 3e 3c 62 3e 74 s::digests"><b>t
0bf0: 6c 73 3a 3a 64 69 67 65 73 74 73 3c 2f 62 3e 3c ls::digests</b><
0c00: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
0c10: 22 23 74 6c 73 3a 3a 6d 64 34 22 3e 3c 62 3e 74 "#tls::md4"><b>t
0c20: 6c 73 3a 3a 6d 64 34 3c 2f 62 3e 20 3c 69 3e 64 ls::md4</b> <i>d
0c30: 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a ata</i></a><br>.
0c40: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 6d <a href="#tls::m
0c50: 64 35 22 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 35 3c d5"><b>tls::md5<
0c60: 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c /b> <i>data</i><
0c70: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /a><br>.<a href=
0c80: 22 23 74 6c 73 3a 3a 73 68 61 31 22 3e 3c 62 3e "#tls::sha1"><b>
0c90: 74 6c 73 3a 3a 73 68 61 31 3c 2f 62 3e 20 3c 69 tls::sha1</b> <i
0ca0: 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 >data</i></a><br
0cb0: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a >.<a href="#tls:
0cc0: 3a 73 68 61 32 35 36 22 3e 3c 62 3e 74 6c 73 3a :sha256"><b>tls:
0cd0: 3a 73 68 61 32 35 36 3c 2f 62 3e 20 3c 69 3e 64 :sha256</b> <i>d
0ce0: 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a ata</i></a><br>.
0cf0: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d </p>..<h3><a nam
0d00: 65 3d 22 44 45 53 43 52 49 50 54 49 4f 4e 22 3e e="DESCRIPTION">
0d10: 44 45 53 43 52 49 50 54 49 4f 4e 3c 2f 61 3e 3c DESCRIPTION</a><
0d20: 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 65 78 /h3>..<p>This ex
0d30: 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64 65 73 tension provides
0d40: 20 61 20 67 65 6e 65 72 69 63 20 62 69 6e 64 69 a generic bindi
0d50: 6e 67 20 74 6f 20 3c 61 0a 68 72 65 66 3d 22 68 ng to <a.href="h
0d60: 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 ttp://www.openss
0d70: 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c l.org/">OpenSSL<
0d80: 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e 67 20 74 /a>, utilizing t
0d90: 68 65 0a 3c 73 74 72 6f 6e 67 3e 54 63 6c 5f 53 he.<strong>Tcl_S
0da0: 74 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f 73 74 72 tackChannel</str
0db0: 6f 6e 67 3e 0a 41 50 49 20 66 6f 72 20 54 63 6c ong>.API for Tcl
0dc0: 20 38 2e 34 20 61 6e 64 20 68 69 67 68 65 72 2e 8.4 and higher.
0dd0: 20 54 68 65 20 73 6f 63 6b 65 74 73 20 62 65 68 The sockets beh
0de0: 61 76 65 20 65 78 61 63 74 6c 79 20 74 68 65 20 ave exactly the
0df0: 73 61 6d 65 0a 61 73 20 63 68 61 6e 6e 65 6c 73 same.as channels
0e00: 20 63 72 65 61 74 65 64 20 75 73 69 6e 67 20 54 created using T
0e10: 63 6c 27 73 20 62 75 69 6c 74 2d 69 6e 20 3c 73 cl's built-in <s
0e20: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 trong>socket</st
0e30: 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 20 77 69 rong>.command wi
0e40: 74 68 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70 th additional op
0e50: 74 69 6f 6e 73 20 66 6f 72 20 63 6f 6e 74 72 6f tions for contro
0e60: 6c 6c 69 6e 67 20 74 68 65 20 53 53 4c 20 73 65 lling the SSL se
0e70: 73 73 69 6f 6e 2e 0a 3c 2f 70 3e 0a 0a 3c 68 33 ssion..</p>..<h3
0e80: 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f 4d 4d 41 4e ><a name="COMMAN
0e90: 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f 61 3e DS">COMMANDS</a>
0ea0: 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 70 69 63 61 </h3>..<p>Typica
0eb0: 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c 64 20 75 73 lly one would us
0ec0: 65 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 74 6c e the <strong>tl
0ed0: 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 73 74 72 6f s::socket </stro
0ee0: 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 68 69 63 68 ng>command.which
0ef0: 20 70 72 6f 76 69 64 65 73 20 63 6f 6d 70 61 74 provides compat
0f00: 69 62 69 6c 69 74 79 20 77 69 74 68 20 74 68 65 ibility with the
0f10: 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 74 72 native Tcl <str
0f20: 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f ong>socket</stro
0f30: 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e 20 49 6e 20 ng>.command. In
0f40: 73 75 63 68 20 63 61 73 65 73 20 3c 73 74 72 6f such cases <stro
0f50: 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f ng>tls::import</
0f60: 73 74 72 6f 6e 67 3e 20 73 68 6f 75 6c 64 20 6e strong> should n
0f70: 6f 74 20 62 65 0a 75 73 65 64 20 64 69 72 65 63 ot be.used direc
0f80: 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 6c 3e 0a 20 tly.</p>..<dl>.
0f90: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 <dt><a name="
0fa0: 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e 74 6c tls::init"><b>tl
0fb0: 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e 3c 69 3e 3f s::init </b><i>?
0fc0: 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e options?</i></a>
0fd0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 4f 70 </dt>. <dd>Op
0fe0: 74 69 6f 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 20 tional function
0ff0: 74 6f 20 73 65 74 20 74 68 65 20 64 65 66 61 75 to set the defau
1000: 6c 74 20 6f 70 74 69 6f 6e 73 20 75 73 65 64 20 lt options used
1010: 62 79 0a 09 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a by..<strong>tls:
1020: 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e :socket</strong>
1030: 2e 20 49 66 20 79 6f 75 20 63 61 6c 6c 20 3c 73 . If you call <s
1040: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 trong>tls::impor
1050: 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 64 69 72 65 t</strong>..dire
1060: 63 74 6c 79 20 74 68 69 73 20 72 6f 75 74 69 6e ctly this routin
1070: 65 20 68 61 73 20 6e 6f 20 65 66 66 65 63 74 2e e has no effect.
1080: 20 41 6e 79 20 6f 66 20 74 68 65 20 6f 70 74 69 Any of the opti
1090: 6f 6e 73 0a 09 74 68 61 74 20 3c 73 74 72 6f 6e ons..that <stron
10a0: 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 g>tls::socket</s
10b0: 74 72 6f 6e 67 3e 20 61 63 63 65 70 74 73 20 63 trong> accepts c
10c0: 61 6e 20 62 65 20 73 65 74 0a 09 75 73 69 6e 67 an be set..using
10d0: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 74 this command, t
10e0: 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c 64 hough you should
10f0: 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69 limit your opti
1100: 6f 6e 73 0a 09 74 6f 20 6f 6e 6c 79 20 54 4c 53 ons..to only TLS
1110: 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 2e 3c 2f related ones.</
1120: 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 dd>. <dt>&nbs
1130: 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e p;</dt>. <dt>
1140: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 6f <a name="tls::so
1150: 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f cket"><b>tls::so
1160: 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f 70 cket </b><em>?op
1170: 74 69 6f 6e 73 3f 0a 09 68 6f 73 74 20 70 6f 72 tions?..host por
1180: 74 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a t</em></a></dt>.
1190: 20 20 20 20 3c 64 74 3e 3c 62 3e 74 6c 73 3a 3a <dt><b>tls::
11a0: 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e 20 3f socket</b><em> ?
11b0: 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f -server command?
11c0: 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c ?options? port<
11d0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 /em></dt>. <d
11e0: 64 3e 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 d>This is a help
11f0: 65 72 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 er function that
1200: 20 75 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e utilizes the un
1210: 64 65 72 6c 79 69 6e 67 0a 09 63 6f 6d 6d 61 6e derlying..comman
1220: 64 73 20 28 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a ds (<strong>tls:
1230: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e :import</strong>
1240: 29 2e 20 49 74 20 62 65 68 61 76 65 73 0a 09 65 ). It behaves..e
1250: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20 xactly the same
1260: 61 73 20 74 68 65 20 6e 61 74 69 76 65 20 54 63 as the native Tc
1270: 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 l <strong>socket
1280: 3c 2f 73 74 72 6f 6e 67 3e 0a 09 63 6f 6d 6d 61 </strong>..comma
1290: 6e 64 20 65 78 63 65 70 74 20 74 68 61 74 20 74 nd except that t
12a0: 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 6e 20 69 he options can i
12b0: 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66 20 74 68 nclude any of th
12c0: 65 0a 09 61 70 70 6c 69 63 61 62 6c 65 20 3c 61 e..applicable <a
12d0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 href="#tls::imp
12e0: 6f 72 74 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 ort"><strong>tls
12f0: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e :import</strong>
1300: 3c 2f 61 3e 0a 09 6f 70 74 69 6f 6e 73 20 77 69 </a>..options wi
1310: 74 68 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e 61 th one additiona
1320: 6c 20 6f 70 74 69 6f 6e 3a 0a 3c 62 6c 6f 63 6b l option:.<block
1330: 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a quote>. <dl>.
1340: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 75 .<dt><strong>-au
1350: 74 6f 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 toservername</st
1360: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f rong> <em>bool</
1370: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 75 em></dt>..<dd>Au
1380: 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 65 6e 64 tomatically send
1390: 20 74 68 65 20 2d 73 65 72 76 65 72 6e 61 6d 65 the -servername
13a0: 20 61 73 20 74 68 65 20 3c 65 6d 3e 68 6f 73 74 as the <em>host
13b0: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 0a 09 </em> argument..
13c0: 20 20 20 20 28 64 65 66 61 75 6c 74 20 69 73 20 (default is
13d0: 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c <em>false</em>)<
13e0: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c /dd>. </dl>.<
13f0: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 /blockquote>..
1400: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
1410: 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 ls::import"><b>t
1420: 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c ls::import </b><
1430: 69 3e 63 68 61 6e 6e 65 6c 0a 09 3f 6f 70 74 69 i>channel..?opti
1440: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 ons?</i></a></dt
1450: 3e 0a 20 20 20 20 3c 64 64 3e 53 53 4c 2d 65 6e >. <dd>SSL-en
1460: 61 62 6c 65 20 61 20 72 65 67 75 6c 61 72 20 54 able a regular T
1470: 63 6c 20 63 68 61 6e 6e 65 6c 20 2d 20 69 74 20 cl channel - it
1480: 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 0a 09 73 need not be a..s
1490: 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20 ocket, but must
14a0: 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63 provide bi-direc
14b0: 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c 73 tional flow. Als
14c0: 6f 0a 09 73 65 74 74 69 6e 67 20 73 65 73 73 69 o..setting sessi
14d0: 6f 6e 20 70 61 72 61 6d 65 74 65 72 73 20 66 6f on parameters fo
14e0: 72 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e r SSL handshake.
14f0: 3c 2f 64 64 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f </dd>..<blockquo
1500: 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 te>. <dl>..<d
1510: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 6c 70 6e 3c t><strong>-alpn<
1520: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 /strong> <em>lis
1530: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 t</em></dt>..<dd
1540: 3e 4c 69 73 74 20 6f 66 20 70 72 6f 74 6f 63 6f >List of protoco
1550: 6c 73 20 74 6f 20 6f 66 66 65 72 20 64 75 72 69 ls to offer duri
1560: 6e 67 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c ng Application-L
1570: 61 79 65 72 0a 09 20 20 20 20 50 72 6f 74 6f 63 ayer.. Protoc
1580: 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 ol Negotiation (
1590: 41 4c 50 4e 29 2e 20 46 6f 72 20 65 78 61 6d 70 ALPN). For examp
15a0: 6c 65 3a 20 3c 65 6d 3e 68 32 3c 2f 65 6d 3e 20 le: <em>h2</em>
15b0: 61 6e 64 0a 09 20 20 20 20 3c 65 6d 3e 68 74 74 and.. <em>htt
15c0: 70 2f 31 2e 31 3c 2f 65 6d 3e 2c 20 62 75 74 20 p/1.1</em>, but
15d0: 6e 6f 74 20 3c 65 6d 3e 68 33 3c 2f 65 6d 3e 20 not <em>h3</em>
15e0: 6f 72 20 3c 65 6d 3e 71 75 69 63 3c 2f 65 6d 3e or <em>quic</em>
15f0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
1600: 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74 72 6f ong>-cadir</stro
1610: 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 6d 3e ng> <em>dir</em>
1620: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 20 74 </dt>..<dd>Set t
1630: 68 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74 he CA certificat
1640: 65 73 20 70 61 74 68 2e 20 54 68 65 20 64 65 66 es path. The def
1650: 61 75 6c 74 20 64 69 72 65 63 74 6f 72 79 20 69 ault directory i
1660: 73 20 70 6c 61 74 66 6f 72 6d 0a 09 20 20 20 20 s platform..
1670: 73 70 65 63 69 66 69 63 20 61 6e 64 20 63 61 6e specific and can
1680: 20 62 65 20 73 65 74 20 61 74 20 63 6f 6d 70 69 be set at compi
1690: 6c 65 20 74 69 6d 65 2e 20 54 68 69 73 20 63 61 le time. This ca
16a0: 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 0a n be overridden.
16b0: 09 20 20 20 20 76 69 61 20 74 68 65 20 3c 62 3e . via the <b>
16c0: 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e SSL_CERT_DIR</b>
16d0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 environment var
16e0: 69 61 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 iable.</dd>..<dt
16f0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69 6c 65 ><strong>-cafile
1700: 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 </strong><em>fi
1710: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e lename</em></dt>
1720: 0a 09 3c 64 64 3e 53 65 74 20 74 68 65 20 63 65 ..<dd>Set the ce
1730: 72 74 69 66 69 63 61 74 65 20 61 75 74 68 6f 72 rtificate author
1740: 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69 ity (CA) certifi
1750: 63 61 74 65 73 20 66 69 6c 65 2e 20 54 68 65 20 cates file. The
1760: 64 65 66 61 75 6c 74 0a 09 20 20 20 20 69 73 20 default.. is
1770: 74 68 65 20 63 65 72 74 2e 70 65 6d 20 66 69 6c the cert.pem fil
1780: 65 20 69 6e 20 74 68 65 20 4f 70 73 6e 53 53 4c e in the OpsnSSL
1790: 20 64 69 72 65 63 74 6f 72 79 2e 20 54 68 69 73 directory. This
17a0: 20 63 61 6e 20 61 6c 73 6f 20 62 65 0a 09 20 20 can also be..
17b0: 20 20 6f 76 65 72 72 69 64 64 65 6e 20 76 69 61 overridden via
17c0: 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 54 the <b>SSL_CERT
17d0: 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f _FILE</b> enviro
17e0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c nment variable.<
17f0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1800: 67 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 73 74 72 g>-certfile</str
1810: 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d ong> <em>filenam
1820: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 e</em></dt>..<dd
1830: 3e 53 70 65 63 69 66 79 20 74 68 65 20 66 69 6c >Specify the fil
1840: 65 6e 61 6d 65 20 77 69 74 68 20 74 68 65 20 63 ename with the c
1850: 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 ertificate to us
1860: 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 e.</dd>..<dt><st
1870: 72 6f 6e 67 3e 2d 63 65 72 74 3c 2f 73 74 72 6f rong>-cert</stro
1880: 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 ng> <em>filename
1890: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
18a0: 53 70 65 63 69 66 79 20 74 68 65 20 63 6f 6e 74 Specify the cont
18b0: 65 6e 74 73 20 6f 66 20 61 20 63 65 72 74 69 66 ents of a certif
18c0: 69 63 61 74 65 20 74 6f 20 75 73 65 2c 20 61 73 icate to use, as
18d0: 20 61 20 44 45 52 0a 09 20 20 20 20 65 6e 63 6f a DER.. enco
18e0: 64 65 64 20 62 69 6e 61 72 79 20 76 61 6c 75 65 ded binary value
18f0: 20 28 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f 64 (X.509 DER).</d
1900: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
1910: 2d 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e -cipher</strong>
1920: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e <em>string</em>
1930: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 </dt>..<dd>List
1940: 6f 66 20 63 69 70 68 65 72 73 20 74 6f 20 75 73 of ciphers to us
1950: 65 2e 20 53 74 72 69 6e 67 20 69 73 20 61 20 63 e. String is a c
1960: 6f 6c 6f 6e 20 28 22 3a 22 29 20 73 65 70 61 72 olon (":") separ
1970: 61 74 65 64 20 6c 69 73 74 0a 09 20 20 20 20 6f ated list.. o
1980: 66 20 63 69 70 68 65 72 73 20 6f 72 20 63 69 70 f ciphers or cip
1990: 68 65 72 20 73 75 69 74 65 73 2e 20 43 69 70 68 her suites. Ciph
19a0: 65 72 20 73 75 69 74 65 73 20 63 61 6e 20 62 65 er suites can be
19b0: 20 63 6f 6d 62 69 6e 65 64 0a 09 20 20 20 20 75 combined.. u
19c0: 73 69 6e 67 20 74 68 65 20 3c 62 3e 2b 3c 2f 62 sing the <b>+</b
19d0: 3e 20 63 68 61 72 61 63 74 65 72 2e 20 50 72 65 > character. Pre
19e0: 66 69 78 65 73 20 63 61 6e 20 62 65 20 75 73 65 fixes can be use
19f0: 64 20 74 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79 d to permanently
1a00: 0a 09 20 20 20 20 72 65 6d 6f 76 65 20 28 22 21 .. remove ("!
1a10: 22 29 2c 20 64 65 6c 65 74 65 20 28 22 2d 22 29 "), delete ("-")
1a20: 2c 20 6f 72 20 6d 6f 76 65 20 61 20 63 79 70 68 , or move a cyph
1a30: 65 72 20 74 6f 20 74 68 65 20 65 6e 64 20 6f 66 er to the end of
1a40: 0a 09 20 20 20 20 74 68 65 20 6c 69 73 74 20 28 .. the list (
1a50: 22 2b 22 29 2e 20 4b 65 79 77 6f 72 64 73 20 3c "+"). Keywords <
1a60: 62 3e 40 53 54 52 45 4e 47 54 48 3c 2f 62 3e 20 b>@STRENGTH</b>
1a70: 28 73 6f 72 74 20 62 79 20 61 6c 67 6f 72 69 74 (sort by algorit
1a80: 68 6d 0a 09 20 20 20 20 6b 65 79 20 6c 65 6e 67 hm.. key leng
1a90: 74 68 29 2c 20 3c 62 3e 40 53 45 43 4c 45 56 45 th), <b>@SECLEVE
1aa0: 4c 3d 3c 2f 62 3e 3c 69 3e 6e 3c 2f 69 3e 20 28 L=</b><i>n</i> (
1ab0: 73 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 76 set security lev
1ac0: 65 6c 20 74 6f 0a 09 20 20 20 20 6e 29 2c 20 61 el to.. n), a
1ad0: 6e 64 20 3c 62 3e 44 45 46 41 55 4c 54 3c 2f 62 nd <b>DEFAULT</b
1ae0: 3e 20 28 75 73 65 20 64 65 66 61 75 6c 74 20 63 > (use default c
1af0: 69 70 68 65 72 20 6c 69 73 74 2c 20 61 74 20 73 ipher list, at s
1b00: 74 61 72 74 20 6f 6e 6c 79 29 0a 09 20 20 20 20 tart only)..
1b10: 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 70 65 63 can also be spec
1b20: 69 66 69 65 64 2e 20 53 65 65 20 4f 70 65 6e 53 ified. See OpenS
1b30: 53 4c 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e SL documentation
1b40: 20 66 6f 72 20 74 68 65 20 66 75 6c 6c 0a 09 20 for the full..
1b50: 20 20 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 list of valid
1b60: 20 76 61 6c 75 65 73 2e 20 28 54 4c 53 20 31 2e values. (TLS 1.
1b70: 32 20 61 6e 64 20 65 61 72 6c 69 65 72 20 6f 6e 2 and earlier on
1b80: 6c 79 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 ly)</dd>..<dt><s
1b90: 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 73 75 69 trong>-ciphersui
1ba0: 74 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d tes</strong> <em
1bb0: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 >string</em></dt
1bc0: 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 >..<dd>List of c
1bd0: 69 70 68 65 72 20 73 75 69 74 65 73 20 74 6f 20 ipher suites to
1be0: 75 73 65 2e 20 53 74 72 69 6e 67 20 69 73 20 61 use. String is a
1bf0: 20 63 6f 6c 6f 6e 20 28 22 3a 22 29 0a 09 20 20 colon (":")..
1c00: 20 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 separated list
1c10: 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 of cipher suite
1c20: 20 6e 61 6d 65 73 2e 20 28 54 4c 53 20 31 2e 33 names. (TLS 1.3
1c30: 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a 09 3c 64 74 only)</dd>..<dt
1c40: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e ><strong>-comman
1c50: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 d</strong> <em>c
1c60: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 allback</em></dt
1c70: 3e 0a 09 3c 64 64 3e 43 61 6c 6c 62 61 63 6b 20 >..<dd>Callback
1c80: 74 6f 20 69 6e 76 6f 6b 65 20 61 74 20 73 65 76 to invoke at sev
1c90: 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69 eral points duri
1ca0: 6e 67 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 ng the handshake
1cb0: 2e 0a 09 20 20 20 20 54 68 69 73 20 69 73 20 75 ... This is u
1cc0: 73 65 64 20 74 6f 20 70 61 73 73 20 65 72 72 6f sed to pass erro
1cd0: 72 73 20 61 6e 64 20 74 72 61 63 69 6e 67 20 69 rs and tracing i
1ce0: 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 0a nformation, and.
1cf0: 09 20 20 20 20 69 74 20 63 61 6e 20 61 6c 6c 6f . it can allo
1d00: 77 20 54 63 6c 20 73 63 72 69 70 74 73 20 74 6f w Tcl scripts to
1d10: 20 70 65 72 66 6f 72 6d 20 74 68 65 69 72 20 6f perform their o
1d20: 77 6e 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 wn certificate..
1d30: 20 20 20 20 76 61 6c 69 64 61 74 69 6f 6e 20 69 validation i
1d40: 6e 20 70 6c 61 63 65 20 6f 66 20 74 68 65 20 64 n place of the d
1d50: 65 66 61 75 6c 74 20 76 61 6c 69 64 61 74 69 6f efault validatio
1d60: 6e 20 70 72 6f 76 69 64 65 64 20 62 79 0a 09 20 n provided by..
1d70: 20 20 20 4f 70 65 6e 53 53 4c 2e 20 53 65 65 20 OpenSSL. See
1d80: 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 <a href="#CALLBA
1d90: 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c CK OPTIONS">CALL
1da0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e BACK OPTIONS</a>
1db0: 0a 09 20 20 20 20 66 6f 72 20 66 75 72 74 68 65 .. for furthe
1dc0: 72 20 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 r discussion.</d
1dd0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
1de0: 2d 64 68 70 61 72 61 6d 73 20 3c 2f 73 74 72 6f -dhparams </stro
1df0: 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c ng><em>filename<
1e00: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 /em></dt>..<dd>S
1e10: 70 65 63 69 66 79 20 74 68 65 20 44 69 66 66 69 pecify the Diffi
1e20: 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 6d 65 e-Hellman parame
1e30: 74 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a ters file.</dd>.
1e40: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 .<dt><strong>-ke
1e50: 79 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c yfile</strong> <
1e60: 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e em>filename</em>
1e70: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 </dt>..<dd>Speci
1e80: 66 79 20 74 68 65 20 70 72 69 76 61 74 65 20 6b fy the private k
1e90: 65 79 20 66 69 6c 65 2e 20 28 64 65 66 61 75 6c ey file. (defaul
1ea0: 74 20 69 73 0a 09 20 20 20 20 76 61 6c 75 65 20 t is.. value
1eb0: 6f 66 20 2d 63 65 72 74 66 69 6c 65 29 3c 2f 64 of -certfile)</d
1ec0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
1ed0: 2d 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 -key</strong> <e
1ee0: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c m>filename</em><
1ef0: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 /dt>..<dd>Specif
1f00: 79 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 y the private ke
1f10: 79 20 74 6f 20 75 73 65 20 61 73 20 61 20 44 45 y to use as a DE
1f20: 52 20 65 6e 63 6f 64 65 64 20 76 61 6c 75 65 20 R encoded value
1f30: 28 50 4b 43 53 23 31 20 44 45 52 29 3c 2f 64 64 (PKCS#1 DER)</dd
1f40: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1f50: 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c model</strong> <
1f60: 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c em>channel</em><
1f70: 2f 64 74 3e 0a 09 3c 64 64 3e 46 6f 72 63 65 20 /dt>..<dd>Force
1f80: 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 this channel to
1f90: 73 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 3c share the same <
1fa0: 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c 5f 43 em><strong>SSL_C
1fb0: 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65 6d 3e TX</strong></em>
1fc0: 0a 09 20 20 20 20 73 74 72 75 63 74 75 72 65 20 .. structure
1fd0: 61 73 20 74 68 65 20 73 70 65 63 69 66 69 65 64 as the specified
1fe0: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d <em>channel</em
1ff0: 3e 2c 20 61 6e 64 0a 09 20 20 20 20 74 68 65 72 >, and.. ther
2000: 65 66 6f 72 65 20 73 68 61 72 65 20 63 61 6c 6c efore share call
2010: 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 3e 0a backs etc.</dd>.
2020: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 .<dt><strong>-pa
2030: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 ssword</strong>
2040: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d <em>callback</em
2050: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6c 6c ></dt>..<dd>Call
2060: 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 77 back to invoke w
2070: 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64 hen OpenSSL need
2080: 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61 s to obtain a pa
2090: 73 73 77 6f 72 64 2c 0a 09 20 20 20 20 74 79 70 ssword,.. typ
20a0: 69 63 61 6c 6c 79 20 74 6f 20 75 6e 6c 6f 63 6b ically to unlock
20b0: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79 the private key
20c0: 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61 74 of a certificat
20d0: 65 2e 20 54 68 65 0a 09 20 20 20 20 63 61 6c 6c e. The.. call
20e0: 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 back should retu
20f0: 72 6e 20 61 20 73 74 72 69 6e 67 20 77 68 69 63 rn a string whic
2100: 68 20 72 65 70 72 65 73 65 6e 74 73 20 74 68 65 h represents the
2110: 20 70 61 73 73 77 6f 72 64 0a 09 20 20 20 20 74 password.. t
2120: 6f 20 62 65 20 75 73 65 64 2e 20 53 65 65 20 3c o be used. See <
2130: 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 a href="#CALLBAC
2140: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 K OPTIONS">CALLB
2150: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a ACK OPTIONS</a>.
2160: 09 20 20 20 20 66 6f 72 20 66 75 72 74 68 65 72 . for further
2170: 20 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 discussion.</dd
2180: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
2190: 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c 2f post_handshake</
21a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c strong> <em>bool
21b0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
21c0: 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 61 6e 64 73 Allow post-hands
21d0: 68 61 6b 65 20 74 69 63 6b 65 74 20 75 70 64 61 hake ticket upda
21e0: 74 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c tes.</dd>..<dt><
21f0: 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 20 strong>-request
2200: 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f </strong><em>boo
2210: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 l</em></dt>..<dd
2220: 3e 52 65 71 75 65 73 74 20 61 20 63 65 72 74 69 >Request a certi
2230: 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65 72 ficate from peer
2240: 20 64 75 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 during SSL hand
2250: 73 68 61 6b 65 2e 0a 09 20 20 20 20 28 64 65 66 shake... (def
2260: 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 ault is <em>true
2270: 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 </em>)</dd>..<dt
2280: 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 69 72 ><strong>-requir
2290: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 e</strong> <em>b
22a0: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ool</em></dt>..<
22b0: 64 64 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c dd>Require a val
22c0: 69 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66 id certificate f
22d0: 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67 20 rom peer during
22e0: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 SSL handshake...
22f0: 20 20 20 20 49 66 20 74 68 69 73 20 69 73 20 73 If this is s
2300: 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e et to true, then
2310: 20 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 <strong>-reques
2320: 74 3c 2f 73 74 72 6f 6e 67 3e 20 6d 75 73 74 0a t</strong> must.
2330: 09 20 20 20 20 61 6c 73 6f 20 62 65 20 73 65 74 . also be set
2340: 20 74 6f 20 74 72 75 65 2e 20 28 64 65 66 61 75 to true. (defau
2350: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c lt is <em>false<
2360: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e /em>)</dd>..<dt>
2370: 3c 73 74 72 6f 6e 67 3e 2d 73 65 63 75 72 69 74 <strong>-securit
2380: 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 ylevel</strong>
2390: 3c 65 6d 3e 69 6e 74 65 67 65 72 3c 2f 65 6d 3e <em>integer</em>
23a0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 20 73 </dt>..<dd>Set s
23b0: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 2e 20 4d ecurity level. M
23c0: 75 73 74 20 62 65 20 30 20 74 6f 20 35 2e 20 54 ust be 0 to 5. T
23d0: 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 he security leve
23e0: 6c 20 61 66 66 65 63 74 73 0a 09 20 20 20 20 63 l affects.. c
23f0: 69 70 68 65 72 20 73 75 69 74 65 20 65 6e 63 72 ipher suite encr
2400: 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d yption algorithm
2410: 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 43 43 s, supported ECC
2420: 20 63 75 72 76 65 73 2c 0a 09 20 20 20 20 73 75 curves,.. su
2430: 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74 75 72 pported signatur
2440: 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 44 48 e algorithms, DH
2450: 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a 65 73 parameter sizes
2460: 2c 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 , certificate..
2470: 20 20 20 6b 65 79 20 73 69 7a 65 73 20 61 6e 64 key sizes and
2480: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 signature algor
2490: 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66 61 75 ithms. The defau
24a0: 6c 74 20 69 73 20 31 2e 0a 09 20 20 20 20 4c 65 lt is 1... Le
24b0: 76 65 6c 20 33 20 61 6e 64 20 68 69 67 68 65 72 vel 3 and higher
24c0: 20 64 69 73 61 62 6c 65 20 73 75 70 70 6f 72 74 disable support
24d0: 20 66 6f 72 20 73 65 73 73 69 6f 6e 20 74 69 63 for session tic
24e0: 6b 65 74 73 20 61 6e 64 20 6f 6e 6c 79 0a 09 20 kets and only..
24f0: 20 20 20 61 63 63 65 70 74 20 63 69 70 68 65 72 accept cipher
2500: 20 73 75 69 74 65 73 20 74 68 61 74 20 70 72 6f suites that pro
2510: 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 63 vide forward sec
2520: 72 65 63 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e recy.</dd>..<dt>
2530: 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 65 72 3c <strong>-server<
2540: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
2550: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 l</em></dt>..<dd
2560: 3e 48 61 6e 64 73 68 61 6b 65 20 61 73 20 73 65 >Handshake as se
2570: 72 76 65 72 20 69 66 20 74 72 75 65 2c 20 65 6c rver if true, el
2580: 73 65 20 68 61 6e 64 73 68 61 6b 65 20 61 73 0a se handshake as.
2590: 09 20 20 20 20 63 6c 69 65 6e 74 2e 20 28 64 65 . client. (de
25a0: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c fault is <em>fal
25b0: 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c se</em>)</dd>..<
25c0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 dt><strong>-serv
25d0: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 ername</strong>
25e0: 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c 2f 64 <em>host</em></d
25f0: 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 20 t>..<dd>Specify
2600: 73 65 72 76 65 72 20 68 6f 73 74 6e 61 6d 65 2e server hostname.
2610: 20 4f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 Only available
2620: 69 66 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c if the OpenSSL l
2630: 69 62 72 61 72 79 0a 09 20 20 20 20 74 68 65 20 ibrary.. the
2640: 70 61 63 6b 61 67 65 20 69 73 20 6c 69 6e 6b 65 package is linke
2650: 64 20 61 67 61 69 6e 73 74 20 73 75 70 70 6f 72 d against suppor
2660: 74 73 20 74 68 65 20 54 4c 53 20 68 6f 73 74 6e ts the TLS hostn
2670: 61 6d 65 20 65 78 74 65 6e 73 69 6f 6e 0a 09 20 ame extension..
2680: 20 20 20 66 6f 72 20 27 53 65 72 76 65 72 20 4e for 'Server N
2690: 61 6d 65 20 49 6e 64 69 63 61 74 69 6f 6e 27 20 ame Indication'
26a0: 28 53 4e 49 29 2e 20 55 73 65 20 74 6f 20 6e 61 (SNI). Use to na
26b0: 6d 65 20 74 68 65 20 6c 6f 67 69 63 61 6c 20 68 me the logical h
26c0: 6f 73 74 0a 09 20 20 20 20 77 65 20 61 72 65 20 ost.. we are
26d0: 74 61 6c 6b 69 6e 67 20 74 6f 20 61 6e 64 20 65 talking to and e
26e0: 78 70 65 63 74 69 6e 67 20 61 20 63 65 72 74 69 xpecting a certi
26f0: 66 69 63 61 74 65 20 66 6f 72 2e 3c 2f 64 64 3e ficate for.</dd>
2700: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 ..<dt><strong>-s
2710: 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f 6e ession_id</stron
2720: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
2730: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 73 m></dt>..<dd>Ses
2740: 73 69 6f 6e 20 69 64 20 74 6f 20 72 65 73 75 6d sion id to resum
2750: 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a e session.</dd>.
2760: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73 .<dt><strong>-ss
2770: 6c 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e l2</strong> <em>
2780: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 bool</em></dt>..
2790: 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f <dd>Enable use o
27a0: 66 20 53 53 4c 20 76 32 2e 20 28 64 65 66 61 75 f SSL v2. (defau
27b0: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c lt is <em>false<
27c0: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e /em>)</dd>..<dt>
27d0: 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c 33 20 3c 2f <strong>-ssl3 </
27e0: 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c strong><em>bool<
27f0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 /em></dt>..<dd>E
2800: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c nable use of SSL
2810: 20 76 33 2e 20 28 64 65 66 61 75 6c 74 20 69 73 v3. (default is
2820: 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 <em>false</em>)
2830: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 </dd>..<dt>-<str
2840: 6f 6e 67 3e 74 6c 73 31 3c 2f 73 74 72 6f 6e 67 ong>tls1</strong
2850: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c > <em>bool</em><
2860: 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 /dt>..<dd>Enable
2870: 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 20 use of TLS v1.
2880: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e (default is <em>
2890: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a true</em>)</dd>.
28a0: 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c .<dt>-<strong>tl
28b0: 73 31 2e 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 s1.1</strong> <e
28c0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e m>bool</em></dt>
28d0: 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 ..<dd>Enable use
28e0: 20 6f 66 20 54 4c 53 20 76 31 2e 31 20 28 64 65 of TLS v1.1 (de
28f0: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 fault is <em>tru
2900: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 e</em>)</dd>..<d
2910: 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e t>-<strong>tls1.
2920: 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 2</strong> <em>b
2930: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ool</em></dt>..<
2940: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 dd>Enable use of
2950: 20 54 4c 53 20 76 31 2e 32 20 28 64 65 66 61 75 TLS v1.2 (defau
2960: 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f lt is <em>true</
2970: 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d em>)</dd>..<dt>-
2980: 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 33 3c 2f <strong>tls1.3</
2990: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c strong> <em>bool
29a0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
29b0: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c Enable use of TL
29c0: 53 20 76 31 2e 33 20 28 64 65 66 61 75 6c 74 20 S v1.3 (default
29d0: 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e is <em>true</em>
29e0: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 )</dd>..<dt><str
29f0: 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d ong>-validatecom
2a00: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 mand</strong> <e
2a10: 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c m>callback</em><
2a20: 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6c 6c 62 61 /dt>..<dd>Callba
2a30: 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 ck to invoke to
2a40: 76 65 72 69 66 79 20 6f 72 20 76 61 6c 69 64 61 verify or valida
2a50: 74 65 20 70 72 6f 74 6f 63 6f 6c 20 63 6f 6e 66 te protocol conf
2a60: 69 67 0a 09 20 20 20 20 70 61 72 61 6d 65 74 65 ig.. paramete
2a70: 72 73 20 64 75 72 69 6e 67 20 74 68 65 20 70 72 rs during the pr
2a80: 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 74 69 otocol negotiati
2a90: 6f 6e 20 70 68 61 73 65 2e 20 53 65 65 0a 09 20 on phase. See..
2aa0: 20 20 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c <a href="#CAL
2ab0: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 LBACK OPTIONS">C
2ac0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c ALLBACK OPTIONS<
2ad0: 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 72 /a>.. for fur
2ae0: 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e ther discussion.
2af0: 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a </dd>. </dl>.
2b00: 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 </blockquote>..
2b10: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 <dt><a name="
2b20: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c tls::unimport"><
2b30: 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 b>tls::unimport
2b40: 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f </b><i>channel</
2b50: 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 i></a></dt>.
2b60: 3c 64 64 3e 50 72 6f 76 69 64 65 64 20 66 6f 72 <dd>Provided for
2b70: 20 73 79 6d 6d 65 74 72 79 20 74 6f 20 3c 73 74 symmetry to <st
2b80: 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 rong>tls::import
2b90: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 74 68 69 73 0a </strong>, this.
2ba0: 20 20 20 20 20 20 75 6e 73 74 61 63 6b 73 20 74 unstacks t
2bb0: 68 65 20 53 53 4c 2d 65 6e 61 62 6c 69 6e 67 20 he SSL-enabling
2bc0: 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 63 6c of a regular Tcl
2bd0: 20 63 68 61 6e 6e 65 6c 2e 20 20 41 6e 20 65 72 channel. An er
2be0: 72 6f 72 0a 20 20 20 20 20 20 69 73 20 74 68 72 ror. is thr
2bf0: 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f own if TLS is no
2c00: 74 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65 t the top stacke
2c10: 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c d channel type.<
2c20: 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 /dd>. <dt>&nb
2c30: 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 sp;</dt>. <dt
2c40: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 ><a name="tls::h
2c50: 61 6e 64 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e andshake"><stron
2c60: 67 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 g>tls::handshake
2c70: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 </strong> <em>ch
2c80: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f annel</em></a></
2c90: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63 dt>. <dd>Forc
2ca0: 65 73 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 es handshake to
2cb0: 74 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 20 take place, and
2cc0: 72 65 74 75 72 6e 73 20 30 20 69 66 0a 09 68 61 returns 0 if..ha
2cd0: 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c 6c ndshake is still
2ce0: 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e 6f in progress (no
2cf0: 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 n-blocking), or
2d00: 31 20 69 66 0a 09 74 68 65 20 68 61 6e 64 73 68 1 if..the handsh
2d10: 61 6b 65 20 77 61 73 20 73 75 63 63 65 73 73 66 ake was successf
2d20: 75 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 ul. If the hands
2d30: 68 61 6b 65 20 66 61 69 6c 65 64 0a 09 74 68 69 hake failed..thi
2d40: 73 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 74 s routine will t
2d50: 68 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e 3c 2f hrow an error.</
2d60: 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 dd>. <dt>&nbs
2d70: 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e p;</dt>. <dt>
2d80: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 74 <a name="tls::st
2d90: 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c atus"><strong>tl
2da0: 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e s::status</stron
2db0: 67 3e 0a 20 20 20 20 3c 65 6d 3e 3f 2d 6c 6f 63 g>. <em>?-loc
2dc0: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e al? channel</em>
2dd0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
2de0: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 d>Returns the cu
2df0: 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f 66 20 rrent status of
2e00: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
2e10: 66 6f 72 20 61 6e 20 53 53 4c 0a 09 63 68 61 6e for an SSL..chan
2e20: 6e 65 6c 2e 20 54 68 65 20 72 65 73 75 6c 74 20 nel. The result
2e30: 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79 is a list of key
2e40: 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73 -value pairs des
2e50: 63 72 69 62 69 6e 67 0a 09 74 68 65 20 63 65 72 cribing..the cer
2e60: 74 69 66 69 63 61 74 65 2e 20 49 66 20 74 68 65 tificate. If the
2e70: 20 72 65 73 75 6c 74 20 69 73 20 61 6e 20 65 6d result is an em
2e80: 70 74 79 20 6c 69 73 74 20 74 68 65 6e 20 74 68 pty list then th
2e90: 65 0a 09 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 e..SSL handshake
2ea0: 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d has not yet com
2eb0: 70 6c 65 74 65 64 2e 20 49 66 20 3c 65 6d 3e 2d pleted. If <em>-
2ec0: 6c 6f 63 61 6c 3c 2f 65 6d 3e 20 69 73 0a 09 73 local</em> is..s
2ed0: 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20 74 pecified, then t
2ee0: 68 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66 69 he local certifi
2ef0: 63 61 74 65 20 69 73 20 75 73 65 64 2e 3c 2f 64 cate is used.</d
2f00: 64 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a d>.<blockquote>.
2f10: 09 3c 62 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f .<b>SSL Status</
2f20: 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 b>. <dl>..<dt
2f30: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 ><strong>alpn</s
2f40: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f trong> <em>proto
2f50: 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c col</em></dt>..<
2f60: 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 dd>The protocol
2f70: 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 selected after A
2f80: 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 pplication-Layer
2f90: 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 4e Protocol.. N
2fa0: 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e egotiation (ALPN
2fb0: 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 ).</dd>..<dt><st
2fc0: 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 rong>cipher</str
2fd0: 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c ong> <em>cipher<
2fe0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
2ff0: 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 65 he current ciphe
3000: 72 20 69 6e 20 75 73 65 20 62 65 74 77 65 65 6e r in use between
3010: 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e 64 0a the client and.
3020: 09 20 20 20 20 73 65 72 76 65 72 20 63 68 61 6e . server chan
3030: 6e 65 6c 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e nels.</dd>..<dt>
3040: 3c 73 74 72 6f 6e 67 3e 70 65 65 72 6e 61 6d 65 <strong>peername
3050: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 </strong> <em>na
3060: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 me</em></dt>..<d
3070: 64 3e 54 68 65 20 70 65 65 72 6e 61 6d 65 20 66 d>The peername f
3080: 72 6f 6d 20 74 68 65 20 63 65 72 74 69 66 69 63 rom the certific
3090: 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ate.</dd>..<dt><
30a0: 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c strong>protocol<
30b0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 /strong> <em>ver
30c0: 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 sion</em></dt>..
30d0: 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c <dd>The protocol
30e0: 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f version used fo
30f0: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e r the connection
3100: 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c :.. SSL2, SSL
3110: 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 3, TLS1, TLS1.1,
3120: 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c TLS1.2, TLS1.3,
3130: 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 or unknown.</dd
3140: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
3150: 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 bits</strong> <e
3160: 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c m>n</em></dt>..<
3170: 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 dd>The number of
3180: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 74 bits used for t
3190: 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 2e 3c he session key.<
31a0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
31b0: 67 3e 73 69 67 6e 61 74 75 72 65 48 61 73 68 41 g>signatureHashA
31c0: 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 lgorithm</strong
31d0: 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c > <em>algorithm<
31e0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
31f0: 68 65 20 73 69 67 6e 61 74 75 72 65 20 68 61 73 he signature has
3200: 68 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64 64 h algorithm.</dd
3210: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
3220: 69 67 6e 61 74 75 72 65 54 79 70 65 3c 2f 73 74 ignatureType</st
3230: 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79 70 65 3c 2f rong> <em>type</
3240: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
3250: 65 20 73 69 67 6e 61 74 75 72 65 20 74 79 70 65 e signature type
3260: 20 76 61 6c 75 65 2e 3c 2f 64 64 3e 0a 09 3c 64 value.</dd>..<d
3270: 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 t><strong>verify
3280: 44 65 70 74 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c Depth</strong> <
3290: 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 em>n</em></dt>..
32a0: 3c 64 64 3e 4d 61 78 69 6d 75 6d 20 64 65 70 74 <dd>Maximum dept
32b0: 68 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 h for the certif
32c0: 69 63 61 74 65 20 63 68 61 69 6e 20 76 65 72 69 icate chain veri
32d0: 66 69 63 61 74 69 6f 6e 2e 0a 09 20 20 20 20 44 fication... D
32e0: 65 66 61 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f efault is -1, to
32f0: 20 63 68 65 63 6b 20 61 6c 6c 2e 3c 2f 64 64 3e check all.</dd>
3300: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 ..<dt><strong>ve
3310: 72 69 66 79 4d 6f 64 65 3c 2f 73 74 72 6f 6e 67 rifyMode</strong
3320: 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c > <em>list</em><
3330: 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f /dt>..<dd>List o
3340: 66 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 f certificate ve
3350: 72 69 66 69 63 61 74 69 6f 6e 20 6d 6f 64 65 73 rification modes
3360: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
3370: 6f 6e 67 3e 76 65 72 69 66 79 52 65 73 75 6c 74 ong>verifyResult
3380: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 72 65 </strong> <em>re
3390: 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 sult</em></dt>..
33a0: 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 <dd>Certificate
33b0: 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 verification res
33c0: 75 6c 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ult.</dd>..<dt><
33d0: 73 74 72 6f 6e 67 3e 63 61 5f 6e 61 6d 65 73 3c strong>ca_names<
33e0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 /strong> <em>lis
33f0: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 t</em></dt>..<dd
3400: 3e 4c 69 73 74 20 6f 66 20 74 68 65 20 43 65 72 >List of the Cer
3410: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69 tificate Authori
3420: 74 69 65 73 20 75 73 65 64 20 74 6f 20 63 72 65 ties used to cre
3430: 61 74 65 20 74 68 65 20 63 65 72 74 69 66 69 63 ate the certific
3440: 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f ate.</dd>. </
3450: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 dl>.</blockquote
3460: 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 >.<blockquote>..
3470: 3c 62 3e 43 65 72 74 69 66 69 63 61 74 65 20 53 <b>Certificate S
3480: 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 tatus</b>. <d
3490: 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e l>..<dt><strong>
34a0: 61 6c 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d all</strong> <em
34b0: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 >string</em></dt
34c0: 3e 0a 09 3c 64 64 3e 44 75 6d 70 20 6f 66 20 61 >..<dd>Dump of a
34d0: 6c 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 ll certificate i
34e0: 6e 66 6f 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e nfo.</dd>...<dt>
34f0: 3c 73 74 72 6f 6e 67 3e 76 65 72 73 69 6f 6e 3c <strong>version<
3500: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 61 6c /strong> <em>val
3510: 75 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ue</em></dt>..<d
3520: 64 3e 54 68 65 20 63 65 72 74 69 66 69 63 61 74 d>The certificat
3530: 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 64 64 3e 0a e version.</dd>.
3540: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 .<dt><strong>ser
3550: 69 61 6c 4e 75 6d 62 65 72 3c 2f 73 74 72 6f 6e ialNumber</stron
3560: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 g> <em>n</em></d
3570: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 65 72 69 t>..<dd>The seri
3580: 61 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 al number of the
3590: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 certificate as
35a0: 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e hex string.</dd>
35b0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 ..<dt><strong>si
35c0: 67 6e 61 74 75 72 65 3c 2f 73 74 72 6f 6e 67 3e gnature</strong>
35d0: 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f <em>algorithm</
35e0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 em></dt>..<dd>Ci
35f0: 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 pher algorithm u
3600: 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 sed for certific
3610: 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f ate signature.</
3620: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3630: 3e 69 73 73 75 65 72 3c 2f 73 74 72 6f 6e 67 3e >issuer</strong>
3640: 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 <em>dn</em></dt
3650: 3e 0a 09 3c 64 64 3e 54 68 65 20 64 69 73 74 69 >..<dd>The disti
3660: 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44 nguished name (D
3670: 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 N) of the certif
3680: 69 63 61 74 65 20 69 73 73 75 65 72 2e 3c 2f 64 icate issuer.</d
3690: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
36a0: 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72 6f 6e notBefore</stron
36b0: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e g> <em>date</em>
36c0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 62 </dt>..<dd>The b
36d0: 65 67 69 6e 20 64 61 74 65 20 66 6f 72 20 74 68 egin date for th
36e0: 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 e validity of th
36f0: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f e certificate.</
3700: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3710: 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72 6f 6e >notAfter</stron
3720: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e g> <em>date</em>
3730: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 65 </dt>..<dd>The e
3740: 78 70 69 72 61 74 69 6f 6e 20 64 61 74 65 20 66 xpiration date f
3750: 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61 or the certifica
3760: 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 te.</dd>..<dt><s
3770: 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 3c 2f 73 trong>subject</s
3780: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 trong> <em>dn</e
3790: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
37a0: 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e distinguished n
37b0: 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 ame (DN) of the
37c0: 63 65 72 74 69 66 69 63 61 74 65 20 73 75 62 6a certificate subj
37d0: 65 63 74 2e 0a 09 20 20 20 20 46 69 65 6c 64 73 ect... Fields
37e0: 20 69 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d 6f 6e include: Common
37f0: 20 4e 61 6d 65 20 28 43 4e 29 2c 20 4f 72 67 61 Name (CN), Orga
3800: 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c 20 4c 6f nization (O), Lo
3810: 63 61 6c 69 74 79 0a 09 20 20 20 20 6f 72 20 43 cality.. or C
3820: 69 74 79 20 28 4c 29 2c 20 53 74 61 74 65 20 6f ity (L), State o
3830: 72 20 50 72 6f 76 69 6e 63 65 20 28 53 29 2c 20 r Province (S),
3840: 61 6e 64 20 43 6f 75 6e 74 72 79 20 4e 61 6d 65 and Country Name
3850: 20 28 43 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e (C).</dd>..<dt>
3860: 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 55 6e <strong>issuerUn
3870: 69 71 75 65 49 44 3c 2f 73 74 72 6f 6e 67 3e 20 iqueID</strong>
3880: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c <em>string</em><
3890: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 69 73 /dt>..<dd>The is
38a0: 73 75 65 72 20 75 6e 69 71 75 65 20 69 64 2e 3c suer unique id.<
38b0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
38c0: 67 3e 73 75 62 6a 65 63 74 55 6e 69 71 75 65 49 g>subjectUniqueI
38d0: 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 D</strong> <em>s
38e0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
38f0: 09 3c 64 64 3e 54 68 65 20 73 75 62 6a 65 63 74 .<dd>The subject
3900: 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 64 64 3e unique id.</dd>
3910: 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e ...<dt><strong>n
3920: 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 um_extensions</s
3930: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d trong> <em>n</em
3940: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 6d 62 ></dt>..<dd>Numb
3950: 65 72 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 er of certificat
3960: 65 20 65 78 74 65 6e 73 69 6f 6e 73 2e 3c 2f 64 e extensions.</d
3970: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3980: 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 74 72 6f extensions</stro
3990: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d ng> <em>list</em
39a0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 ></dt>..<dd>List
39b0: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 of certificate
39c0: 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e extension names.
39d0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
39e0: 6e 67 3e 61 75 74 68 6f 72 69 74 79 4b 65 79 49 ng>authorityKeyI
39f0: 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e dentifier</stron
3a00: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
3a10: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 41 4b m></dt>..<dd>(AK
3a20: 49 29 20 4b 65 79 20 69 64 65 6e 74 69 66 69 65 I) Key identifie
3a30: 72 20 6f 66 20 74 68 65 20 49 73 73 75 69 6e 67 r of the Issuing
3a40: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 20 CA certificate
3a50: 74 68 61 74 20 73 69 67 6e 65 64 0a 09 20 20 20 that signed..
3a60: 20 74 68 65 20 53 53 4c 20 63 65 72 74 69 66 69 the SSL certifi
3a70: 63 61 74 65 20 61 73 20 68 65 78 20 73 74 72 69 cate as hex stri
3a80: 6e 67 2e 20 54 68 69 73 20 76 61 6c 75 65 20 6d ng. This value m
3a90: 61 74 63 68 65 73 20 74 68 65 20 53 4b 49 0a 09 atches the SKI..
3aa0: 20 20 20 20 76 61 6c 75 65 20 6f 66 20 74 68 65 value of the
3ab0: 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20 43 41 Intermediate CA
3ac0: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
3ad0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3ae0: 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e 74 69 subjectKeyIdenti
3af0: 66 69 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 fier</strong> <e
3b00: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 m>string</em></d
3b10: 74 3e 0a 09 3c 64 64 3e 28 53 4b 49 29 20 48 61 t>..<dd>(SKI) Ha
3b20: 73 68 20 6f 66 20 74 68 65 20 70 75 62 6c 69 63 sh of the public
3b30: 20 6b 65 79 20 69 6e 73 69 64 65 20 74 68 65 20 key inside the
3b40: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 certificate as h
3b50: 65 78 0a 09 20 20 20 73 74 72 69 6e 67 2e 20 55 ex.. string. U
3b60: 73 65 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20 sed to identify
3b70: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 68 61 certificates tha
3b80: 74 20 63 6f 6e 74 61 69 6e 20 61 20 70 61 72 74 t contain a part
3b90: 69 63 75 6c 61 72 0a 09 20 20 20 70 75 62 6c 69 icular.. publi
3ba0: 63 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 c key.</dd>..<dt
3bb0: 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 ><strong>subject
3bc0: 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e AltName</strong>
3bd0: 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f <em>list</em></
3be0: 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 dt>..<dd>List of
3bf0: 20 61 6c 6c 20 6f 66 20 74 68 65 20 61 6c 74 65 all of the alte
3c00: 72 6e 61 74 69 76 65 20 64 6f 6d 61 69 6e 20 6e rnative domain n
3c10: 61 6d 65 73 2c 20 73 75 62 20 64 6f 6d 61 69 6e ames, sub domain
3c20: 73 2c 0a 09 20 20 20 20 61 6e 64 20 49 50 20 61 s,.. and IP a
3c30: 64 64 72 65 73 73 65 73 20 74 68 61 74 20 61 72 ddresses that ar
3c40: 65 20 73 65 63 75 72 65 64 20 62 79 20 74 68 65 e secured by the
3c50: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 certificate.</d
3c60: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3c70: 6f 63 73 70 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ocsp</strong> <e
3c80: 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e m>list</em></dt>
3c90: 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c ..<dd>List of al
3ca0: 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69 l Online Certifi
3cb0: 63 61 74 65 20 53 74 61 74 75 73 20 50 72 6f 74 cate Status Prot
3cc0: 6f 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73 ocol (OCSP) URLs
3cd0: 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 .</dd>...<dt><st
3ce0: 72 6f 6e 67 3e 63 65 72 74 69 66 69 63 61 74 65 rong>certificate
3cf0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 65 </strong> <em>ce
3d00: 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 rt</em></dt>..<d
3d10: 64 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 d>The PEM encode
3d20: 64 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f d certificate.</
3d30: 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e dd>...<dt><stron
3d40: 67 3e 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72 g>signatureAlgor
3d50: 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ithm</strong> <e
3d60: 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e m>algorithm</em>
3d70: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 70 68 65 </dt>..<dd>Ciphe
3d80: 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64 r algorithm used
3d90: 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65 for certificate
3da0: 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e signature.</dd>
3db0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 ..<dt><strong>si
3dc0: 67 6e 61 74 75 72 65 56 61 6c 75 65 3c 2f 73 74 gnatureValue</st
3dd0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 rong> <em>string
3de0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3df0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e Certificate sign
3e00: 61 74 75 72 65 20 61 73 20 68 65 78 20 73 74 72 ature as hex str
3e10: 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ing.</dd>..<dt><
3e20: 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 strong>signature
3e30: 44 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 Digest</strong>
3e40: 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e <em>version</em>
3e50: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 </dt>..<dd>Certi
3e60: 66 69 63 61 74 65 20 73 69 67 6e 69 6e 67 20 64 ficate signing d
3e70: 69 67 65 73 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 igest.</dd>..<dt
3e80: 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 63 4b ><strong>publicK
3e90: 65 79 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 eyAlgorithm</str
3ea0: 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 ong> <em>algorit
3eb0: 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 hm</em></dt>..<d
3ec0: 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 d>Certificate si
3ed0: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b gnature public k
3ee0: 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64 ey algorithm.</d
3ef0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3f00: 70 75 62 6c 69 63 4b 65 79 3c 2f 73 74 72 6f 6e publicKey</stron
3f10: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
3f20: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 m></dt>..<dd>Cer
3f30: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
3f40: 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 73 re public key as
3f50: 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 hex string.</dd
3f60: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 >..<dt><strong>b
3f70: 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d its</strong> <em
3f80: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 >n</em></dt>..<d
3f90: 64 3e 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73 d>Number of bits
3fa0: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 used for certif
3fb0: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 icate signature
3fc0: 6b 65 79 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 key</dd>..<dt><s
3fd0: 74 72 6f 6e 67 3e 73 65 6c 66 5f 73 69 67 6e 65 trong>self_signe
3fe0: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 d</strong> <em>b
3ff0: 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e oolean</em></dt>
4000: 0a 09 3c 64 64 3e 49 73 20 63 65 72 74 69 66 69 ..<dd>Is certifi
4010: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 73 cate signature s
4020: 65 6c 66 20 73 69 67 6e 65 64 2e 3c 2f 64 64 3e elf signed.</dd>
4030: 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 ...<dt><strong>s
4040: 68 61 31 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67 ha1_hash</strong
4050: 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c > <em>hash</em><
4060: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 48 /dt>..<dd>The SH
4070: 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 63 A1 hash of the c
4080: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 65 ertificate as he
4090: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 x string.</dd>..
40a0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 68 61 32 <dt><strong>sha2
40b0: 35 36 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67 3e 56_hash</strong>
40c0: 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c 2f <em>hash</em></
40d0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 48 41 dt>..<dd>The SHA
40e0: 32 35 36 20 68 61 73 68 20 6f 66 20 74 68 65 20 256 hash of the
40f0: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 certificate as h
4100: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a ex string.</dd>.
4110: 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 </dl>.</bloc
4120: 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 kquote>.. <dt
4130: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63 ><a name="tls::c
4140: 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 73 74 72 6f onnection"><stro
4150: 6e 67 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 ng>tls::connecti
4160: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20 on</strong>.
4170: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e <em>channel</em>
4180: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
4190: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75 d>Returns the cu
41a0: 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e rrent connection
41b0: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53 status of an SS
41c0: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 0a 09 L channel. The..
41d0: 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 result is a list
41e0: 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 of key-value pa
41f0: 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74 irs describing t
4200: 68 65 0a 09 63 6f 6e 6e 65 63 74 65 64 20 70 65 he..connected pe
4210: 65 72 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71 er.</dd>.<blockq
4220: 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c 20 53 74 uote>..<b>SSL St
4230: 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c atus</b>. <dl
4240: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
4250: 74 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 tate</strong> <e
4260: 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 m>state</em></dt
4270: 3e 0a 09 3c 64 64 3e 53 74 61 74 65 20 6f 66 20 >..<dd>State of
4280: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c the connection.<
4290: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
42a0: 67 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 g>servername</st
42b0: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f rong> <em>name</
42c0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
42d0: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f e name of the co
42e0: 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 nnected to serve
42f0: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 r.</dd>..<dt><st
4300: 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 73 rong>protocol</s
4310: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 trong> <em>versi
4320: 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 on</em></dt>..<d
4330: 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 d>The protocol v
4340: 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 ersion used for
4350: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 0a the connection:.
4360: 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c 33 2c . SSL2, SSL3,
4370: 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 TLS1, TLS1.1, T
4380: 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f LS1.2, TLS1.3, o
4390: 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a r unknown.</dd>.
43a0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 65 6e .<dt><strong>ren
43b0: 65 67 6f 74 69 61 74 69 6f 6e 3c 2f 73 74 72 6f egotiation</stro
43c0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c ng> <em>boolean<
43d0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 /em></dt>..<dd>W
43e0: 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20 hether protocol
43f0: 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 73 renegotiation is
4400: 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f supported or no
4410: 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 t.</dd>..<dt><st
4420: 72 6f 6e 67 3e 73 65 63 75 72 69 74 79 6c 65 76 rong>securitylev
4430: 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e el</strong> <em>
4440: 6c 65 76 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a level</em></dt>.
4450: 09 3c 64 64 3e 54 68 65 20 73 65 63 75 72 69 74 .<dd>The securit
4460: 79 20 6c 65 76 65 6c 20 75 73 65 64 20 66 6f 72 y level used for
4470: 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 63 69 selection of ci
4480: 70 68 65 72 73 2c 20 6b 65 79 20 73 69 7a 65 2c phers, key size,
4490: 20 65 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e etc.</dd>..<dt>
44a0: 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f <strong>session_
44b0: 72 65 75 73 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 reused</strong>
44c0: 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e <em>boolean</em>
44d0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 </dt>..<dd>Wheth
44e0: 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 68 er the session h
44f0: 61 73 20 62 65 65 6e 20 72 65 75 73 65 64 20 6f as been reused o
4500: 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 r not.</dd>..<dt
4510: 3e 3c 73 74 72 6f 6e 67 3e 69 73 5f 73 65 72 76 ><strong>is_serv
4520: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e er</strong> <em>
4530: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 boolean</em></dt
4540: 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20 74 >..<dd>Whether t
4550: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 he connection is
4560: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61 configured as a
4570: 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 20 63 server (1) or c
4580: 6c 69 65 6e 74 20 28 30 29 2e 3c 2f 64 64 3e 0a lient (0).</dd>.
4590: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 6f 6d .<dt><strong>com
45a0: 70 72 65 73 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 pression</strong
45b0: 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c > <em>mode</em><
45c0: 2f 64 74 3e 0a 09 3c 64 64 3e 43 6f 6d 70 72 65 /dt>..<dd>Compre
45d0: 73 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 ssion method.</d
45e0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
45f0: 65 78 70 61 6e 73 69 6f 6e 3c 2f 73 74 72 6f 6e expansion</stron
4600: 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e g> <em>mode</em>
4610: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 78 70 61 6e </dt>..<dd>Expan
4620: 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 sion method.</dd
4630: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c >. </dl>.</bl
4640: 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b ockquote>.<block
4650: 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 69 70 68 65 quote>..<b>Ciphe
4660: 72 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c r Info</b>. <
4670: 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dl>..<dt><strong
4680: 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e >cipher</strong>
4690: 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e <em>cipher</em>
46a0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63 </dt>..<dd>The c
46b0: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e urrent cipher in
46c0: 20 75 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e use for the con
46d0: 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c nection.</dd>..<
46e0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 6e 64 dt><strong>stand
46f0: 61 72 64 5f 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 ard_name</strong
4700: 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c > <em>name</em><
4710: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 74 /dt>..<dd>The st
4720: 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 20 andard RFC name
4730: 6f 66 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a of cipher.</dd>.
4740: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74 .<dt><strong>bit
4750: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e s</strong> <em>n
4760: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
4770: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 72 The number of pr
4780: 6f 63 65 73 73 65 64 20 62 69 74 73 20 75 73 65 ocessed bits use
4790: 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64 d for cipher.</d
47a0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
47b0: 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 73 74 72 secret_bits</str
47c0: 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c ong> <em>n</em><
47d0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 /dt>..<dd>The nu
47e0: 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 20 62 mber of secret b
47f0: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 its used for cip
4800: 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c her.</dd>..<dt><
4810: 73 74 72 6f 6e 67 3e 6d 69 6e 5f 76 65 72 73 69 strong>min_versi
4820: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e on</strong> <em>
4830: 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 version</em></dt
4840: 3e 0a 09 3c 64 64 3e 54 68 65 20 6d 69 6e 69 6d >..<dd>The minim
4850: 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 um protocol vers
4860: 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 72 2e 3c ion for cipher.<
4870: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4880: 67 3e 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 g>id</strong> <e
4890: 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 m>id</em></dt>..
48a0: 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20 <dd>The OpenSSL
48b0: 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 3e 0a cipher id.</dd>.
48c0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 64 65 73 .<dt><strong>des
48d0: 63 72 69 70 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 cription</strong
48e0: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
48f0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 20 74 65 ></dt>..<dd>A te
4900: 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f xt description o
4910: 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c 2f 64 f the cipher.</d
4920: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 d>. </dl>.</b
4930: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 lockquote>.<bloc
4940: 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 65 73 73 kquote>..<b>Sess
4950: 69 6f 6e 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 ion Info</b>.
4960: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f <dl>..<dt><stro
4970: 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e ng>alpn</strong>
4980: 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 <em>protocol</e
4990: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
49a0: 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 protocol select
49b0: 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61 ed after Applica
49c0: 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f tion-Layer Proto
49d0: 63 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 col.. Negotia
49e0: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 tion (ALPN).</dd
49f0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 >..<dt><strong>r
4a00: 65 73 75 6d 61 62 6c 65 3c 2f 73 74 72 6f 6e 67 esumable</strong
4a10: 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 > <em>boolean</e
4a20: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6e m></dt>..<dd>Can
4a30: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 62 65 20 the session be
4a40: 72 65 73 75 6d 65 64 20 6f 72 20 6e 6f 74 2e 3c resumed or not.<
4a50: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4a60: 67 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f 73 74 g>start_time</st
4a70: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64 rong> <em>second
4a80: 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 s</em></dt>..<dd
4a90: 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73 >Time since sess
4aa0: 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73 ion started in s
4ab0: 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f econds since epo
4ac0: 63 68 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 ch.</dd>..<dt><s
4ad0: 74 72 6f 6e 67 3e 74 69 6d 65 6f 75 74 3c 2f 73 trong>timeout</s
4ae0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e trong> <em>secon
4af0: 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ds</em></dt>..<d
4b00: 64 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e 20 6f d>Max duration o
4b10: 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 65 63 f session in sec
4b20: 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69 6d 65 onds before time
4b30: 2d 6f 75 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e -out.</dd>..<dt>
4b40: 3c 73 74 72 6f 6e 67 3e 6c 69 66 65 74 69 6d 65 <strong>lifetime
4b50: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 </strong> <em>se
4b60: 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a conds</em></dt>.
4b70: 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 74 69 63 .<dd>Session tic
4b80: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 68 69 6e ket lifetime hin
4b90: 74 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 64 t in seconds.</d
4ba0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
4bb0: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f session_id</stro
4bc0: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 ng> <em>binary_s
4bd0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
4be0: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 .<dd>Unique sess
4bf0: 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69 ion id for use i
4c00: 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73 n resuming the s
4c10: 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 ession.</dd>..<d
4c20: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f t><strong>sessio
4c30: 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 n_ticket</strong
4c40: 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 74 72 > <em>binary_str
4c50: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ing</em></dt>..<
4c60: 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f dd>Unique sessio
4c70: 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73 65 n ticket for use
4c80: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 in resuming the
4c90: 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 session.</dd>..
4ca0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 63 6b <dt><strong>tick
4cb0: 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f 73 74 72 et_app_data</str
4cc0: 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f ong> <em>binary_
4cd0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e string</em></dt>
4ce0: 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 ..<dd>Unique ses
4cf0: 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c sion ticket appl
4d00: 69 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 64 ication data.</d
4d10: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
4d20: 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 72 6f master_key</stro
4d30: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 ng> <em>binary_s
4d40: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
4d50: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 .<dd>Unique sess
4d60: 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c ion master key.<
4d70: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4d80: 67 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f g>session_cache_
4d90: 6d 6f 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 mode</strong> <e
4da0: 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e m>mode</em></dt>
4db0: 0a 09 3c 64 64 3e 53 65 72 76 65 72 20 63 61 63 ..<dd>Server cac
4dc0: 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e 74 2c he mode (client,
4dd0: 20 73 65 72 76 65 72 2c 20 6f 72 20 62 6f 74 68 server, or both
4de0: 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c ).</dd>. </dl
4df0: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a >.</blockquote>.
4e00: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
4e10: 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 22 3e ="tls::ciphers">
4e20: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 <strong>tls::cip
4e30: 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 hers</strong>.
4e40: 20 20 3c 65 6d 3e 3f 70 72 6f 74 6f 63 6f 6c 3f <em>?protocol?
4e50: 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 ?verbose? ?supp
4e60: 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 61 3e 3c orted?</em></a><
4e70: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 57 69 74 /dt>. <dd>Wit
4e80: 68 6f 75 74 20 61 6e 79 20 61 72 67 73 2c 20 72 hout any args, r
4e90: 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 eturns a list of
4ea0: 20 61 6c 6c 20 63 69 70 68 65 72 73 2e 20 57 69 all ciphers. Wi
4eb0: 74 68 0a 09 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c th..<em>protocol
4ec0: 3c 2f 65 6d 3e 2c 20 6f 6e 6c 79 20 74 68 65 20 </em>, only the
4ed0: 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 65 ciphers supporte
4ee0: 64 20 66 6f 72 20 74 68 61 74 20 70 72 6f 74 6f d for that proto
4ef0: 63 6f 6c 0a 09 61 72 65 20 72 65 74 75 72 6e 65 col..are returne
4f00: 64 20 77 68 65 72 65 20 3c 65 6d 3e 70 72 6f 74 d where <em>prot
4f10: 6f 63 6f 6c 3c 2f 65 6d 3e 20 6d 75 73 74 20 62 ocol</em> must b
4f20: 65 20 6f 6e 65 20 6f 66 20 3c 62 3e 73 73 6c 32 e one of <b>ssl2
4f30: 2c 20 73 73 6c 33 2c 0a 09 74 6c 73 31 2c 20 74 , ssl3,..tls1, t
4f40: 6c 73 31 2e 31 2c 20 74 6c 73 31 2e 32 2c 3c 2f ls1.1, tls1.2,</
4f50: 62 3e 20 6f 72 20 3c 62 3e 74 6c 73 31 2e 33 3c b> or <b>tls1.3<
4f60: 2f 62 3e 2e 20 49 66 20 3c 65 6d 3e 76 65 72 62 /b>. If <em>verb
4f70: 6f 73 65 3c 2f 65 6d 3e 20 69 73 0a 09 73 70 65 ose</em> is..spe
4f80: 63 69 66 69 65 64 20 61 73 20 74 72 75 65 20 74 cified as true t
4f90: 68 65 6e 20 61 20 76 65 72 62 6f 73 65 2c 20 68 hen a verbose, h
4fa0: 75 6d 61 6e 20 72 65 61 64 61 62 6c 65 20 6c 69 uman readable li
4fb0: 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 0a 09 st is returned..
4fc0: 77 69 74 68 20 61 64 64 69 74 69 6f 6e 61 6c 20 with additional
4fd0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 information on t
4fe0: 68 65 20 63 69 70 68 65 72 2e 20 49 66 20 3c 65 he cipher. If <e
4ff0: 6d 3e 73 75 70 70 6f 72 74 65 64 3c 2f 65 6d 3e m>supported</em>
5000: 0a 09 69 73 20 73 70 65 63 69 66 69 65 64 20 61 ..is specified a
5010: 73 20 74 72 75 65 2c 20 74 68 65 6e 20 6f 6e 6c s true, then onl
5020: 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75 y the ciphers su
5030: 70 70 6f 72 74 65 64 20 66 6f 72 20 70 72 6f 74 pported for prot
5040: 6f 63 6f 6c 0a 09 77 69 6c 6c 20 62 65 20 6c 69 ocol..will be li
5050: 73 74 65 64 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 sted.</dd>..
5060: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 <dt><a name="tls
5070: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e 3c 73 74 ::protocols"><st
5080: 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 rong>tls::protoc
5090: 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e ols</strong></a>
50a0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 </dt>. <dd>Re
50b0: 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 turns a list of
50c0: 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63 supported protoc
50d0: 6f 6c 73 2e 20 56 61 6c 69 64 20 76 61 6c 75 65 ols. Valid value
50e0: 73 20 61 72 65 3a 0a 09 3c 62 3e 73 73 6c 32 3c s are:..<b>ssl2<
50f0: 2f 62 3e 2c 20 3c 62 3e 73 73 6c 33 3c 2f 62 3e /b>, <b>ssl3</b>
5100: 2c 20 3c 62 3e 74 6c 73 31 3c 2f 62 3e 2c 20 3c , <b>tls1</b>, <
5110: 62 3e 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20 3c 62 b>tls1.1</b>, <b
5120: 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 0a 09 61 6e >tls1.2</b>,..an
5130: 64 20 3c 62 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e d <b>tls1.3</b>.
5140: 20 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 65 Exact list depe
5150: 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76 nds on OpenSSL v
5160: 65 72 73 69 6f 6e 20 61 6e 64 0a 09 63 6f 6d 70 ersion and..comp
5170: 69 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 2e 3c ile time flags.<
5180: 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 /dd>.. <dt><a
5190: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 76 65 72 73 name="tls::vers
51a0: 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 ion"><strong>tls
51b0: 3a 3a 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e ::version</stron
51c0: 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 g></a></dt>.
51d0: 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 <dd>Returns the
51e0: 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 OpenSSL version
51f0: 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20 string.</dd>..
5200: 20 20 3c 62 72 3e 0a 20 20 20 20 3c 64 74 3e 3c <br>. <dt><
5210: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 64 69 67 a name="tls::dig
5220: 65 73 74 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 est"><strong>tls
5230: 3a 3a 64 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 ::digest</strong
5240: 3e 20 3c 65 6d 3e 74 79 70 65 20 3f 2d 62 69 6e > <em>type ?-bin
5250: 7c 2d 68 65 78 3f 0a 09 5b 2d 66 69 6c 65 20 66 |-hex?..[-file f
5260: 69 6c 65 6e 61 6d 65 20 7c 20 2d 63 68 61 6e 20 ilename | -chan
5270: 63 68 61 6e 6e 65 6c 20 7c 20 3f 2d 64 61 74 61 channel | ?-data
5280: 3f 20 64 61 74 61 5d 3c 2f 65 6d 3e 3c 2f 61 3e ? data]</em></a>
5290: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 43 61 </dt>. <dd>Ca
52a0: 6c 63 75 6c 61 74 65 20 74 68 65 20 6d 65 73 73 lculate the mess
52b0: 61 67 65 20 64 69 67 65 73 74 20 66 6f 72 20 3c age digest for <
52c0: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 6f 72 20 em>data</em> or
52d0: 66 69 6c 65 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d file <em>filenam
52e0: 65 3c 2f 65 6d 3e 0a 09 75 73 69 6e 67 20 3c 65 e</em>..using <e
52f0: 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 68 61 73 68 m>type</em> hash
5300: 20 61 6c 67 6f 72 69 74 68 6d 2e 20 52 65 74 75 algorithm. Retu
5310: 72 6e 73 20 76 61 6c 75 65 20 61 73 20 61 20 68 rns value as a h
5320: 65 78 20 73 74 72 69 6e 67 0a 09 28 64 65 66 61 ex string..(defa
5330: 75 6c 74 29 20 6f 72 20 61 73 20 61 20 62 69 6e ult) or as a bin
5340: 61 72 79 20 76 61 6c 75 65 20 77 69 74 68 20 3c ary value with <
5350: 65 6d 3e 2d 62 69 6e 3c 2f 65 6d 3e 20 6f 70 74 em>-bin</em> opt
5360: 69 6f 6e 2e 20 55 73 69 6e 67 0a 09 3c 65 6d 3e ion. Using..<em>
5370: 2d 63 68 61 6e 3c 2f 65 6d 3e 20 6f 70 74 69 6f -chan</em> optio
5380: 6e 2c 20 61 20 73 74 61 63 6b 65 64 20 63 68 61 n, a stacked cha
5390: 6e 6e 65 6c 20 69 73 20 63 72 65 61 74 65 64 20 nnel is created
53a0: 61 6e 64 20 64 61 74 61 20 72 65 61 64 0a 09 66 and data read..f
53b0: 72 6f 6d 20 74 68 65 20 63 68 61 6e 6e 65 6c 20 rom the channel
53c0: 69 73 20 75 73 65 64 20 74 6f 20 63 61 6c 63 75 is used to calcu
53d0: 6c 61 74 65 20 61 20 6d 65 73 73 61 67 65 20 64 late a message d
53e0: 69 67 65 73 74 20 77 69 74 68 20 74 68 65 20 72 igest with the r
53f0: 65 73 75 6c 74 0a 09 72 65 74 75 72 6e 65 64 20 esult..returned
5400: 77 69 74 68 20 74 68 65 20 6c 61 73 74 20 72 65 with the last re
5410: 61 64 20 6f 70 65 72 61 74 69 6f 6e 20 62 65 66 ad operation bef
5420: 6f 72 65 20 45 4f 46 2e 20 54 79 70 65 20 63 61 ore EOF. Type ca
5430: 6e 20 62 65 0a 09 61 6e 79 20 4f 70 65 6e 53 53 n be..any OpenSS
5440: 4c 20 73 75 70 70 6f 72 74 65 64 20 68 61 73 68 L supported hash
5450: 20 61 6c 67 6f 72 69 74 68 6d 20 69 6e 63 6c 75 algorithm inclu
5460: 64 69 6e 67 3a 20 3c 62 3e 6d 64 34 3c 2f 62 3e ding: <b>md4</b>
5470: 2c 20 3c 62 3e 6d 64 35 3c 2f 62 3e 2c 0a 09 3c , <b>md5</b>,..<
5480: 62 3e 73 68 61 31 3c 2f 62 3e 2c 20 3c 62 3e 73 b>sha1</b>, <b>s
5490: 68 61 32 35 36 3c 2f 62 3e 2c 20 3c 62 3e 73 68 ha256</b>, <b>sh
54a0: 61 35 31 32 3c 2f 62 3e 2c 20 3c 62 3e 73 68 61 a512</b>, <b>sha
54b0: 33 2d 32 35 36 3c 2f 62 3e 2c 20 65 74 63 2e 0a 3-256</b>, etc..
54c0: 09 53 65 65 20 3c 62 3e 74 6c 73 3a 3a 64 69 67 .See <b>tls::dig
54d0: 65 73 74 73 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 ests</b> command
54e0: 20 66 6f 72 20 61 20 66 75 6c 6c 20 6c 69 73 74 for a full list
54f0: 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e .</dd>.. <dt>
5500: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 64 69 <a name="tls::di
5510: 67 65 73 74 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 gests"><strong>t
5520: 6c 73 3a 3a 64 69 67 65 73 74 73 3c 2f 73 74 72 ls::digests</str
5530: 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 ong></a></dt>.
5540: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 <dd>Returns a
5550: 6c 69 73 74 20 6f 66 20 74 68 65 20 68 61 73 68 list of the hash
5560: 20 61 6c 67 6f 72 69 74 68 6d 73 20 66 6f 72 20 algorithms for
5570: 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c 2f <b>tls::digest</
5580: 62 3e 20 63 6f 6d 6d 61 6e 64 2e 3c 2f 64 64 3e b> command.</dd>
5590: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d .. <dt><a nam
55a0: 65 3d 22 74 6c 73 3a 3a 6d 64 34 22 3e 3c 73 74 e="tls::md4"><st
55b0: 72 6f 6e 67 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 73 rong>tls::md4</s
55c0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c trong> <em>data<
55d0: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 /em></a></dt>.
55e0: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 <dd>Returns th
55f0: 65 20 4d 44 34 20 6d 65 73 73 61 67 65 2d 64 69 e MD4 message-di
5600: 67 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64 61 74 gest for <em>dat
5610: 61 3c 2f 65 6d 3e 20 61 73 20 61 20 68 65 78 20 a</em> as a hex
5620: 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20 string.</dd>..
5630: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
5640: 6c 73 3a 3a 6d 64 35 22 3e 3c 73 74 72 6f 6e 67 ls::md5"><strong
5650: 3e 74 6c 73 3a 3a 6d 64 35 3c 2f 73 74 72 6f 6e >tls::md5</stron
5660: 67 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e g> <em>data</em>
5670: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 </a></dt>. <d
5680: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 4d 44 d>Returns the MD
5690: 35 20 6d 65 73 73 61 67 65 2d 64 69 67 65 73 74 5 message-digest
56a0: 20 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 for <em>data</e
56b0: 6d 3e 20 61 73 20 61 20 68 65 78 20 73 74 72 69 m> as a hex stri
56c0: 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 ng.</dd>.. <d
56d0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
56e0: 73 68 61 31 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c sha1"><strong>tl
56f0: 73 3a 3a 73 68 61 31 3c 2f 73 74 72 6f 6e 67 3e s::sha1</strong>
5700: 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f <em>data</em></
5710: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e a></dt>. <dd>
5720: 52 65 74 75 72 6e 73 20 74 68 65 20 53 48 41 31 Returns the SHA1
5730: 20 73 65 63 75 72 65 20 68 61 73 68 20 61 6c 67 secure hash alg
5740: 6f 72 69 74 68 6d 20 64 69 67 65 73 74 20 66 6f orithm digest fo
5750: 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 r <em>data</em>
5760: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e as a hex string.
5770: 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c </dd>.. <dt><
5780: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 68 61 a name="tls::sha
5790: 32 35 36 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 256"><strong>tls
57a0: 3a 3a 73 68 61 32 35 36 3c 2f 73 74 72 6f 6e 67 ::sha256</strong
57b0: 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c > <em>data</em><
57c0: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
57d0: 3e 52 65 74 75 72 6e 73 20 74 68 65 20 53 48 41 >Returns the SHA
57e0: 2d 32 20 53 48 41 32 35 36 20 73 65 63 75 72 65 -2 SHA256 secure
57f0: 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 20 hash algorithm
5800: 64 69 67 65 73 74 20 66 6f 72 20 3c 65 6d 3e 64 digest for <em>d
5810: 61 74 61 3c 2f 65 6d 3e 20 61 73 20 61 20 68 65 ata</em> as a he
5820: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 3c x string.</dd>.<
5830: 2f 64 6c 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d /dl>..<h3><a nam
5840: 65 3d 22 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 e="CALLBACK OPTI
5850: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 ONS">CALLBACK OP
5860: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a TIONS</a></h3>..
5870: 3c 70 3e 0a 41 73 20 69 6e 64 69 63 61 74 65 64 <p>.As indicated
5880: 20 61 62 6f 76 65 2c 20 69 6e 64 69 76 69 64 75 above, individu
5890: 61 6c 20 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20 al channels can
58a0: 62 65 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f be given their o
58b0: 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 wn callbacks.to
58c0: 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 handle intermedi
58d0: 61 74 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62 ate processing b
58e0: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 y the OpenSSL li
58f0: 62 72 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65 brary, using the
5900: 0a 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e .<strong>-comman
5910: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 d</strong>, <str
5920: 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 ong>-password</s
5930: 74 72 6f 6e 67 3e 2c 20 61 6e 64 0a 3c 73 74 72 trong>, and.<str
5940: 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f ong>-validate_co
5950: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f mmand</strong> o
5960: 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20 74 6f ptions passed to
5970: 20 65 69 74 68 65 72 20 6f 66 0a 3c 73 74 72 6f either of.<stro
5980: 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f ng>tls::socket</
5990: 73 74 72 6f 6e 67 3e 20 6f 72 20 3c 73 74 72 6f strong> or <stro
59a0: 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f ng>tls::import</
59b0: 73 74 72 6f 6e 67 3e 2e 0a 49 66 20 74 68 65 20 strong>..If the
59c0: 63 61 6c 6c 62 61 63 6b 20 67 65 6e 65 72 61 74 callback generat
59d0: 65 73 20 61 6e 20 65 72 72 6f 72 2c 20 74 68 65 es an error, the
59e0: 20 3c 62 3e 62 67 65 72 72 6f 72 3c 2f 62 3e 20 <b>bgerror</b>
59f0: 63 6f 6d 6d 61 6e 64 20 77 69 74 68 20 62 65 0a command with be.
5a00: 69 6e 76 6f 6b 65 64 20 77 69 74 68 20 74 68 65 invoked with the
5a10: 20 65 72 72 6f 72 20 69 6e 66 6f 72 6d 61 74 69 error informati
5a20: 6f 6e 2e 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b on..</p>..<block
5a30: 71 75 6f 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 quote>.<dl>..
5a40: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f <dt><strong>-co
5a50: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c mmand</strong> <
5a60: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
5a70: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 </dt>. <dd>..
5a80: 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 Invokes the spec
5a90: 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 ified <em>callba
5aa0: 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 61 ck</em> script a
5ab0: 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 t several points
5ac0: 0a 09 64 75 72 69 6e 67 20 74 68 65 20 4f 70 65 ..during the Ope
5ad0: 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 61 nSSL handshake a
5ae0: 6e 64 20 75 73 65 2e 20 53 65 65 20 62 65 6c 6f nd use. See belo
5af0: 77 20 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 w for the possib
5b00: 6c 65 0a 09 61 72 67 75 6d 65 6e 74 73 20 70 61 le..arguments pa
5b10: 73 73 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c ssed to the call
5b20: 62 61 63 6b 20 73 63 72 69 70 74 2e 20 56 61 6c back script. Val
5b30: 75 65 73 20 72 65 74 75 72 6e 65 64 20 66 72 6f ues returned fro
5b40: 6d 20 74 68 65 0a 09 63 61 6c 6c 62 61 63 6b 20 m the..callback
5b50: 61 72 65 20 69 67 6e 6f 72 65 64 2e 0a 0a 09 3c are ignored....<
5b60: 62 72 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e br>..<br>...<dl>
5b70: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f ...<dt>.. <stro
5b80: 6e 67 3e 65 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 ng>error</strong
5b90: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65 > <em>channel me
5ba0: 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 ssage</em>..</dt
5bb0: 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 65 20 3c >..<dd>.. The <
5bc0: 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 em>message</em>
5bd0: 61 72 67 75 6d 65 6e 74 20 63 6f 6e 74 61 69 6e argument contain
5be0: 73 20 61 6e 20 65 72 72 6f 72 20 6d 65 73 73 61 s an error messa
5bf0: 67 65 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20 ge generated..
5c00: 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 by the OpenSSL f
5c10: 75 6e 63 74 69 6f 6e 20 3c 63 6f 64 65 3e 45 52 unction <code>ER
5c20: 52 5f 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 R_reason_error_s
5c30: 74 72 69 6e 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a tring()</code>..
5c40: 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 .</dd>...<br>...
5c50: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e <dt>.. <strong>
5c60: 69 6e 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 info</strong> <e
5c70: 6d 3e 63 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 m>channel major
5c80: 6d 69 6e 6f 72 20 6d 65 73 73 61 67 65 20 74 79 minor message ty
5c90: 70 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 pe</em>..</dt>..
5ca0: 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 <dd>.. This for
5cb0: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 m of callback is
5cc0: 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 invoked by the
5cd0: 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e OpenSSL function
5ce0: 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 .. <code>SSL_CT
5cf0: 58 5f 73 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 X_set_info_callb
5d00: 61 63 6b 28 29 3c 2f 63 6f 64 65 3e 20 64 75 72 ack()</code> dur
5d10: 69 6e 67 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 ing connection s
5d20: 65 74 75 70 0a 09 20 20 61 6e 64 20 75 73 65 2e etup.. and use.
5d30: 0a 09 20 20 3c 62 72 3e 0a 09 20 20 3c 75 6c 3e .. <br>.. <ul>
5d40: 0a 09 20 20 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 .. <li>Possible
5d50: 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e values for <em>
5d60: 6d 61 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a major</em> are:.
5d70: 09 20 20 3c 63 6f 64 65 3e 68 61 6e 64 73 68 61 . <code>handsha
5d80: 6b 65 2c 20 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 ke, alert, conne
5d90: 63 74 2c 20 61 63 63 65 70 74 3c 2f 63 6f 64 65 ct, accept</code
5da0: 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 50 >.</li>.. <li>P
5db0: 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 ossible values f
5dc0: 6f 72 20 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d or <em>minor</em
5dd0: 3e 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e > are:.. <code>
5de0: 73 74 61 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61 start, done, rea
5df0: 64 2c 20 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 d, write, loop,
5e00: 65 78 69 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 exit</code>.</li
5e10: 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d >.. <li>The <em
5e20: 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 >message</em> ar
5e30: 67 75 6d 65 6e 74 20 69 73 20 61 20 64 65 73 63 gument is a desc
5e40: 72 69 70 74 69 76 65 20 73 74 72 69 6e 67 20 77 riptive string w
5e50: 68 69 63 68 20 6d 61 79 0a 09 20 20 62 65 20 67 hich may.. be g
5e60: 65 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 20 enerated either
5e70: 62 79 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 by <code>SSL_sta
5e80: 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 te_string_long()
5e90: 3c 2f 63 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 </code> or by..
5ea0: 20 3c 63 6f 64 65 3e 53 53 4c 5f 61 6c 65 72 74 <code>SSL_alert
5eb0: 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e _desc_string_lon
5ec0: 67 28 29 3c 2f 63 6f 64 65 3e 2c 20 64 65 70 65 g()</code>, depe
5ed0: 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e nding on the con
5ee0: 74 65 78 74 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c text.</li>.. <l
5ef0: 69 3e 46 6f 72 20 61 6c 65 72 74 73 2c 20 74 68 i>For alerts, th
5f00: 65 20 70 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 e possible value
5f10: 73 20 66 6f 72 20 3c 65 6d 3e 74 79 70 65 3c 2f s for <em>type</
5f20: 65 6d 3e 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64 em> are:.. <cod
5f30: 65 3e 77 61 72 6e 69 6e 67 2c 20 66 61 74 61 6c e>warning, fatal
5f40: 2c 20 61 6e 64 20 75 6e 6b 6e 6f 77 6e 3c 2f 63 , and unknown</c
5f50: 6f 64 65 3e 2e 20 46 6f 72 20 6f 74 68 65 72 73 ode>. For others
5f60: 2c 0a 09 20 20 3c 63 6f 64 65 3e 69 6e 66 6f 3c ,.. <code>info<
5f70: 2f 63 6f 64 65 3e 20 69 73 20 75 73 65 64 2e 3c /code> is used.<
5f80: 2f 6c 69 3e 0a 09 20 20 3c 2f 75 6c 3e 0a 09 3c /li>.. </ul>..<
5f90: 2f 64 64 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c /dd>...<dt>.. <
5fa0: 73 74 72 6f 6e 67 3e 6d 65 73 73 61 67 65 3c 2f strong>message</
5fb0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e strong> <em>chan
5fc0: 6e 65 6c 20 64 69 72 65 63 74 69 6f 6e 20 76 65 nel direction ve
5fd0: 72 73 69 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 rsion content_ty
5fe0: 70 65 20 64 61 74 61 3c 2f 65 6d 3e 0a 09 3c 2f pe data</em>..</
5ff0: 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 dt>..<dd>.. Thi
6000: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
6010: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 ck is invoked by
6020: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e the OpenSSL fun
6030: 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 ction.. <code>S
6040: 53 4c 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 SL_set_msg_callb
6050: 61 63 6b 28 29 3c 2f 63 6f 64 65 3e 20 77 68 65 ack()</code> whe
6060: 6e 65 76 65 72 20 61 20 6d 65 73 73 61 67 65 20 never a message
6070: 69 73 20 73 65 6e 74 20 6f 72 0a 09 20 20 72 65 is sent or.. re
6080: 63 65 69 76 65 64 2e 20 49 74 20 69 73 20 6f 6e ceived. It is on
6090: 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 77 68 65 ly available whe
60a0: 6e 0a 09 20 20 4f 70 65 6e 53 53 4c 20 69 73 20 n.. OpenSSL is
60b0: 63 6f 6d 70 6c 69 65 64 20 77 69 74 68 20 74 68 complied with th
60c0: 65 20 3c 65 6d 3e 65 6e 61 62 6c 65 2d 73 73 6c e <em>enable-ssl
60d0: 2d 74 72 61 63 65 3c 2f 65 6d 3e 20 6f 70 74 69 -trace</em> opti
60e0: 6f 6e 2e 0a 09 20 20 57 68 65 72 65 20 3c 65 6d on... Where <em
60f0: 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 65 6d 3e 20 >direction</em>
6100: 69 73 20 53 65 6e 74 20 6f 72 20 52 65 63 65 69 is Sent or Recei
6110: 76 65 64 2c 20 3c 65 6d 3e 76 65 72 73 69 6f 6e ved, <em>version
6120: 3c 2f 65 6d 3e 20 69 73 20 74 68 65 0a 09 20 20 </em> is the..
6130: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e protocol version
6140: 2c 20 3c 65 6d 3e 63 6f 6e 74 65 6e 74 5f 74 79 , <em>content_ty
6150: 70 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 6d pe</em> is the m
6160: 65 73 73 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 essage content t
6170: 79 70 65 2c 0a 09 20 20 61 6e 64 20 3c 65 6d 3e ype,.. and <em>
6180: 64 61 74 61 3c 2f 65 6d 3e 20 69 73 20 6d 6f 72 data</em> is mor
6190: 65 20 69 6e 66 6f 20 6f 6e 20 74 68 65 20 6d 65 e info on the me
61a0: 73 73 61 67 65 20 66 72 6f 6d 20 74 68 65 20 3c ssage from the <
61b0: 63 6f 64 65 3e 53 53 4c 5f 74 72 61 63 65 3c 2f code>SSL_trace</
61c0: 63 6f 64 65 3e 20 41 50 49 2e 0a 09 3c 2f 64 64 code> API...</dd
61d0: 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 >..<br>...<dt>..
61e0: 20 20 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f <strong>sessio
61f0: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 n</strong> <em>c
6200: 68 61 6e 6e 65 6c 20 73 65 73 73 69 6f 6e 5f 69 hannel session_i
6210: 64 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d d ticket lifetim
6220: 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c e</em>..</dt>..<
6230: 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d dd>.. This form
6240: 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 of callback is
6250: 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f invoked by the O
6260: 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a penSSL function.
6270: 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 . <code>SSL_CTX
6280: 5f 73 65 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 _sess_set_new_cb
6290: 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 57 68 ()</code>... Wh
62a0: 65 72 65 20 3c 65 6d 3e 73 65 73 73 69 6f 6e 5f ere <em>session_
62b0: 69 64 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 63 id</em> is the c
62c0: 75 72 72 65 6e 74 20 73 65 73 73 69 6f 6e 20 69 urrent session i
62d0: 64 65 6e 74 69 66 69 65 72 2c 0a 09 20 20 3c 65 dentifier,.. <e
62e0: 6d 3e 74 69 63 6b 65 74 3c 2f 65 6d 3e 20 69 73 m>ticket</em> is
62f0: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 74 69 63 the session tic
6300: 6b 65 74 20 69 6e 66 6f 2c 20 61 6e 64 20 3c 65 ket info, and <e
6310: 6d 3e 6c 69 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a m>lifetime</em>.
6320: 09 20 20 69 73 20 74 68 65 20 74 68 65 20 74 69 . is the the ti
6330: 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 69 6e cket lifetime in
6340: 20 73 65 63 6f 6e 64 73 2e 0a 09 3c 2f 64 64 3e seconds...</dd>
6350: 0a 09 3c 62 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 ..<br>..</dl>.
6360: 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 </dd>.. <br
6370: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f >.. <dt><stro
6380: 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 ng>-password</st
6390: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 rong> <em>callba
63a0: 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 ck</em></dt>.
63b0: 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 <dd>..Invokes t
63c0: 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d he specified <em
63d0: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 >callback</em> s
63e0: 63 72 69 70 74 20 77 68 65 6e 20 4f 70 65 6e 53 cript when OpenS
63f0: 53 4c 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62 74 SL needs to..obt
6400: 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 20 ain a password.
6410: 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 See below for th
6420: 65 20 70 6f 73 73 69 62 6c 65 20 61 72 67 75 6d e possible argum
6430: 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f 0a 09 ents passed to..
6440: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 the callback scr
6450: 69 70 74 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 ipt. See below f
6460: 6f 72 20 76 61 6c 69 64 20 72 65 74 75 72 6e 20 or valid return
6470: 76 61 6c 75 65 73 2e 0a 0a 09 3c 62 72 3e 0a 09 values....<br>..
6480: 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 <br>...<dl>...<d
6490: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 70 61 t>.. <strong>pa
64a0: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 ssword</strong>
64b0: 3c 65 6d 3e 72 77 66 6c 61 67 20 73 69 7a 65 3c <em>rwflag size<
64c0: 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 /em>..</dt>..<dd
64d0: 3e 0a 09 20 20 49 6e 76 6f 6b 65 64 20 77 68 65 >.. Invoked whe
64e0: 6e 20 6c 6f 61 64 69 6e 67 20 6f 72 20 73 74 6f n loading or sto
64f0: 72 69 6e 67 20 61 20 50 45 4d 20 63 65 72 74 69 ring a PEM certi
6500: 66 69 63 61 74 65 20 77 69 74 68 20 65 6e 63 72 ficate with encr
6510: 79 70 74 69 6f 6e 2e 0a 09 20 20 57 68 65 72 65 yption... Where
6520: 20 3c 65 6d 3e 72 77 66 6c 61 67 3c 2f 65 6d 3e <em>rwflag</em>
6530: 20 69 73 20 30 20 66 6f 72 20 72 65 61 64 69 6e is 0 for readin
6540: 67 2f 64 65 63 72 79 70 74 69 6f 6e 20 6f 72 20 g/decryption or
6550: 31 20 66 6f 72 0a 09 20 20 77 72 69 74 69 6e 67 1 for.. writing
6560: 2f 65 6e 63 72 79 70 74 69 6f 6e 20 28 63 61 6e /encryption (can
6570: 20 70 72 6f 6d 70 74 20 75 73 65 72 20 74 6f 20 prompt user to
6580: 63 6f 6e 66 69 72 6d 29 20 61 6e 64 0a 09 20 20 confirm) and..
6590: 3c 65 6d 3e 73 69 7a 65 3c 2f 65 6d 3e 20 69 73 <em>size</em> is
65a0: 20 74 68 65 20 6d 61 78 20 70 61 73 73 77 6f 72 the max passwor
65b0: 64 20 6c 65 6e 67 74 68 20 69 6e 20 62 79 74 65 d length in byte
65c0: 73 2e 0a 09 20 20 54 68 65 20 63 61 6c 6c 62 61 s... The callba
65d0: 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e ck should return
65e0: 20 74 68 65 20 70 61 73 73 77 6f 72 64 20 61 73 the password as
65f0: 20 61 20 73 74 72 69 6e 67 2e 0a 09 3c 2f 64 64 a string...</dd
6600: 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 >. </dd>..
6610: 20 3c 62 72 3e 0a 0a 0a 20 20 20 20 3c 64 74 3e <br>... <dt>
6620: 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 <strong>-validat
6630: 65 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 ecommand</strong
6640: 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f > <em>callback</
6650: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 em></dt>. <dd
6660: 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 >..Invokes the s
6670: 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c pecified <em>cal
6680: 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 lback</em> scrip
6690: 74 20 64 75 72 69 6e 67 20 68 61 6e 64 73 68 61 t during handsha
66a0: 6b 65 20 69 6e 0a 09 6f 72 64 65 72 20 74 6f 20 ke in..order to
66b0: 76 61 6c 69 64 61 74 65 20 74 68 65 20 70 72 6f validate the pro
66c0: 76 69 64 65 64 20 76 61 6c 75 65 28 73 29 2e 20 vided value(s).
66d0: 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 See below for th
66e0: 65 20 70 6f 73 73 69 62 6c 65 0a 09 61 72 67 75 e possible..argu
66f0: 6d 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 ments passed to
6700: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 the callback scr
6710: 69 70 74 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 ipt...To reject
6720: 74 68 65 20 76 61 6c 75 65 20 61 6e 64 20 61 62 the value and ab
6730: 6f 72 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 ort connection,
6740: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f the callback sho
6750: 75 6c 64 20 72 65 74 75 72 6e 20 30 2e 0a 09 54 uld return 0...T
6760: 6f 20 61 63 63 65 70 74 20 74 68 65 20 76 61 6c o accept the val
6770: 75 65 20 61 6e 64 20 63 6f 6e 74 69 6e 75 65 20 ue and continue
6780: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 the connection,
6790: 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e it should return
67a0: 20 31 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 1...To reject t
67b0: 68 65 20 76 61 6c 75 65 2c 20 62 75 74 20 63 6f he value, but co
67c0: 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 ntinue the conne
67d0: 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 ction, it should
67e0: 20 72 65 74 75 72 6e 20 32 2e 0a 0a 09 3c 62 72 return 2....<br
67f0: 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a >..<br>...<dl>..
6800: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 .<dt>.. <strong
6810: 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c >alpn</strong> <
6820: 65 6d 3e 63 68 61 6e 6e 65 6c 20 70 72 6f 74 6f em>channel proto
6830: 63 6f 6c 20 6d 61 74 63 68 3c 2f 65 6d 3e 0a 09 col match</em>..
6840: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 </dt>..<dd>.. F
6850: 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 or servers, this
6860: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 form of callbac
6870: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 k is invoked whe
6880: 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 n the client ALP
6890: 4e 0a 09 20 20 65 78 74 65 6e 73 69 6f 6e 20 69 N.. extension i
68a0: 73 20 72 65 63 65 69 76 65 64 2e 20 49 66 20 3c s received. If <
68b0: 65 6d 3e 6d 61 74 63 68 3c 2f 65 6d 3e 20 69 73 em>match</em> is
68c0: 20 74 72 75 65 2c 20 3c 65 6d 3e 70 72 6f 74 6f true, <em>proto
68d0: 63 6f 6c 3c 2f 65 6d 3e 0a 09 20 20 69 73 20 74 col</em>.. is t
68e0: 68 65 20 66 69 72 73 74 20 3c 62 3e 2d 61 6c 70 he first <b>-alp
68f0: 6e 3c 2f 62 3e 20 73 70 65 63 69 66 69 65 64 20 n</b> specified
6900: 70 72 6f 74 6f 63 6f 6c 20 63 6f 6d 6d 6f 6e 20 protocol common
6910: 74 6f 20 74 68 65 20 62 6f 74 68 20 74 68 65 0a to the both the.
6920: 09 20 20 63 6c 69 65 6e 74 20 61 6e 64 20 73 65 . client and se
6930: 72 76 65 72 2e 20 49 66 20 6e 6f 74 2c 20 74 68 rver. If not, th
6940: 65 20 66 69 72 73 74 20 63 6c 69 65 6e 74 20 73 e first client s
6950: 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f pecified protoco
6960: 6c 20 69 73 0a 09 20 20 75 73 65 64 2e 20 43 61 l is.. used. Ca
6970: 6c 6c 65 64 20 61 66 74 65 72 20 68 65 6c 6c 6f lled after hello
6980: 20 61 6e 64 20 41 4c 50 4e 20 63 61 6c 6c 62 61 and ALPN callba
6990: 63 6b 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 cks...</dd>...<b
69a0: 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 r>...<dt>.. <st
69b0: 72 6f 6e 67 3e 68 65 6c 6c 6f 3c 2f 73 74 72 6f rong>hello</stro
69c0: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 ng> <em>channel
69d0: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a servername</em>.
69e0: 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 .</dt>..<dd>..
69f0: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 For servers, thi
6a00: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
6a10: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 ck is invoked du
6a20: 72 69 6e 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c ring client hell
6a30: 6f 0a 09 20 20 6d 65 73 73 61 67 65 20 70 72 6f o.. message pro
6a40: 63 65 73 73 69 6e 67 2e 20 49 74 20 69 73 20 75 cessing. It is u
6a50: 73 65 64 20 74 6f 20 73 65 6c 65 63 74 20 61 6e sed to select an
6a60: 20 61 70 70 72 6f 70 72 69 61 74 65 20 63 65 72 appropriate cer
6a70: 74 69 66 69 63 61 74 65 20 74 6f 0a 09 20 20 70 tificate to.. p
6a80: 72 65 73 65 6e 74 2c 20 61 6e 64 20 6d 61 6b 65 resent, and make
6a90: 20 6f 74 68 65 72 20 63 6f 6e 66 69 67 75 72 61 other configura
6aa0: 74 69 6f 6e 20 61 64 6a 75 73 74 6d 65 6e 74 73 tion adjustments
6ab0: 20 72 65 6c 65 76 61 6e 74 20 74 6f 20 74 68 61 relevant to tha
6ac0: 74 0a 09 20 20 73 65 72 76 65 72 20 6e 61 6d 65 t.. server name
6ad0: 20 61 6e 64 20 69 74 73 20 63 6f 6e 66 69 67 75 and its configu
6ae0: 72 61 74 69 6f 6e 2e 20 43 61 6c 6c 65 64 20 62 ration. Called b
6af0: 65 66 6f 72 65 20 53 4e 49 20 61 6e 64 20 41 4c efore SNI and AL
6b00: 50 4e 20 63 61 6c 6c 62 61 63 6b 73 2e 0a 09 3c PN callbacks...<
6b10: 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 /dd>...<br>...<d
6b20: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 73 6e t>.. <strong>sn
6b30: 69 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 i</strong> <em>c
6b40: 68 61 6e 6e 65 6c 20 73 65 72 76 65 72 6e 61 6d hannel servernam
6b50: 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c e</em>..</dt>..<
6b60: 64 64 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 65 dd>.. For serve
6b70: 72 73 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 rs, this form of
6b80: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
6b90: 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 53 4e oked when the SN
6ba0: 49 20 65 78 74 65 6e 73 69 6f 6e 0a 09 20 20 66 I extension.. f
6bb0: 72 6f 6d 20 74 68 65 20 63 6c 69 65 6e 74 20 69 rom the client i
6bc0: 73 20 72 65 63 65 69 76 65 64 2e 20 57 68 65 72 s received. Wher
6bd0: 65 20 3c 65 6d 3e 73 65 72 76 65 72 6e 61 6d 65 e <em>servername
6be0: 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 63 6c 69 </em> is the cli
6bf0: 65 6e 74 0a 09 20 20 70 72 6f 76 69 64 65 64 20 ent.. provided
6c00: 73 65 72 76 65 72 20 6e 61 6d 65 20 66 72 6f 6d server name from
6c10: 20 74 68 65 20 3c 62 3e 2d 73 65 72 76 65 72 6e the <b>-servern
6c20: 61 6d 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 ame</b> option.
6c30: 54 68 69 73 20 69 73 0a 09 20 20 75 73 65 64 20 This is.. used
6c40: 77 68 65 6e 20 61 20 73 65 72 76 65 72 20 73 75 when a server su
6c50: 70 70 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 pports multiple
6c60: 6e 61 6d 65 73 2c 20 73 6f 20 74 68 65 20 72 69 names, so the ri
6c70: 67 68 74 20 63 65 72 74 69 66 69 63 61 74 65 0a ght certificate.
6c80: 09 20 20 63 61 6e 20 62 65 20 75 73 65 64 2e 20 . can be used.
6c90: 43 61 6c 6c 65 64 20 61 66 74 65 72 20 68 65 6c Called after hel
6ca0: 6c 6f 20 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 lo callback but
6cb0: 62 65 66 6f 72 65 20 41 4c 50 4e 20 63 61 6c 6c before ALPN call
6cc0: 62 61 63 6b 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c back...</dd>...<
6cd0: 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 br>...<dt>.. <s
6ce0: 74 72 6f 6e 67 3e 76 65 72 69 66 79 3c 2f 73 74 trong>verify</st
6cf0: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 rong> <em>channe
6d00: 6c 20 64 65 70 74 68 20 63 65 72 74 20 73 74 61 l depth cert sta
6d10: 74 75 73 20 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 tus error</em>..
6d20: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 </dt>..<dd>.. T
6d30: 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c his form of call
6d40: 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 back is invoked
6d50: 62 79 20 4f 70 65 6e 53 53 4c 20 77 68 65 6e 20 by OpenSSL when
6d60: 61 20 6e 65 77 20 63 65 72 74 69 66 69 63 61 74 a new certificat
6d70: 65 0a 09 20 20 69 73 20 72 65 63 65 69 76 65 64 e.. is received
6d80: 20 66 72 6f 6d 20 74 68 65 20 70 65 65 72 2e 20 from the peer.
6d90: 49 74 20 61 6c 6c 6f 77 73 20 74 68 65 20 63 6c It allows the cl
6da0: 69 65 6e 74 20 74 6f 20 63 68 65 63 6b 20 74 68 ient to check th
6db0: 65 0a 09 20 20 63 65 72 74 69 66 69 63 61 74 65 e.. certificate
6dc0: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 verification re
6dd0: 73 75 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 sults and choose
6de0: 20 77 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 whether to cont
6df0: 69 6e 75 65 0a 09 20 20 6f 72 20 6e 6f 74 2e 20 inue.. or not.
6e00: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 It is called for
6e10: 20 65 61 63 68 20 63 65 72 74 69 66 69 63 61 74 each certificat
6e20: 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69 e in the certifi
6e30: 63 61 74 65 20 63 68 61 69 6e 2e 0a 09 20 20 3c cate chain... <
6e40: 75 6c 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c ul>.. <li>The <
6e50: 65 6d 3e 64 65 70 74 68 3c 2f 65 6d 3e 20 61 72 em>depth</em> ar
6e60: 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 69 6e 74 gument is an int
6e70: 65 67 65 72 20 72 65 70 72 65 73 65 6e 74 69 6e eger representin
6e80: 67 20 74 68 65 0a 09 20 20 63 75 72 72 65 6e 74 g the.. current
6e90: 20 64 65 70 74 68 20 6f 6e 20 74 68 65 20 63 65 depth on the ce
6ea0: 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c rtificate chain,
6eb0: 20 77 69 74 68 0a 09 20 20 3c 63 6f 64 65 3e 30 with.. <code>0
6ec0: 3c 2f 63 6f 64 65 3e 20 61 73 20 74 68 65 20 70 </code> as the p
6ed0: 65 65 72 20 63 65 72 74 69 66 69 63 61 74 65 20 eer certificate
6ee0: 61 6e 64 20 68 69 67 68 65 72 20 76 61 6c 75 65 and higher value
6ef0: 73 20 67 6f 69 6e 67 0a 09 20 20 75 70 20 74 6f s going.. up to
6f00: 20 74 68 65 20 43 65 72 74 69 66 69 63 61 74 65 the Certificate
6f10: 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 2e Authority (CA).
6f20: 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 </li>.. <li>The
6f30: 20 3c 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 20 61 <em>cert</em> a
6f40: 72 67 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 rgument is a lis
6f50: 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 t of key-value p
6f60: 61 69 72 73 20 73 69 6d 69 6c 61 72 0a 09 20 20 airs similar..
6f70: 74 6f 20 74 68 6f 73 65 20 72 65 74 75 72 6e 65 to those returne
6f80: 64 20 62 79 0a 09 20 20 3c 61 20 68 72 65 66 3d d by.. <a href=
6f90: 22 23 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c "#tls::status"><
6fa0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 strong>tls::stat
6fb0: 75 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 2e us</strong></a>.
6fc0: 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 </li>.. <li>The
6fd0: 20 3c 65 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e <em>status</em>
6fe0: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 argument is an
6ff0: 62 6f 6f 6c 65 61 6e 20 72 65 70 72 65 73 65 6e boolean represen
7000: 74 69 6e 67 20 74 68 65 0a 09 20 20 76 61 6c 69 ting the.. vali
7010: 64 69 74 79 20 6f 66 20 74 68 65 20 63 75 72 72 dity of the curr
7020: 65 6e 74 20 63 65 72 74 69 66 69 63 61 74 65 2e ent certificate.
7030: 0a 09 20 20 41 20 76 61 6c 75 65 20 6f 66 20 3c .. A value of <
7040: 63 6f 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65 code>0</code> me
7050: 61 6e 73 20 74 68 65 20 63 65 72 74 69 66 69 63 ans the certific
7060: 61 74 65 20 69 73 20 64 65 65 6d 65 64 20 69 6e ate is deemed in
7070: 76 61 6c 69 64 2e 0a 09 20 20 41 20 76 61 6c 75 valid... A valu
7080: 65 20 6f 66 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f e of <code>1</co
7090: 64 65 3e 20 6d 65 61 6e 73 20 74 68 65 20 63 65 de> means the ce
70a0: 72 74 69 66 69 63 61 74 65 20 69 73 20 64 65 65 rtificate is dee
70b0: 6d 65 64 20 76 61 6c 69 64 2e 3c 2f 6c 69 3e 0a med valid.</li>.
70c0: 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 65 . <li>The <em>e
70d0: 72 72 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 rror</em> argume
70e0: 6e 74 20 73 75 70 70 6c 69 65 73 20 74 68 65 20 nt supplies the
70f0: 6d 65 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c message, if any,
7100: 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 generated.. by
7110: 20 3c 63 6f 64 65 3e 58 35 30 39 5f 53 54 4f 52 <code>X509_STOR
7120: 45 5f 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 E_CTX_get_error(
7130: 29 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 )</code>.</li>..
7140: 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 09 </ul>..</dd>..
7150: 3c 62 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 <br>..</dl>.
7160: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c </dd>.</dl>.</bl
7170: 6f 63 6b 71 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 ockquote>..<p>.R
7180: 65 66 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 eference impleme
7190: 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 ntations of thes
71a0: 65 20 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 e callbacks are
71b0: 70 72 6f 76 69 64 65 64 20 69 6e 20 74 68 65 0a provided in the.
71c0: 64 69 73 74 72 69 62 75 74 69 6f 6e 20 61 73 20 distribution as
71d0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c <strong>tls::cal
71e0: 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 20 lback</strong>,
71f0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 <strong>tls::pas
7200: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 0a sword</strong>,.
7210: 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a and <strong>tls:
7220: 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e :validate_comman
7230: 64 3c 2f 73 74 72 6f 6e 67 3e 20 72 65 73 70 65 d</strong> respe
7240: 63 74 69 76 65 6c 79 2e 20 20 4e 6f 74 65 20 74 ctively. Note t
7250: 68 61 74 20 74 68 65 73 65 20 61 72 65 0a 3c 65 hat these are.<e
7260: 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d m>sample</em> im
7270: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 6e plementations on
7280: 6c 79 2e 20 20 49 6e 20 61 20 6d 6f 72 65 20 72 ly. In a more r
7290: 65 61 6c 69 73 74 69 63 20 64 65 70 6c 6f 79 6d ealistic deploym
72a0: 65 6e 74 0a 79 6f 75 20 77 6f 75 6c 64 20 73 70 ent.you would sp
72b0: 65 63 69 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 ecify your own c
72c0: 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 73 20 allback scripts
72d0: 6f 6e 20 65 61 63 68 20 54 4c 53 20 63 68 61 6e on each TLS chan
72e0: 6e 65 6c 20 75 73 69 6e 67 20 74 68 65 0a 3c 73 nel using the.<s
72f0: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f trong>-command</
7300: 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 strong>, <strong
7310: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f >-password</stro
7320: 6e 67 3e 2c 20 61 6e 64 20 3c 73 74 72 6f 6e 67 ng>, and <strong
7330: 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 >-validate_comma
7340: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 nd</strong> opti
7350: 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 ons..</p>..<p>.T
7360: 68 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 he default behav
7370: 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 73 74 ior when the <st
7380: 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 rong>-command</s
7390: 74 72 6f 6e 67 3e 20 61 6e 64 20 3c 73 74 72 6f trong> and <stro
73a0: 6e 67 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d ng>-validate_com
73b0: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 0a 6f 70 mand</strong>.op
73c0: 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20 73 70 tions are not sp
73d0: 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 20 54 ecified is for T
73e0: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 LS to process th
73f0: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 e associated lib
7400: 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 0a 69 rary callbacks.i
7410: 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 68 65 20 64 nternally. The d
7420: 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 efault behavior
7430: 77 68 65 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67 when the <strong
7440: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f >-password</stro
7450: 6e 67 3e 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f ng> option is no
7460: 74 0a 73 70 65 63 69 66 69 65 64 20 69 73 20 66 t.specified is f
7470: 6f 72 20 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 or TLS to proces
7480: 73 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 s the associated
7490: 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 library callbac
74a0: 6b 73 20 62 79 20 61 74 74 65 6d 70 74 69 6e 67 ks by attempting
74b0: 0a 74 6f 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 .to call <strong
74c0: 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f >tls::password</
74d0: 73 74 72 6f 6e 67 3e 2e 0a 54 68 65 20 64 69 66 strong>..The dif
74e0: 66 65 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 ference between
74f0: 74 68 65 73 65 20 74 77 6f 20 62 65 68 61 76 69 these two behavi
7500: 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 ors is a consequ
7510: 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e ence of maintain
7520: 69 6e 67 0a 63 6f 6d 70 61 74 69 62 69 6c 69 74 ing.compatibilit
7530: 79 20 77 69 74 68 20 65 61 72 6c 69 65 72 20 69 y with earlier i
7540: 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a mplementations..
7550: 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 </p>..<p>.The <s
7560: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 trong>tls::debug
7570: 3c 2f 73 74 72 6f 6e 67 3e 20 76 61 72 69 61 62 </strong> variab
7580: 6c 65 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 le provides some
7590: 20 61 64 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 additional.cont
75a0: 72 6f 6c 20 6f 76 65 72 20 74 68 65 73 65 20 72 rol over these r
75b0: 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 eference callbac
75c0: 6b 73 2e 20 20 49 74 73 20 76 61 6c 75 65 20 69 ks. Its value i
75d0: 73 20 7a 65 72 6f 20 62 79 20 64 65 66 61 75 6c s zero by defaul
75e0: 74 2e 0a 48 69 67 68 65 72 20 76 61 6c 75 65 73 t..Higher values
75f0: 20 70 72 6f 64 75 63 65 20 6d 6f 72 65 20 64 69 produce more di
7600: 61 67 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 2c agnostic output,
7610: 20 61 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 and will also f
7620: 6f 72 63 65 20 74 68 65 0a 76 65 72 69 66 79 20 orce the.verify
7630: 6d 65 74 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e method in <stron
7640: 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c g>tls::callback<
7650: 2f 73 74 72 6f 6e 67 3e 20 74 6f 20 61 63 63 65 /strong> to acce
7660: 70 74 20 74 68 65 0a 63 65 72 74 69 66 69 63 61 pt the.certifica
7670: 74 65 2c 20 65 76 65 6e 20 77 68 65 6e 20 69 74 te, even when it
7680: 20 69 73 20 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 is invalid..</p
7690: 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 >..<p>.<em>.The
76a0: 75 73 65 20 6f 66 20 74 68 65 20 72 65 66 65 72 use of the refer
76b0: 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c ence callbacks <
76c0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c strong>tls::call
76d0: 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 3c back</strong>,.<
76e0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 strong>tls::pass
76f0: 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 word</strong>, a
7700: 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a nd <strong>tls::
7710: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 validate_command
7720: 3c 2f 73 74 72 6f 6e 67 3e 0a 69 73 20 6e 6f 74 </strong>.is not
7730: 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 recommended. T
7740: 68 65 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 hey may be remov
7750: 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 ed from future r
7760: 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c eleases..</em>.<
7770: 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 /p>..<p>.<em>.Th
7780: 65 20 75 73 65 20 6f 66 20 74 68 65 20 76 61 72 e use of the var
7790: 69 61 62 6c 65 20 3c 73 74 72 6f 6e 67 3e 74 6c iable <strong>tl
77a0: 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 s::debug</strong
77b0: 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 > is not recomme
77c0: 6e 64 65 64 2e 0a 49 74 20 6d 61 79 20 62 65 20 nded..It may be
77d0: 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 removed from fut
77e0: 75 72 65 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f ure releases..</
77f0: 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 em>.</p>..<h3><a
7800: 20 6e 61 6d 65 3d 22 44 45 42 55 47 22 3e 44 45 name="DEBUG">DE
7810: 42 55 47 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 54 4c BUG</a></h3>..TL
7820: 53 20 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 S key logging ca
7830: 6e 20 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20 n be enabled by
7840: 73 65 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69 setting the envi
7850: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
7860: 0a 3c 62 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c .<b>SSLKEYLOGFIL
7870: 45 3c 2f 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d E</b> to the nam
7880: 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 74 6f e of the file to
7890: 20 6c 6f 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 log to. Then wh
78a0: 65 6e 65 76 65 72 20 54 4c 53 0a 6b 65 79 20 6d enever TLS.key m
78b0: 61 74 65 72 69 61 6c 20 69 73 20 67 65 6e 65 72 aterial is gener
78c0: 61 74 65 64 20 6f 72 20 72 65 63 65 69 76 65 64 ated or received
78d0: 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 it will be logg
78e0: 65 64 20 74 6f 20 74 68 65 20 66 69 6c 65 2e 20 ed to the file.
78f0: 54 68 69 73 0a 69 73 20 75 73 65 66 75 6c 20 66 This.is useful f
7900: 6f 72 20 6c 6f 67 67 69 6e 67 20 6b 65 79 20 64 or logging key d
7910: 61 74 61 20 66 6f 72 20 6e 65 74 77 6f 72 6b 20 ata for network
7920: 6c 6f 67 67 69 6e 67 20 74 6f 6f 6c 73 20 74 6f logging tools to
7930: 20 75 73 65 20 74 6f 0a 64 65 63 72 79 70 74 20 use to.decrypt
7940: 74 68 65 20 64 61 74 61 2e 0a 0a 3c 68 33 3e 3c the data...<h3><
7950: 61 20 6e 61 6d 65 3d 22 48 54 54 50 53 20 45 58 a name="HTTPS EX
7960: 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45 58 41 AMPLE">HTTPS EXA
7970: 4d 50 4c 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c MPLE</a></h3>..<
7980: 70 3e 54 68 69 73 20 65 78 61 6d 70 6c 65 20 75 p>This example u
7990: 73 65 73 20 61 20 73 61 6d 70 6c 65 20 73 65 72 ses a sample ser
79a0: 76 65 72 2e 70 65 6d 20 70 72 6f 76 69 64 65 64 ver.pem provided
79b0: 20 77 69 74 68 20 74 68 65 20 54 4c 53 20 72 65 with the TLS re
79c0: 6c 65 61 73 65 2c 0a 63 6f 75 72 74 65 73 79 20 lease,.courtesy
79d0: 6f 66 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 4f of the <strong>O
79e0: 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 penSSL</strong>
79f0: 70 72 6f 6a 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 project.</p>..<p
7a00: 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67 re><code>.packag
7a10: 65 20 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 e require http.p
7a20: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 ackage require t
7a30: 6c 73 0a 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 ls..http::regist
7a40: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 er https 443 [li
7a50: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 st ::tls::socket
7a60: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 -autoservername
7a70: 20 74 72 75 65 20 2d 72 65 71 75 69 72 65 20 74 true -require t
7a80: 72 75 65 20 2d 63 61 64 69 72 20 2f 65 74 63 2f rue -cadir /etc/
7a90: 73 73 6c 2f 63 65 72 74 73 5d 0a 0a 73 65 74 20 ssl/certs]..set
7aa0: 74 6f 6b 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 tok [http::getur
7ab0: 6c 20 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 l https://www.tc
7ac0: 6c 2e 74 6b 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f l.tk/].</code></
7ad0: 70 72 65 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d pre>..<h3><a nam
7ae0: 65 3d 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 e="SPECIAL CONSI
7af0: 44 45 52 41 54 49 4f 4e 53 22 3e 53 50 45 43 49 DERATIONS">SPECI
7b00: 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e AL CONSIDERATION
7b10: 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 S</a></h3>..<p>T
7b20: 68 65 20 63 61 70 61 62 69 6c 69 74 69 65 73 20 he capabilities
7b30: 6f 66 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 of this package
7b40: 63 61 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 can vary enormou
7b50: 73 6c 79 20 62 61 73 65 64 20 75 70 6f 6e 20 68 sly based upon h
7b60: 6f 77 20 79 6f 75 72 0a 4f 70 65 6e 53 53 4c 20 ow your.OpenSSL
7b70: 6c 69 62 72 61 72 79 20 77 61 73 20 63 6f 6e 66 library was conf
7b80: 69 67 75 72 65 64 20 61 6e 64 20 62 75 69 6c 74 igured and built
7b90: 2e 20 4e 65 77 20 76 65 72 73 69 6f 6e 73 20 6d . New versions m
7ba0: 61 79 20 6f 62 73 6f 6c 65 74 65 20 6f 6c 64 65 ay obsolete olde
7bb0: 72 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 r.protocol versi
7bc0: 6f 6e 73 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f ons, add or remo
7bd0: 76 65 20 63 69 70 68 65 72 73 2c 20 63 68 61 6e ve ciphers, chan
7be0: 67 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 ge default value
7bf0: 73 2c 20 65 74 63 2e 20 55 73 65 20 74 68 65 0a s, etc. Use the.
7c00: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 <strong>tls::cip
7c10: 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e hers</strong> an
7c20: 64 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 d <strong>tls::p
7c30: 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 rotocols</strong
7c40: 3e 20 63 6f 6d 6d 61 6e 64 73 20 74 6f 0a 6f 62 > commands to.ob
7c50: 74 61 69 6e 20 74 68 65 20 73 75 70 70 6f 72 74 tain the support
7c60: 65 64 20 76 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e ed versions.</p>
7c70: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 ..<h3><a name="S
7c80: 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 EE ALSO">SEE ALS
7c90: 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c O</a></h3>..<p><
7ca0: 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 strong>socket</s
7cb0: 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e trong>, <strong>
7cc0: 66 69 6c 65 65 76 65 6e 74 2c 20 3c 2f 73 74 72 fileevent, </str
7cd0: 6f 6e 67 3e 3c 61 0a 68 72 65 66 3d 22 68 74 74 ong><a.href="htt
7ce0: 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e p://www.openssl.
7cf0: 6f 72 67 2f 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 org/"><strong>Op
7d00: 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f enSSL</strong></
7d10: 61 3e 3c 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 a></p>..<hr>..<p
7d20: 72 65 3e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 re>.Copyright &c
7d30: 6f 70 79 3b 20 31 39 39 39 20 4d 61 74 74 20 4e opy; 1999 Matt N
7d40: 65 77 6d 61 6e 2e 0a 43 6f 70 79 72 69 67 68 74 ewman..Copyright
7d50: 20 26 63 6f 70 79 3b 20 32 30 30 34 20 53 74 61 © 2004 Sta
7d60: 72 66 69 73 68 20 53 79 73 74 65 6d 73 2e 0a 3c rfish Systems..<
7d70: 2f 70 72 65 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f /pre>.</body>.</
7d80: 68 74 6d 6c 3e 0a html>.