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 70 72 6f 74 6f 63 6f 6c 20 b> <em>protocol
0470: 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 6f ?verbose? ?suppo
0480: 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a rted?</em></dd>.
0490: 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a . <dd><b>tls:
04a0: 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f :protocols</b></
04b0: 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e dd>.. <dd><b>
04c0: 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e tls::version</b>
04d0: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74 3e 26 </dd>.. <dt>&
04e0: 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20 20 20 nbsp;</dt>..
04f0: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 68 61 73 68 <dd><b>tls::hash
0500: 3c 2f 62 3e 20 3c 65 6d 3e 74 79 70 65 20 64 61 </b> <em>type da
0510: 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 ta</em></dd>..
0520: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 <dd><b>tls::md
0530: 34 3c 2f 62 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 4</b> <em>data</
0540: 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 em></dd>.. <d
0550: 64 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 35 3c 2f 62 d><b>tls::md5</b
0560: 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c > <em>data</em><
0570: 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 /dd>.. <dd><b
0580: 3e 74 6c 73 3a 3a 73 68 61 31 3c 2f 62 3e 20 3c >tls::sha1</b> <
0590: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 em>data</em></dd
05a0: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c >.. <dd><b>tl
05b0: 73 3a 3a 73 68 61 32 35 36 3c 2f 62 3e 20 3c 65 s::sha256</b> <e
05c0: 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e m>data</em></dd>
05d0: 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 ..</dl>. </dd
05e0: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 >. <dd><a hre
05f0: 66 3d 22 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f f="#COMMANDS">CO
0600: 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a MMANDS</a></dd>.
0610: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d <dd><a href=
0620: 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f "#CALLBACK OPTIO
0630: 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 NS">CALLBACK OPT
0640: 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 IONS</a></dd>.
0650: 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 <dd><a href="#
0660: 48 54 54 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 HTTPS EXAMPLE">H
0670: 54 54 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e TTPS EXAMPLE</a>
0680: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 </dd>. <dd><a
0690: 20 68 72 65 66 3d 22 23 53 45 45 20 41 4c 53 4f href="#SEE ALSO
06a0: 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 ">SPECIAL CONSID
06b0: 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 ERATIONS</a></dd
06c0: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 >. <dd><a hre
06d0: 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 45 f="#SEE ALSO">SE
06e0: 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a E ALSO</a></dd>.
06f0: 3c 2f 64 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 </dl>..<hr>..<h3
0700: 3e 3c 61 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e ><a name="NAME">
0710: 4e 41 4d 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c NAME</a></h3>..<
0720: 70 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 p><strong>tls</s
0730: 74 72 6f 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 trong> - binding
0740: 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e to <strong>Open
0750: 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f 6f SSL</strong>.too
0760: 6c 6b 69 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c lkit.</p>..<h3><
0770: 61 20 6e 61 6d 65 3d 22 53 59 4e 4f 50 53 49 53 a name="SYNOPSIS
0780: 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f ">SYNOPSIS</a></
0790: 68 33 3e 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b 61 h3>..<p><b>packa
07a0: 67 65 20 72 65 71 75 69 72 65 20 54 63 6c 20 38 ge require Tcl 8
07b0: 2e 35 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70 61 .5</b><br>.<b>pa
07c0: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c ckage require tl
07d0: 73 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c s</b><br>.<br>.<
07e0: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6e a href="#tls::in
07f0: 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 it"><b>tls::init
0800: 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 </b> <i>?options
0810: 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 ?</i></a><br>.<a
0820: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 href="#tls::soc
0830: 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 ket"><b>tls::soc
0840: 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 ket</b> <i>?opti
0850: 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f ons? host port</
0860: 69 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 i><br>.<a href="
0870: 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 #tls::socket"><b
0880: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e >tls::socket</b>
0890: 20 3c 69 3e 3f 2d 73 65 72 76 65 72 20 63 6f 6d <i>?-server com
08a0: 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 mand? ?options?
08b0: 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e port</i></a><br>
08c0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
08d0: 73 74 61 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a status"><b>tls::
08e0: 73 74 61 74 75 73 3c 2f 62 3e 20 3c 69 3e 3f 2d status</b> <i>?-
08f0: 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f local? channel</
0900: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
0910: 65 66 3d 22 23 74 6c 73 3a 3a 63 6f 6e 6e 65 63 ef="#tls::connec
0920: 74 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 63 6f tion"><b>tls::co
0930: 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 3e nnection</b> <i>
0940: 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c channel</i></a><
0950: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0960: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 22 3e 3c 62 s::handshake"><b
0970: 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c >tls::handshake<
0980: 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f /b> <i>channel</
0990: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
09a0: 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 ef="#tls::import
09b0: 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 "><b>tls::import
09c0: 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 20 </b> <i>channel
09d0: 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 ?options?</i></a
09e0: 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 ><br>.<a href="#
09f0: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c tls::unimport"><
0a00: 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c b>tls::unimport<
0a10: 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f /b> <i>channel</
0a20: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a i></a><br>.<br>.
0a30: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 <a href="#tls::c
0a40: 69 70 68 65 72 73 22 3e 3c 62 3e 74 6c 73 3a 3a iphers"><b>tls::
0a50: 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c 69 3e 70 ciphers</b> <i>p
0a60: 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 rotocol ?verbose
0a70: 3f 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f 69 ? ?supported?</i
0a80: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 ></a><br>.<a hre
0a90: 66 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f f="#tls::protoco
0aa0: 6c 73 22 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 ls"><b>tls::prot
0ab0: 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 ocols</b></a><br
0ac0: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a >.<a href="#tls:
0ad0: 3a 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74 6c 73 :version"><b>tls
0ae0: 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 ::version</b></a
0af0: 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 ><br>.<br>.<a hr
0b00: 65 66 3d 22 23 74 6c 73 3a 3a 68 61 73 68 22 3e ef="#tls::hash">
0b10: 3c 62 3e 74 6c 73 3a 3a 68 61 73 68 3c 2f 62 3e <b>tls::hash</b>
0b20: 20 3c 69 3e 74 79 70 65 20 64 61 74 61 3c 2f 69 <i>type data</i
0b30: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 ></a><br>.<a hre
0b40: 66 3d 22 23 74 6c 73 3a 3a 6d 64 34 22 3e 3c 62 f="#tls::md4"><b
0b50: 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 62 3e 20 3c 69 >tls::md4</b> <i
0b60: 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 >data</i></a><br
0b70: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a >.<a href="#tls:
0b80: 3a 6d 64 35 22 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 :md5"><b>tls::md
0b90: 35 3c 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 5</b> <i>data</i
0ba0: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 ></a><br>.<a hre
0bb0: 66 3d 22 23 74 6c 73 3a 3a 73 68 61 31 22 3e 3c f="#tls::sha1"><
0bc0: 62 3e 74 6c 73 3a 3a 73 68 61 31 3c 2f 62 3e 20 b>tls::sha1</b>
0bd0: 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c <i>data</i></a><
0be0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c br>.<a href="#tl
0bf0: 73 3a 3a 73 68 61 32 35 36 22 3e 3c 62 3e 74 6c s::sha256"><b>tl
0c00: 73 3a 3a 73 68 61 32 35 36 3c 2f 62 3e 20 3c 69 s::sha256</b> <i
0c10: 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 >data</i></a><br
0c20: 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e >.</p>..<h3><a n
0c30: 61 6d 65 3d 22 44 45 53 43 52 49 50 54 49 4f 4e ame="DESCRIPTION
0c40: 22 3e 44 45 53 43 52 49 50 54 49 4f 4e 3c 2f 61 ">DESCRIPTION</a
0c50: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 ></h3>..<p>This
0c60: 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64 extension provid
0c70: 65 73 20 61 20 67 65 6e 65 72 69 63 20 62 69 6e es a generic bin
0c80: 64 69 6e 67 20 74 6f 20 3c 61 0a 68 72 65 66 3d ding to <a.href=
0c90: 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e "http://www.open
0ca0: 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 ssl.org/">OpenSS
0cb0: 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e 67 L</a>, utilizing
0cc0: 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 54 63 6c the.<strong>Tcl
0cd0: 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f 73 _StackChannel</s
0ce0: 74 72 6f 6e 67 3e 0a 41 50 49 20 66 6f 72 20 54 trong>.API for T
0cf0: 63 6c 20 38 2e 34 20 61 6e 64 20 68 69 67 68 65 cl 8.4 and highe
0d00: 72 2e 20 54 68 65 20 73 6f 63 6b 65 74 73 20 62 r. The sockets b
0d10: 65 68 61 76 65 20 65 78 61 63 74 6c 79 20 74 68 ehave exactly th
0d20: 65 20 73 61 6d 65 0a 61 73 20 63 68 61 6e 6e 65 e same.as channe
0d30: 6c 73 20 63 72 65 61 74 65 64 20 75 73 69 6e 67 ls created using
0d40: 20 54 63 6c 27 73 20 62 75 69 6c 74 2d 69 6e 20 Tcl's built-in
0d50: 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f <strong>socket</
0d60: 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 20 strong>.command
0d70: 77 69 74 68 20 61 64 64 69 74 69 6f 6e 61 6c 20 with additional
0d80: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f 6e 74 options for cont
0d90: 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 53 4c 20 rolling the SSL
0da0: 73 65 73 73 69 6f 6e 2e 0a 3c 2f 70 3e 0a 0a 3c session..</p>..<
0db0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f 4d 4d h3><a name="COMM
0dc0: 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f ANDS">COMMANDS</
0dd0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 70 69 a></h3>..<p>Typi
0de0: 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c 64 20 cally one would
0df0: 75 73 65 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e use the <strong>
0e00: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 73 74 tls::socket </st
0e10: 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 68 69 rong>command.whi
0e20: 63 68 20 70 72 6f 76 69 64 65 73 20 63 6f 6d 70 ch provides comp
0e30: 61 74 69 62 69 6c 69 74 79 20 77 69 74 68 20 74 atibility with t
0e40: 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 he native Tcl <s
0e50: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 trong>socket</st
0e60: 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e 20 49 rong>.command. I
0e70: 6e 20 73 75 63 68 20 63 61 73 65 73 20 3c 73 74 n such cases <st
0e80: 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 rong>tls::import
0e90: 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f 75 6c 64 </strong> should
0ea0: 20 6e 6f 74 20 62 65 0a 75 73 65 64 20 64 69 72 not be.used dir
0eb0: 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 6c 3e ectly.</p>..<dl>
0ec0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
0ed0: 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e ="tls::init"><b>
0ee0: 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e 3c 69 tls::init </b><i
0ef0: 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f >?options?</i></
0f00: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e a></dt>. <dd>
0f10: 4f 70 74 69 6f 6e 61 6c 20 66 75 6e 63 74 69 6f Optional functio
0f20: 6e 20 74 6f 20 73 65 74 20 74 68 65 20 64 65 66 n to set the def
0f30: 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20 75 73 65 ault options use
0f40: 64 20 62 79 0a 09 3c 73 74 72 6f 6e 67 3e 74 6c d by..<strong>tl
0f50: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e s::socket</stron
0f60: 67 3e 2e 20 49 66 20 79 6f 75 20 63 61 6c 6c 20 g>. If you call
0f70: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 <strong>tls::imp
0f80: 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 64 69 ort</strong>..di
0f90: 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f 75 74 rectly this rout
0fa0: 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 65 63 ine has no effec
0fb0: 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 6f 70 t. Any of the op
0fc0: 74 69 6f 6e 73 0a 09 74 68 61 74 20 3c 73 74 72 tions..that <str
0fd0: 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c ong>tls::socket<
0fe0: 2f 73 74 72 6f 6e 67 3e 20 61 63 63 65 70 74 73 /strong> accepts
0ff0: 20 63 61 6e 20 62 65 20 73 65 74 0a 09 75 73 69 can be set..usi
1000: 6e 67 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c ng this command,
1010: 20 74 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 though you shou
1020: 6c 64 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 ld limit your op
1030: 74 69 6f 6e 73 0a 09 74 6f 20 6f 6e 6c 79 20 54 tions..to only T
1040: 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 2e LS related ones.
1050: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e </dd>. <dt>&n
1060: 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 bsp;</dt>. <d
1070: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
1080: 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a socket"><b>tls::
1090: 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f socket </b><em>?
10a0: 6f 70 74 69 6f 6e 73 3f 0a 09 68 6f 73 74 20 70 options?..host p
10b0: 6f 72 74 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 ort</em></a></dt
10c0: 3e 0a 20 20 20 20 3c 64 74 3e 3c 62 3e 74 6c 73 >. <dt><b>tls
10d0: 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e ::socket</b><em>
10e0: 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e ?-server comman
10f0: 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 d? ?options? por
1100: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 t</em></dt>.
1110: 3c 64 64 3e 54 68 69 73 20 69 73 20 61 20 68 65 <dd>This is a he
1120: 6c 70 65 72 20 66 75 6e 63 74 69 6f 6e 20 74 68 lper function th
1130: 61 74 20 75 74 69 6c 69 7a 65 73 20 74 68 65 20 at utilizes the
1140: 75 6e 64 65 72 6c 79 69 6e 67 0a 09 63 6f 6d 6d underlying..comm
1150: 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 3e 74 6c ands (<strong>tl
1160: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e s::import</stron
1170: 67 3e 29 2e 20 49 74 20 62 65 68 61 76 65 73 0a g>). It behaves.
1180: 09 65 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d .exactly the sam
1190: 65 20 61 73 20 74 68 65 20 6e 61 74 69 76 65 20 e as the native
11a0: 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b Tcl <strong>sock
11b0: 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 63 6f 6d et</strong>..com
11c0: 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 61 74 mand except that
11d0: 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 6e the options can
11e0: 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66 20 include any of
11f0: 74 68 65 0a 09 61 70 70 6c 69 63 61 62 6c 65 20 the..applicable
1200: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 <a href="#tls::i
1210: 6d 70 6f 72 74 22 3e 3c 73 74 72 6f 6e 67 3e 74 mport"><strong>t
1220: 6c 73 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e ls:import</stron
1230: 67 3e 3c 2f 61 3e 0a 09 6f 70 74 69 6f 6e 73 20 g></a>..options
1240: 77 69 74 68 20 6f 6e 65 20 61 64 64 69 74 69 6f with one additio
1250: 6e 61 6c 20 6f 70 74 69 6f 6e 3a 0a 3c 62 6c 6f nal option:.<blo
1260: 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c ckquote>. <dl
1270: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1280: 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 3c 2f autoservername</
1290: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c strong> <em>bool
12a0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
12b0: 41 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 65 Automatically se
12c0: 6e 64 20 74 68 65 20 2d 73 65 72 76 65 72 6e 61 nd the -serverna
12d0: 6d 65 20 61 73 20 74 68 65 20 3c 65 6d 3e 68 6f me as the <em>ho
12e0: 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 st</em> argument
12f0: 0a 09 20 20 20 20 28 64 65 66 61 75 6c 74 20 69 .. (default i
1300: 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e s <em>false</em>
1310: 29 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e )</dd>. </dl>
1320: 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a .</blockquote>..
1330: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d <dt><a name=
1340: 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 "tls::import"><b
1350: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c 2f 62 >tls::import </b
1360: 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a 09 3f 6f 70 ><i>channel..?op
1370: 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f tions?</i></a></
1380: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 53 53 4c 2d dt>. <dd>SSL-
1390: 65 6e 61 62 6c 65 20 61 20 72 65 67 75 6c 61 72 enable a regular
13a0: 20 54 63 6c 20 63 68 61 6e 6e 65 6c 20 2d 20 69 Tcl channel - i
13b0: 74 20 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 0a t need not be a.
13c0: 09 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 .socket, but mus
13d0: 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 t provide bi-dir
13e0: 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 ectional flow. A
13f0: 6c 73 6f 0a 09 73 65 74 74 69 6e 67 20 73 65 73 lso..setting ses
1400: 73 69 6f 6e 20 70 61 72 61 6d 65 74 65 72 73 20 sion parameters
1410: 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 68 61 6b for SSL handshak
1420: 65 2e 3c 2f 64 64 3e 0a 0a 3c 62 6c 6f 63 6b 71 e.</dd>..<blockq
1430: 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 uote>. <dl>..
1440: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 6c 70 <dt><strong>-alp
1450: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c n</strong> <em>l
1460: 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ist</em></dt>..<
1470: 64 64 3e 4c 69 73 74 20 6f 66 20 70 72 6f 74 6f dd>List of proto
1480: 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 20 64 75 cols to offer du
1490: 72 69 6e 67 20 41 70 70 6c 69 63 61 74 69 6f 6e ring Application
14a0: 2d 4c 61 79 65 72 0a 09 20 20 20 20 50 72 6f 74 -Layer.. Prot
14b0: 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e ocol Negotiation
14c0: 20 28 41 4c 50 4e 29 2e 20 46 6f 72 20 65 78 61 (ALPN). For exa
14d0: 6d 70 6c 65 3a 20 3c 65 6d 3e 68 32 3c 2f 65 6d mple: <em>h2</em
14e0: 3e 20 61 6e 64 0a 09 20 20 20 20 3c 65 6d 3e 68 > and.. <em>h
14f0: 74 74 70 2f 31 2e 31 3c 2f 65 6d 3e 2c 20 62 75 ttp/1.1</em>, bu
1500: 74 20 6e 6f 74 20 3c 65 6d 3e 68 33 3c 2f 65 6d t not <em>h3</em
1510: 3e 20 6f 72 20 3c 65 6d 3e 71 75 69 63 3c 2f 65 > or <em>quic</e
1520: 6d 3e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 m>.</dd>..<dt><s
1530: 74 72 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74 trong>-cadir</st
1540: 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 rong> <em>dir</e
1550: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 m></dt>..<dd>Set
1560: 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69 63 the CA certific
1570: 61 74 65 73 20 70 61 74 68 2e 20 54 68 65 20 64 ates path. The d
1580: 65 66 61 75 6c 74 20 64 69 72 65 63 74 6f 72 79 efault directory
1590: 20 69 73 20 70 6c 61 74 66 6f 72 6d 0a 09 20 20 is platform..
15a0: 20 20 73 70 65 63 69 66 69 63 20 61 6e 64 20 63 specific and c
15b0: 61 6e 20 62 65 20 73 65 74 20 61 74 20 63 6f 6d an be set at com
15c0: 70 69 6c 65 20 74 69 6d 65 2e 20 54 68 69 73 20 pile time. This
15d0: 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 can be overridde
15e0: 6e 0a 09 20 20 20 20 76 69 61 20 74 68 65 20 3c n.. via the <
15f0: 62 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f b>SSL_CERT_DIR</
1600: 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 b> environment v
1610: 61 72 69 61 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c ariable.</dd>..<
1620: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69 dt><strong>-cafi
1630: 6c 65 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e le </strong><em>
1640: 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 filename</em></d
1650: 74 3e 0a 09 3c 64 64 3e 53 65 74 20 74 68 65 20 t>..<dd>Set the
1660: 63 65 72 74 69 66 69 63 61 74 65 20 61 75 74 68 certificate auth
1670: 6f 72 69 74 79 20 28 43 41 29 20 63 65 72 74 69 ority (CA) certi
1680: 66 69 63 61 74 65 73 20 66 69 6c 65 2e 20 54 68 ficates file. Th
1690: 65 20 64 65 66 61 75 6c 74 0a 09 20 20 20 20 69 e default.. i
16a0: 73 20 74 68 65 20 63 65 72 74 2e 70 65 6d 20 66 s the cert.pem f
16b0: 69 6c 65 20 69 6e 20 74 68 65 20 4f 70 73 6e 53 ile in the OpsnS
16c0: 53 4c 20 64 69 72 65 63 74 6f 72 79 2e 20 54 68 SL directory. Th
16d0: 69 73 20 63 61 6e 20 61 6c 73 6f 20 62 65 0a 09 is can also be..
16e0: 20 20 20 20 6f 76 65 72 72 69 64 64 65 6e 20 76 overridden v
16f0: 69 61 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 ia the <b>SSL_CE
1700: 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 RT_FILE</b> envi
1710: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
1720: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
1730: 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 73 ong>-certfile</s
1740: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e trong> <em>filen
1750: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ame</em></dt>..<
1760: 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 66 dd>Specify the f
1770: 69 6c 65 6e 61 6d 65 20 77 69 74 68 20 74 68 65 ilename with the
1780: 20 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 certificate to
1790: 75 73 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c use.</dd>..<dt><
17a0: 73 74 72 6f 6e 67 3e 2d 63 65 72 74 3c 2f 73 74 strong>-cert</st
17b0: 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 rong> <em>filena
17c0: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 me</em></dt>..<d
17d0: 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 63 6f d>Specify the co
17e0: 6e 74 65 6e 74 73 20 6f 66 20 61 20 63 65 72 74 ntents of a cert
17f0: 69 66 69 63 61 74 65 20 74 6f 20 75 73 65 2c 20 ificate to use,
1800: 61 73 20 61 20 44 45 52 0a 09 20 20 20 20 65 6e as a DER.. en
1810: 63 6f 64 65 64 20 62 69 6e 61 72 79 20 76 61 6c coded binary val
1820: 75 65 20 28 58 2e 35 30 39 20 44 45 52 29 2e 3c ue (X.509 DER).<
1830: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1840: 67 3e 2d 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e g>-cipher</stron
1850: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
1860: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 m></dt>..<dd>Lis
1870: 74 20 6f 66 20 63 69 70 68 65 72 73 20 74 6f 20 t of ciphers to
1880: 75 73 65 2e 20 53 74 72 69 6e 67 20 69 73 20 61 use. String is a
1890: 20 63 6f 6c 6f 6e 20 28 22 3a 22 29 20 73 65 70 colon (":") sep
18a0: 61 72 61 74 65 64 20 6c 69 73 74 0a 09 20 20 20 arated list..
18b0: 20 6f 66 20 63 69 70 68 65 72 73 20 6f 72 20 63 of ciphers or c
18c0: 69 70 68 65 72 20 73 75 69 74 65 73 2e 20 43 69 ipher suites. Ci
18d0: 70 68 65 72 20 73 75 69 74 65 73 20 63 61 6e 20 pher suites can
18e0: 62 65 20 63 6f 6d 62 69 6e 65 64 0a 09 20 20 20 be combined..
18f0: 20 75 73 69 6e 67 20 74 68 65 20 3c 62 3e 2b 3c using the <b>+<
1900: 2f 62 3e 20 63 68 61 72 61 63 74 65 72 2e 20 50 /b> character. P
1910: 72 65 66 69 78 65 73 20 63 61 6e 20 62 65 20 75 refixes can be u
1920: 73 65 64 20 74 6f 20 70 65 72 6d 61 6e 65 6e 74 sed to permanent
1930: 6c 79 0a 09 20 20 20 20 72 65 6d 6f 76 65 20 28 ly.. remove (
1940: 22 21 22 29 2c 20 64 65 6c 65 74 65 20 28 22 2d "!"), delete ("-
1950: 22 29 2c 20 6f 72 20 6d 6f 76 65 20 61 20 63 79 "), or move a cy
1960: 70 68 65 72 20 74 6f 20 74 68 65 20 65 6e 64 20 pher to the end
1970: 6f 66 0a 09 20 20 20 20 74 68 65 20 6c 69 73 74 of.. the list
1980: 20 28 22 2b 22 29 2e 20 4b 65 79 77 6f 72 64 73 ("+"). Keywords
1990: 20 3c 62 3e 40 53 54 52 45 4e 47 54 48 3c 2f 62 <b>@STRENGTH</b
19a0: 3e 20 28 73 6f 72 74 20 62 79 20 61 6c 67 6f 72 > (sort by algor
19b0: 69 74 68 6d 0a 09 20 20 20 20 6b 65 79 20 6c 65 ithm.. key le
19c0: 6e 67 74 68 29 2c 20 3c 62 3e 40 53 45 43 4c 45 ngth), <b>@SECLE
19d0: 56 45 4c 3d 3c 2f 62 3e 3c 69 3e 6e 3c 2f 69 3e VEL=</b><i>n</i>
19e0: 20 28 73 65 74 20 73 65 63 75 72 69 74 79 20 6c (set security l
19f0: 65 76 65 6c 20 74 6f 0a 09 20 20 20 20 6e 29 2c evel to.. n),
1a00: 20 61 6e 64 20 3c 62 3e 44 45 46 41 55 4c 54 3c and <b>DEFAULT<
1a10: 2f 62 3e 20 28 75 73 65 20 64 65 66 61 75 6c 74 /b> (use default
1a20: 20 63 69 70 68 65 72 20 6c 69 73 74 2c 20 61 74 cipher list, at
1a30: 20 73 74 61 72 74 20 6f 6e 6c 79 29 0a 09 20 20 start only)..
1a40: 20 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 70 can also be sp
1a50: 65 63 69 66 69 65 64 2e 20 53 65 65 20 4f 70 65 ecified. See Ope
1a60: 6e 53 53 4c 20 64 6f 63 75 6d 65 6e 74 61 74 69 nSSL documentati
1a70: 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 6c 6c 0a on for the full.
1a80: 09 20 20 20 20 6c 69 73 74 20 6f 66 20 76 61 6c . list of val
1a90: 69 64 20 76 61 6c 75 65 73 2e 20 28 54 4c 53 20 id values. (TLS
1aa0: 31 2e 32 20 61 6e 64 20 65 61 72 6c 69 65 72 20 1.2 and earlier
1ab0: 6f 6e 6c 79 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e only)</dd>..<dt>
1ac0: 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 73 <strong>-ciphers
1ad0: 75 69 74 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c uites</strong> <
1ae0: 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f em>string</em></
1af0: 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 dt>..<dd>List of
1b00: 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74 cipher suites t
1b10: 6f 20 75 73 65 2e 20 53 74 72 69 6e 67 20 69 73 o use. String is
1b20: 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22 29 0a 09 a colon (":")..
1b30: 20 20 20 20 73 65 70 61 72 61 74 65 64 20 6c 69 separated li
1b40: 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 st of cipher sui
1b50: 74 65 20 6e 61 6d 65 73 2e 20 28 54 4c 53 20 31 te names. (TLS 1
1b60: 2e 33 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a 09 3c .3 only)</dd>..<
1b70: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d dt><strong>-comm
1b80: 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d and</strong> <em
1b90: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f >callback</em></
1ba0: 64 74 3e 0a 09 3c 64 64 3e 43 61 6c 6c 62 61 63 dt>..<dd>Callbac
1bb0: 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 61 74 20 73 k to invoke at s
1bc0: 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 everal points du
1bd0: 72 69 6e 67 20 74 68 65 20 68 61 6e 64 73 68 61 ring the handsha
1be0: 6b 65 2e 0a 09 20 20 20 20 54 68 69 73 20 69 73 ke... This is
1bf0: 20 75 73 65 64 20 74 6f 20 70 61 73 73 20 65 72 used to pass er
1c00: 72 6f 72 73 20 61 6e 64 20 74 72 61 63 69 6e 67 rors and tracing
1c10: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e information, an
1c20: 64 0a 09 20 20 20 20 69 74 20 63 61 6e 20 61 6c d.. it can al
1c30: 6c 6f 77 20 54 63 6c 20 73 63 72 69 70 74 73 20 low Tcl scripts
1c40: 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 69 72 to perform their
1c50: 20 6f 77 6e 20 63 65 72 74 69 66 69 63 61 74 65 own certificate
1c60: 0a 09 20 20 20 20 76 61 6c 69 64 61 74 69 6f 6e .. validation
1c70: 20 69 6e 20 70 6c 61 63 65 20 6f 66 20 74 68 65 in place of the
1c80: 20 64 65 66 61 75 6c 74 20 76 61 6c 69 64 61 74 default validat
1c90: 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 62 79 0a ion provided by.
1ca0: 09 20 20 20 20 4f 70 65 6e 53 53 4c 2e 20 53 65 . OpenSSL. Se
1cb0: 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c e <a href="#CALL
1cc0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 BACK OPTIONS">CA
1cd0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f LLBACK OPTIONS</
1ce0: 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 72 74 a>.. for furt
1cf0: 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e 3c her discussion.<
1d00: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1d10: 67 3e 2d 64 68 70 61 72 61 6d 73 20 3c 2f 73 74 g>-dhparams </st
1d20: 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d rong><em>filenam
1d30: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 e</em></dt>..<dd
1d40: 3e 53 70 65 63 69 66 79 20 74 68 65 20 44 69 66 >Specify the Dif
1d50: 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 fie-Hellman para
1d60: 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 meters file.</dd
1d70: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1d80: 6b 65 79 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e keyfile</strong>
1d90: 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 <em>filename</e
1da0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 m></dt>..<dd>Spe
1db0: 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74 65 cify the private
1dc0: 20 6b 65 79 20 66 69 6c 65 2e 20 28 64 65 66 61 key file. (defa
1dd0: 75 6c 74 20 69 73 0a 09 20 20 20 20 76 61 6c 75 ult is.. valu
1de0: 65 20 6f 66 20 2d 63 65 72 74 66 69 6c 65 29 3c e of -certfile)<
1df0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1e00: 67 3e 2d 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 g>-key</strong>
1e10: 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d <em>filename</em
1e20: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 ></dt>..<dd>Spec
1e30: 69 66 79 20 74 68 65 20 70 72 69 76 61 74 65 20 ify the private
1e40: 6b 65 79 20 74 6f 20 75 73 65 20 61 73 20 61 20 key to use as a
1e50: 44 45 52 20 65 6e 63 6f 64 65 64 20 76 61 6c 75 DER encoded valu
1e60: 65 20 28 50 4b 43 53 23 31 20 44 45 52 29 3c 2f e (PKCS#1 DER)</
1e70: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
1e80: 3e 2d 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e >-model</strong>
1e90: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d <em>channel</em
1ea0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 46 6f 72 63 ></dt>..<dd>Forc
1eb0: 65 20 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 e this channel t
1ec0: 6f 20 73 68 61 72 65 20 74 68 65 20 73 61 6d 65 o share the same
1ed0: 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c <em><strong>SSL
1ee0: 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65 _CTX</strong></e
1ef0: 6d 3e 0a 09 20 20 20 20 73 74 72 75 63 74 75 72 m>.. structur
1f00: 65 20 61 73 20 74 68 65 20 73 70 65 63 69 66 69 e as the specifi
1f10: 65 64 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f ed <em>channel</
1f20: 65 6d 3e 2c 20 61 6e 64 0a 09 20 20 20 20 74 68 em>, and.. th
1f30: 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 63 61 erefore share ca
1f40: 6c 6c 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 llbacks etc.</dd
1f50: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
1f60: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 password</strong
1f70: 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f > <em>callback</
1f80: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 em></dt>..<dd>Ca
1f90: 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 llback to invoke
1fa0: 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 when OpenSSL ne
1fb0: 65 64 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 20 eds to obtain a
1fc0: 70 61 73 73 77 6f 72 64 2c 0a 09 20 20 20 20 74 password,.. t
1fd0: 79 70 69 63 61 6c 6c 79 20 74 6f 20 75 6e 6c 6f ypically to unlo
1fe0: 63 6b 20 74 68 65 20 70 72 69 76 61 74 65 20 6b ck the private k
1ff0: 65 79 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 ey of a certific
2000: 61 74 65 2e 20 54 68 65 0a 09 20 20 20 20 63 61 ate. The.. ca
2010: 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 llback should re
2020: 74 75 72 6e 20 61 20 73 74 72 69 6e 67 20 77 68 turn a string wh
2030: 69 63 68 20 72 65 70 72 65 73 65 6e 74 73 20 74 ich represents t
2040: 68 65 20 70 61 73 73 77 6f 72 64 0a 09 20 20 20 he password..
2050: 20 74 6f 20 62 65 20 75 73 65 64 2e 20 53 65 65 to be used. See
2060: 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 <a href="#CALLB
2070: 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c ACK OPTIONS">CAL
2080: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 LBACK OPTIONS</a
2090: 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 72 74 68 >.. for furth
20a0: 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f er discussion.</
20b0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
20c0: 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 >-post_handshake
20d0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
20e0: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ol</em></dt>..<d
20f0: 64 3e 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 61 6e d>Allow post-han
2100: 64 73 68 61 6b 65 20 74 69 63 6b 65 74 20 75 70 dshake ticket up
2110: 64 61 74 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 dates.</dd>..<dt
2120: 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 ><strong>-reques
2130: 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 t </strong><em>b
2140: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ool</em></dt>..<
2150: 64 64 3e 52 65 71 75 65 73 74 20 61 20 63 65 72 dd>Request a cer
2160: 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65 tificate from pe
2170: 65 72 20 64 75 72 69 6e 67 20 53 53 4c 20 68 61 er during SSL ha
2180: 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 28 64 ndshake... (d
2190: 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 efault is <em>tr
21a0: 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c ue</em>)</dd>..<
21b0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 dt><strong>-requ
21c0: 69 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ire</strong> <em
21d0: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
21e0: 09 3c 64 64 3e 52 65 71 75 69 72 65 20 61 20 76 .<dd>Require a v
21f0: 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65 alid certificate
2200: 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e from peer durin
2210: 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e g SSL handshake.
2220: 0a 09 20 20 20 20 49 66 20 74 68 69 73 20 69 73 .. If this is
2230: 20 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68 set to true, th
2240: 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 en <strong>-requ
2250: 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 6d 75 73 est</strong> mus
2260: 74 0a 09 20 20 20 20 61 6c 73 6f 20 62 65 20 73 t.. also be s
2270: 65 74 20 74 6f 20 74 72 75 65 2e 20 28 64 65 66 et to true. (def
2280: 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 ault is <em>fals
2290: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 e</em>)</dd>..<d
22a0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 63 75 72 t><strong>-secur
22b0: 69 74 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 itylevel</strong
22c0: 3e 20 3c 65 6d 3e 69 6e 74 65 67 65 72 3c 2f 65 > <em>integer</e
22d0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 m></dt>..<dd>Set
22e0: 20 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 2e security level.
22f0: 20 4d 75 73 74 20 62 65 20 30 20 74 6f 20 35 2e Must be 0 to 5.
2300: 20 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 The security le
2310: 76 65 6c 20 61 66 66 65 63 74 73 0a 09 20 20 20 vel affects..
2320: 20 63 69 70 68 65 72 20 73 75 69 74 65 20 65 6e cipher suite en
2330: 63 72 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 cryption algorit
2340: 68 6d 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 hms, supported E
2350: 43 43 20 63 75 72 76 65 73 2c 0a 09 20 20 20 20 CC curves,..
2360: 73 75 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74 supported signat
2370: 75 72 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 ure algorithms,
2380: 44 48 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a DH parameter siz
2390: 65 73 2c 20 63 65 72 74 69 66 69 63 61 74 65 0a es, certificate.
23a0: 09 20 20 20 20 6b 65 79 20 73 69 7a 65 73 20 61 . key sizes a
23b0: 6e 64 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 nd signature alg
23c0: 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66 orithms. The def
23d0: 61 75 6c 74 20 69 73 20 31 2e 0a 09 20 20 20 20 ault is 1...
23e0: 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 69 67 68 Level 3 and high
23f0: 65 72 20 64 69 73 61 62 6c 65 20 73 75 70 70 6f er disable suppo
2400: 72 74 20 66 6f 72 20 73 65 73 73 69 6f 6e 20 74 rt for session t
2410: 69 63 6b 65 74 73 20 61 6e 64 20 6f 6e 6c 79 0a ickets and only.
2420: 09 20 20 20 20 61 63 63 65 70 74 20 63 69 70 68 . accept ciph
2430: 65 72 20 73 75 69 74 65 73 20 74 68 61 74 20 70 er suites that p
2440: 72 6f 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 rovide forward s
2450: 65 63 72 65 63 79 2e 3c 2f 64 64 3e 0a 09 3c 64 ecrecy.</dd>..<d
2460: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 65 t><strong>-serve
2470: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 r</strong> <em>b
2480: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ool</em></dt>..<
2490: 64 64 3e 48 61 6e 64 73 68 61 6b 65 20 61 73 20 dd>Handshake as
24a0: 73 65 72 76 65 72 20 69 66 20 74 72 75 65 2c 20 server if true,
24b0: 65 6c 73 65 20 68 61 6e 64 73 68 61 6b 65 20 61 else handshake a
24c0: 73 0a 09 20 20 20 20 63 6c 69 65 6e 74 2e 20 28 s.. client. (
24d0: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 default is <em>f
24e0: 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a alse</em>)</dd>.
24f0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 .<dt><strong>-se
2500: 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 rvername</strong
2510: 3e 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c > <em>host</em><
2520: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 /dt>..<dd>Specif
2530: 79 20 73 65 72 76 65 72 20 68 6f 73 74 6e 61 6d y server hostnam
2540: 65 2e 20 4f 6e 6c 79 20 61 76 61 69 6c 61 62 6c e. Only availabl
2550: 65 20 69 66 20 74 68 65 20 4f 70 65 6e 53 53 4c e if the OpenSSL
2560: 20 6c 69 62 72 61 72 79 0a 09 20 20 20 20 74 68 library.. th
2570: 65 20 70 61 63 6b 61 67 65 20 69 73 20 6c 69 6e e package is lin
2580: 6b 65 64 20 61 67 61 69 6e 73 74 20 73 75 70 70 ked against supp
2590: 6f 72 74 73 20 74 68 65 20 54 4c 53 20 68 6f 73 orts the TLS hos
25a0: 74 6e 61 6d 65 20 65 78 74 65 6e 73 69 6f 6e 0a tname extension.
25b0: 09 20 20 20 20 66 6f 72 20 27 53 65 72 76 65 72 . for 'Server
25c0: 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 69 6f 6e Name Indication
25d0: 27 20 28 53 4e 49 29 2e 20 55 73 65 20 74 6f 20 ' (SNI). Use to
25e0: 6e 61 6d 65 20 74 68 65 20 6c 6f 67 69 63 61 6c name the logical
25f0: 20 68 6f 73 74 0a 09 20 20 20 20 77 65 20 61 72 host.. we ar
2600: 65 20 74 61 6c 6b 69 6e 67 20 74 6f 20 61 6e 64 e talking to and
2610: 20 65 78 70 65 63 74 69 6e 67 20 61 20 63 65 72 expecting a cer
2620: 74 69 66 69 63 61 74 65 20 66 6f 72 2e 3c 2f 64 tificate for.</d
2630: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
2640: 2d 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 -session_id</str
2650: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c ong> <em>string<
2660: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 /em></dt>..<dd>S
2670: 65 73 73 69 6f 6e 20 69 64 20 74 6f 20 72 65 73 ession id to res
2680: 75 6d 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 ume session.</dd
2690: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
26a0: 73 73 6c 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ssl2</strong> <e
26b0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e m>bool</em></dt>
26c0: 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 ..<dd>Enable use
26d0: 20 6f 66 20 53 53 4c 20 76 32 2e 20 28 64 65 66 of SSL v2. (def
26e0: 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 ault is <em>fals
26f0: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 e</em>)</dd>..<d
2700: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c 33 20 t><strong>-ssl3
2710: 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f </strong><em>boo
2720: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 l</em></dt>..<dd
2730: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 >Enable use of S
2740: 53 4c 20 76 33 2e 20 28 64 65 66 61 75 6c 74 20 SL v3. (default
2750: 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d is <em>false</em
2760: 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 >)</dd>..<dt>-<s
2770: 74 72 6f 6e 67 3e 74 6c 73 31 3c 2f 73 74 72 6f trong>tls1</stro
2780: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d ng> <em>bool</em
2790: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 ></dt>..<dd>Enab
27a0: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 le use of TLS v1
27b0: 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 . (default is <e
27c0: 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 m>true</em>)</dd
27d0: 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e >..<dt>-<strong>
27e0: 74 6c 73 31 2e 31 3c 2f 73 74 72 6f 6e 67 3e 20 tls1.1</strong>
27f0: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 <em>bool</em></d
2800: 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 t>..<dd>Enable u
2810: 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 31 20 28 se of TLS v1.1 (
2820: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 default is <em>t
2830: 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 rue</em>)</dd>..
2840: 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 <dt>-<strong>tls
2850: 31 2e 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 1.2</strong> <em
2860: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
2870: 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 .<dd>Enable use
2880: 6f 66 20 54 4c 53 20 76 31 2e 32 20 28 64 65 66 of TLS v1.2 (def
2890: 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 ault is <em>true
28a0: 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 </em>)</dd>..<dt
28b0: 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 33 >-<strong>tls1.3
28c0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f </strong> <em>bo
28d0: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ol</em></dt>..<d
28e0: 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 d>Enable use of
28f0: 54 4c 53 20 76 31 2e 33 20 28 64 65 66 61 75 6c TLS v1.3 (defaul
2900: 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 t is <em>true</e
2910: 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 m>)</dd>..<dt><s
2920: 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 trong>-validatec
2930: 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 ommand</strong>
2940: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d <em>callback</em
2950: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6c 6c ></dt>..<dd>Call
2960: 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 74 back to invoke t
2970: 6f 20 76 65 72 69 66 79 20 6f 72 20 76 61 6c 69 o verify or vali
2980: 64 61 74 65 20 70 72 6f 74 6f 63 6f 6c 20 63 6f date protocol co
2990: 6e 66 69 67 0a 09 20 20 20 20 70 61 72 61 6d 65 nfig.. parame
29a0: 74 65 72 73 20 64 75 72 69 6e 67 20 74 68 65 20 ters during the
29b0: 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 protocol negotia
29c0: 74 69 6f 6e 20 70 68 61 73 65 2e 20 53 65 65 0a tion phase. See.
29d0: 09 20 20 20 20 3c 61 20 68 72 65 66 3d 22 23 43 . <a href="#C
29e0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 ALLBACK OPTIONS"
29f0: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e >CALLBACK OPTION
2a00: 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 S</a>.. for f
2a10: 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f urther discussio
2a20: 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c n.</dd>. </dl
2a30: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a >.</blockquote>.
2a40: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
2a50: 3d 22 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 ="tls::unimport"
2a60: 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 ><b>tls::unimpor
2a70: 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c t </b><i>channel
2a80: 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 </i></a></dt>.
2a90: 20 20 3c 64 64 3e 50 72 6f 76 69 64 65 64 20 66 <dd>Provided f
2aa0: 6f 72 20 73 79 6d 6d 65 74 72 79 20 74 6f 20 3c or symmetry to <
2ab0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f strong>tls::impo
2ac0: 72 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 74 68 69 rt</strong>, thi
2ad0: 73 0a 20 20 20 20 20 20 75 6e 73 74 61 63 6b 73 s. unstacks
2ae0: 20 74 68 65 20 53 53 4c 2d 65 6e 61 62 6c 69 6e the SSL-enablin
2af0: 67 20 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 g of a regular T
2b00: 63 6c 20 63 68 61 6e 6e 65 6c 2e 20 20 41 6e 20 cl channel. An
2b10: 65 72 72 6f 72 0a 20 20 20 20 20 20 69 73 20 74 error. is t
2b20: 68 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20 hrown if TLS is
2b30: 6e 6f 74 20 74 68 65 20 74 6f 70 20 73 74 61 63 not the top stac
2b40: 6b 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 ked channel type
2b50: 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 .</dd>. <dt>&
2b60: 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c nbsp;</dt>. <
2b70: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
2b80: 3a 68 61 6e 64 73 68 61 6b 65 22 3e 3c 73 74 72 :handshake"><str
2b90: 6f 6e 67 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 ong>tls::handsha
2ba0: 6b 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ke</strong> <em>
2bb0: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e channel</em></a>
2bc0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f </dt>. <dd>Fo
2bd0: 72 63 65 73 20 68 61 6e 64 73 68 61 6b 65 20 74 rces handshake t
2be0: 6f 20 74 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e o take place, an
2bf0: 64 20 72 65 74 75 72 6e 73 20 30 20 69 66 0a 09 d returns 0 if..
2c00: 68 61 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 handshake is sti
2c10: 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 ll in progress (
2c20: 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f non-blocking), o
2c30: 72 20 31 20 69 66 0a 09 74 68 65 20 68 61 6e 64 r 1 if..the hand
2c40: 73 68 61 6b 65 20 77 61 73 20 73 75 63 63 65 73 shake was succes
2c50: 73 66 75 6c 2e 20 49 66 20 74 68 65 20 68 61 6e sful. If the han
2c60: 64 73 68 61 6b 65 20 66 61 69 6c 65 64 0a 09 74 dshake failed..t
2c70: 68 69 73 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c his routine will
2c80: 20 74 68 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e throw an error.
2c90: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e </dd>. <dt>&n
2ca0: 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 bsp;</dt>. <d
2cb0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
2cc0: 73 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e status"><strong>
2cd0: 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 tls::status</str
2ce0: 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 3f 2d 6c ong>. <em>?-l
2cf0: 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 ocal? channel</e
2d00: 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 m></a></dt>.
2d10: 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 <dd>Returns the
2d20: 63 75 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f current status o
2d30: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 f the certificat
2d40: 65 20 66 6f 72 20 61 6e 20 53 53 4c 0a 09 63 68 e for an SSL..ch
2d50: 61 6e 6e 65 6c 2e 20 54 68 65 20 72 65 73 75 6c annel. The resul
2d60: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b t is a list of k
2d70: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 ey-value pairs d
2d80: 65 73 63 72 69 62 69 6e 67 0a 09 74 68 65 20 63 escribing..the c
2d90: 65 72 74 69 66 69 63 61 74 65 2e 20 49 66 20 74 ertificate. If t
2da0: 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 6e 20 he result is an
2db0: 65 6d 70 74 79 20 6c 69 73 74 20 74 68 65 6e 20 empty list then
2dc0: 74 68 65 0a 09 53 53 4c 20 68 61 6e 64 73 68 61 the..SSL handsha
2dd0: 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 ke has not yet c
2de0: 6f 6d 70 6c 65 74 65 64 2e 20 49 66 20 3c 65 6d ompleted. If <em
2df0: 3e 2d 6c 6f 63 61 6c 3c 2f 65 6d 3e 20 69 73 0a >-local</em> is.
2e00: 09 73 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e .specified, then
2e10: 20 74 68 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 the local certi
2e20: 66 69 63 61 74 65 20 69 73 20 75 73 65 64 2e 3c ficate is used.<
2e30: 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 /dd>.<blockquote
2e40: 3e 0a 09 3c 62 3e 53 53 4c 20 53 74 61 74 75 73 >..<b>SSL Status
2e50: 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c </b>. <dl>..<
2e60: 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c dt><strong>alpn<
2e70: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f /strong> <em>pro
2e80: 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tocol</em></dt>.
2e90: 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f .<dd>The protoco
2ea0: 6c 20 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 l selected after
2eb0: 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 Application-Lay
2ec0: 65 72 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 er Protocol..
2ed0: 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c Negotiation (AL
2ee0: 50 4e 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c PN).</dd>..<dt><
2ef0: 73 74 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 strong>cipher</s
2f00: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 trong> <em>ciphe
2f10: 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 r</em></dt>..<dd
2f20: 3e 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 >The current cip
2f30: 68 65 72 20 69 6e 20 75 73 65 20 62 65 74 77 65 her in use betwe
2f40: 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e en the client an
2f50: 64 0a 09 20 20 20 20 73 65 72 76 65 72 20 63 68 d.. server ch
2f60: 61 6e 6e 65 6c 73 2e 3c 2f 64 64 3e 0a 09 3c 64 annels.</dd>..<d
2f70: 74 3e 3c 73 74 72 6f 6e 67 3e 70 65 65 72 6e 61 t><strong>peerna
2f80: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e me</strong> <em>
2f90: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 name</em></dt>..
2fa0: 3c 64 64 3e 54 68 65 20 70 65 65 72 6e 61 6d 65 <dd>The peername
2fb0: 20 66 72 6f 6d 20 74 68 65 20 63 65 72 74 69 66 from the certif
2fc0: 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 icate.</dd>..<dt
2fd0: 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f ><strong>protoco
2fe0: 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 l</strong> <em>v
2ff0: 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e ersion</em></dt>
3000: 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 ..<dd>The protoc
3010: 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 ol version used
3020: 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 for the connecti
3030: 6f 6e 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 on:.. SSL2, S
3040: 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e SL3, TLS1, TLS1.
3050: 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 1, TLS1.2, TLS1.
3060: 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 3, or unknown.</
3070: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3080: 3e 73 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 >sbits</strong>
3090: 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a <em>n</em></dt>.
30a0: 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 .<dd>The number
30b0: 6f 66 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 of bits used for
30c0: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 the session key
30d0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
30e0: 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 48 61 73 ong>signatureHas
30f0: 68 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f hAlgorithm</stro
3100: 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 ng> <em>algorith
3110: 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 m</em></dt>..<dd
3120: 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 68 >The signature h
3130: 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f ash algorithm.</
3140: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3150: 3e 73 69 67 6e 61 74 75 72 65 54 79 70 65 3c 2f >signatureType</
3160: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79 70 65 strong> <em>type
3170: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3180: 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 74 79 The signature ty
3190: 70 65 20 76 61 6c 75 65 2e 3c 2f 64 64 3e 0a 09 pe value.</dd>..
31a0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 69 <dt><strong>veri
31b0: 66 79 44 65 70 74 68 3c 2f 73 74 72 6f 6e 67 3e fyDepth</strong>
31c0: 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e <em>n</em></dt>
31d0: 0a 09 3c 64 64 3e 4d 61 78 69 6d 75 6d 20 64 65 ..<dd>Maximum de
31e0: 70 74 68 20 66 6f 72 20 74 68 65 20 63 65 72 74 pth for the cert
31f0: 69 66 69 63 61 74 65 20 63 68 61 69 6e 20 76 65 ificate chain ve
3200: 72 69 66 69 63 61 74 69 6f 6e 2e 0a 09 20 20 20 rification...
3210: 20 44 65 66 61 75 6c 74 20 69 73 20 2d 31 2c 20 Default is -1,
3220: 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 3c 2f 64 to check all.</d
3230: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3240: 76 65 72 69 66 79 4d 6f 64 65 3c 2f 73 74 72 6f verifyMode</stro
3250: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d ng> <em>list</em
3260: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 ></dt>..<dd>List
3270: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20 of certificate
3280: 76 65 72 69 66 69 63 61 74 69 6f 6e 20 6d 6f 64 verification mod
3290: 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 es.</dd>..<dt><s
32a0: 74 72 6f 6e 67 3e 76 65 72 69 66 79 52 65 73 75 trong>verifyResu
32b0: 6c 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e lt</strong> <em>
32c0: 72 65 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64 74 3e result</em></dt>
32d0: 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 ..<dd>Certificat
32e0: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 e verification r
32f0: 65 73 75 6c 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 esult.</dd>..<dt
3300: 3e 3c 73 74 72 6f 6e 67 3e 63 61 5f 6e 61 6d 65 ><strong>ca_name
3310: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c s</strong> <em>l
3320: 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ist</em></dt>..<
3330: 64 64 3e 4c 69 73 74 20 6f 66 20 74 68 65 20 43 dd>List of the C
3340: 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68 6f ertificate Autho
3350: 72 69 74 69 65 73 20 75 73 65 64 20 74 6f 20 63 rities used to c
3360: 72 65 61 74 65 20 74 68 65 20 63 65 72 74 69 66 reate the certif
3370: 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 icate.</dd>.
3380: 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f </dl>.</blockquo
3390: 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e te>.<blockquote>
33a0: 0a 09 3c 62 3e 43 65 72 74 69 66 69 63 61 74 65 ..<b>Certificate
33b0: 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 Status</b>.
33c0: 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e <dl>..<dt><stron
33d0: 67 3e 61 6c 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c g>all</strong> <
33e0: 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f em>string</em></
33f0: 64 74 3e 0a 09 3c 64 64 3e 44 75 6d 70 20 6f 66 dt>..<dd>Dump of
3400: 20 61 6c 6c 20 63 65 72 74 69 66 69 63 61 74 65 all certificate
3410: 20 69 6e 66 6f 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 info.</dd>...<d
3420: 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 73 69 6f t><strong>versio
3430: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 n</strong> <em>v
3440: 61 6c 75 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 alue</em></dt>..
3450: 3c 64 64 3e 54 68 65 20 63 65 72 74 69 66 69 63 <dd>The certific
3460: 61 74 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 64 64 ate version.</dd
3470: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
3480: 65 72 69 61 6c 4e 75 6d 62 65 72 3c 2f 73 74 72 erialNumber</str
3490: 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c ong> <em>n</em><
34a0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 65 /dt>..<dd>The se
34b0: 72 69 61 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 rial number of t
34c0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 he certificate a
34d0: 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 s hex string.</d
34e0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
34f0: 73 69 67 6e 61 74 75 72 65 3c 2f 73 74 72 6f 6e signature</stron
3500: 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d g> <em>algorithm
3510: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3520: 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d Cipher algorithm
3530: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 used for certif
3540: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e icate signature.
3550: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3560: 6e 67 3e 69 73 73 75 65 72 3c 2f 73 74 72 6f 6e ng>issuer</stron
3570: 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f g> <em>dn</em></
3580: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 64 69 73 dt>..<dd>The dis
3590: 74 69 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 tinguished name
35a0: 28 44 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 (DN) of the cert
35b0: 69 66 69 63 61 74 65 20 69 73 73 75 65 72 2e 3c ificate issuer.<
35c0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
35d0: 67 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72 g>notBefore</str
35e0: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 ong> <em>date</e
35f0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
3600: 20 62 65 67 69 6e 20 64 61 74 65 20 66 6f 72 20 begin date for
3610: 74 68 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20 the validity of
3620: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e the certificate.
3630: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3640: 6e 67 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72 ng>notAfter</str
3650: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 ong> <em>date</e
3660: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
3670: 20 65 78 70 69 72 61 74 69 6f 6e 20 64 61 74 65 expiration date
3680: 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 for the certifi
3690: 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e cate.</dd>..<dt>
36a0: 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 3c <strong>subject<
36b0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c /strong> <em>dn<
36c0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
36d0: 68 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 he distinguished
36e0: 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 name (DN) of th
36f0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 73 75 e certificate su
3700: 62 6a 65 63 74 2e 0a 09 20 20 20 20 46 69 65 6c bject... Fiel
3710: 64 73 20 69 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d ds include: Comm
3720: 6f 6e 20 4e 61 6d 65 20 28 43 4e 29 2c 20 4f 72 on Name (CN), Or
3730: 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c 20 ganization (O),
3740: 4c 6f 63 61 6c 69 74 79 0a 09 20 20 20 20 6f 72 Locality.. or
3750: 20 43 69 74 79 20 28 4c 29 2c 20 53 74 61 74 65 City (L), State
3760: 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 28 53 29 or Province (S)
3770: 2c 20 61 6e 64 20 43 6f 75 6e 74 72 79 20 4e 61 , and Country Na
3780: 6d 65 20 28 43 29 2e 3c 2f 64 64 3e 0a 09 3c 64 me (C).</dd>..<d
3790: 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 t><strong>issuer
37a0: 55 6e 69 71 75 65 49 44 3c 2f 73 74 72 6f 6e 67 UniqueID</strong
37b0: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
37c0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
37d0: 69 73 73 75 65 72 20 75 6e 69 71 75 65 20 69 64 issuer unique id
37e0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
37f0: 6f 6e 67 3e 73 75 62 6a 65 63 74 55 6e 69 71 75 ong>subjectUniqu
3800: 65 49 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d eID</strong> <em
3810: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 >string</em></dt
3820: 3e 0a 09 3c 64 64 3e 54 68 65 20 73 75 62 6a 65 >..<dd>The subje
3830: 63 74 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 64 ct unique id.</d
3840: 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 d>...<dt><strong
3850: 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c >num_extensions<
3860: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f /strong> <em>n</
3870: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 em></dt>..<dd>Nu
3880: 6d 62 65 72 20 6f 66 20 63 65 72 74 69 66 69 63 mber of certific
3890: 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 73 2e 3c ate extensions.<
38a0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
38b0: 67 3e 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 74 g>extensions</st
38c0: 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f rong> <em>list</
38d0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 em></dt>..<dd>Li
38e0: 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 st of certificat
38f0: 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 e extension name
3900: 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 s.</dd>..<dt><st
3910: 72 6f 6e 67 3e 61 75 74 68 6f 72 69 74 79 4b 65 rong>authorityKe
3920: 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 yIdentifier</str
3930: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c ong> <em>string<
3940: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 /em></dt>..<dd>(
3950: 41 4b 49 29 20 4b 65 79 20 69 64 65 6e 74 69 66 AKI) Key identif
3960: 69 65 72 20 6f 66 20 74 68 65 20 49 73 73 75 69 ier of the Issui
3970: 6e 67 20 43 41 20 63 65 72 74 69 66 69 63 61 74 ng CA certificat
3980: 65 20 74 68 61 74 20 73 69 67 6e 65 64 0a 09 20 e that signed..
3990: 20 20 20 74 68 65 20 53 53 4c 20 63 65 72 74 69 the SSL certi
39a0: 66 69 63 61 74 65 20 61 73 20 68 65 78 20 73 74 ficate as hex st
39b0: 72 69 6e 67 2e 20 54 68 69 73 20 76 61 6c 75 65 ring. This value
39c0: 20 6d 61 74 63 68 65 73 20 74 68 65 20 53 4b 49 matches the SKI
39d0: 0a 09 20 20 20 20 76 61 6c 75 65 20 6f 66 20 74 .. value of t
39e0: 68 65 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20 he Intermediate
39f0: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c CA certificate.<
3a00: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3a10: 67 3e 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e g>subjectKeyIden
3a20: 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 tifier</strong>
3a30: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c <em>string</em><
3a40: 2f 64 74 3e 0a 09 3c 64 64 3e 28 53 4b 49 29 20 /dt>..<dd>(SKI)
3a50: 48 61 73 68 20 6f 66 20 74 68 65 20 70 75 62 6c Hash of the publ
3a60: 69 63 20 6b 65 79 20 69 6e 73 69 64 65 20 74 68 ic key inside th
3a70: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 e certificate as
3a80: 20 68 65 78 0a 09 20 20 20 73 74 72 69 6e 67 2e hex.. string.
3a90: 20 55 73 65 64 20 74 6f 20 69 64 65 6e 74 69 66 Used to identif
3aa0: 79 20 63 65 72 74 69 66 69 63 61 74 65 73 20 74 y certificates t
3ab0: 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 20 70 61 hat contain a pa
3ac0: 72 74 69 63 75 6c 61 72 0a 09 20 20 20 70 75 62 rticular.. pub
3ad0: 6c 69 63 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c lic key.</dd>..<
3ae0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 dt><strong>subje
3af0: 63 74 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f 6e ctAltName</stron
3b00: 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e g> <em>list</em>
3b10: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 </dt>..<dd>List
3b20: 6f 66 20 61 6c 6c 20 6f 66 20 74 68 65 20 61 6c of all of the al
3b30: 74 65 72 6e 61 74 69 76 65 20 64 6f 6d 61 69 6e ternative domain
3b40: 20 6e 61 6d 65 73 2c 20 73 75 62 20 64 6f 6d 61 names, sub doma
3b50: 69 6e 73 2c 0a 09 20 20 20 20 61 6e 64 20 49 50 ins,.. and IP
3b60: 20 61 64 64 72 65 73 73 65 73 20 74 68 61 74 20 addresses that
3b70: 61 72 65 20 73 65 63 75 72 65 64 20 62 79 20 74 are secured by t
3b80: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c he certificate.<
3b90: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3ba0: 67 3e 6f 63 73 70 3c 2f 73 74 72 6f 6e 67 3e 20 g>ocsp</strong>
3bb0: 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 <em>list</em></d
3bc0: 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 t>..<dd>List of
3bd0: 61 6c 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 all Online Certi
3be0: 66 69 63 61 74 65 20 53 74 61 74 75 73 20 50 72 ficate Status Pr
3bf0: 6f 74 6f 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 otocol (OCSP) UR
3c00: 4c 73 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c Ls.</dd>...<dt><
3c10: 73 74 72 6f 6e 67 3e 63 65 72 74 69 66 69 63 61 strong>certifica
3c20: 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e te</strong> <em>
3c30: 63 65 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 cert</em></dt>..
3c40: 3c 64 64 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f <dd>The PEM enco
3c50: 64 65 64 20 63 65 72 74 69 66 69 63 61 74 65 2e ded certificate.
3c60: 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 </dd>...<dt><str
3c70: 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 41 6c 67 ong>signatureAlg
3c80: 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 orithm</strong>
3c90: 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 <em>algorithm</e
3ca0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 70 m></dt>..<dd>Cip
3cb0: 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 her algorithm us
3cc0: 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 ed for certifica
3cd0: 74 65 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 te signature.</d
3ce0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
3cf0: 73 69 67 6e 61 74 75 72 65 56 61 6c 75 65 3c 2f signatureValue</
3d00: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 strong> <em>stri
3d10: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ng</em></dt>..<d
3d20: 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 d>Certificate si
3d30: 67 6e 61 74 75 72 65 20 61 73 20 68 65 78 20 73 gnature as hex s
3d40: 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 tring.</dd>..<dt
3d50: 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 ><strong>signatu
3d60: 72 65 44 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 reDigest</strong
3d70: 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 > <em>version</e
3d80: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 m></dt>..<dd>Cer
3d90: 74 69 66 69 63 61 74 65 20 73 69 67 6e 69 6e 67 tificate signing
3da0: 20 64 69 67 65 73 74 2e 3c 2f 64 64 3e 0a 09 3c digest.</dd>..<
3db0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 dt><strong>publi
3dc0: 63 4b 65 79 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 cKeyAlgorithm</s
3dd0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 trong> <em>algor
3de0: 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 ithm</em></dt>..
3df0: 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 <dd>Certificate
3e00: 73 69 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 signature public
3e10: 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 3c key algorithm.<
3e20: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
3e30: 67 3e 70 75 62 6c 69 63 4b 65 79 3c 2f 73 74 72 g>publicKey</str
3e40: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c ong> <em>string<
3e50: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 /em></dt>..<dd>C
3e60: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
3e70: 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 ture public key
3e80: 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f as hex string.</
3e90: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
3ea0: 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c >bits</strong> <
3eb0: 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 em>n</em></dt>..
3ec0: 3c 64 64 3e 4e 75 6d 62 65 72 20 6f 66 20 62 69 <dd>Number of bi
3ed0: 74 73 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 ts used for cert
3ee0: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 ificate signatur
3ef0: 65 20 6b 65 79 3c 2f 64 64 3e 0a 09 3c 64 74 3e e key</dd>..<dt>
3f00: 3c 73 74 72 6f 6e 67 3e 73 65 6c 66 5f 73 69 67 <strong>self_sig
3f10: 6e 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ned</strong> <em
3f20: 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 >boolean</em></d
3f30: 74 3e 0a 09 3c 64 64 3e 49 73 20 63 65 72 74 69 t>..<dd>Is certi
3f40: 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 ficate signature
3f50: 20 73 65 6c 66 20 73 69 67 6e 65 64 2e 3c 2f 64 self signed.</d
3f60: 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 d>...<dt><strong
3f70: 3e 73 68 61 31 5f 68 61 73 68 3c 2f 73 74 72 6f >sha1_hash</stro
3f80: 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d ng> <em>hash</em
3f90: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
3fa0: 53 48 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 SHA1 hash of the
3fb0: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 certificate as
3fc0: 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e hex string.</dd>
3fd0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 68 ..<dt><strong>sh
3fe0: 61 32 35 36 5f 68 61 73 68 3c 2f 73 74 72 6f 6e a256_hash</stron
3ff0: 67 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e g> <em>hash</em>
4000: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 </dt>..<dd>The S
4010: 48 41 32 35 36 20 68 61 73 68 20 6f 66 20 74 68 HA256 hash of th
4020: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 e certificate as
4030: 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 hex string.</dd
4040: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c >. </dl>.</bl
4050: 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c ockquote>.. <
4060: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
4070: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 73 74 :connection"><st
4080: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 rong>tls::connec
4090: 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 tion</strong>.
40a0: 20 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 <em>channel</e
40b0: 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 m></a></dt>.
40c0: 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 <dd>Returns the
40d0: 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 current connecti
40e0: 6f 6e 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 on status of an
40f0: 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 SSL channel. The
4100: 0a 09 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 ..result is a li
4110: 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 st of key-value
4120: 70 61 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 pairs describing
4130: 20 74 68 65 0a 09 63 6f 6e 6e 65 63 74 65 64 20 the..connected
4140: 70 65 65 72 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 peer.</dd>.<bloc
4150: 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c 20 kquote>..<b>SSL
4160: 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c Status</b>. <
4170: 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dl>..<dt><strong
4180: 3e 73 74 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 >state</strong>
4190: 3c 65 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f <em>state</em></
41a0: 64 74 3e 0a 09 3c 64 64 3e 53 74 61 74 65 20 6f dt>..<dd>State o
41b0: 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e f the connection
41c0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
41d0: 6f 6e 67 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f ong>servername</
41e0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 strong> <em>name
41f0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
4200: 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 The name of the
4210: 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 connected to ser
4220: 76 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ver.</dd>..<dt><
4230: 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c strong>protocol<
4240: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 /strong> <em>ver
4250: 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 sion</em></dt>..
4260: 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c <dd>The protocol
4270: 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f version used fo
4280: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e r the connection
4290: 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c :.. SSL2, SSL
42a0: 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 3, TLS1, TLS1.1,
42b0: 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c TLS1.2, TLS1.3,
42c0: 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 or unknown.</dd
42d0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 >..<dt><strong>r
42e0: 65 6e 65 67 6f 74 69 61 74 69 6f 6e 3c 2f 73 74 enegotiation</st
42f0: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 rong> <em>boolea
4300: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 n</em></dt>..<dd
4310: 3e 57 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f >Whether protoco
4320: 6c 20 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 l renegotiation
4330: 69 73 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 is supported or
4340: 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c not.</dd>..<dt><
4350: 73 74 72 6f 6e 67 3e 73 65 63 75 72 69 74 79 6c strong>securityl
4360: 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 evel</strong> <e
4370: 6d 3e 6c 65 76 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 m>level</em></dt
4380: 3e 0a 09 3c 64 64 3e 54 68 65 20 73 65 63 75 72 >..<dd>The secur
4390: 69 74 79 20 6c 65 76 65 6c 20 75 73 65 64 20 66 ity level used f
43a0: 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 or selection of
43b0: 63 69 70 68 65 72 73 2c 20 6b 65 79 20 73 69 7a ciphers, key siz
43c0: 65 2c 20 65 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 e, etc.</dd>..<d
43d0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f t><strong>sessio
43e0: 6e 5f 72 65 75 73 65 64 3c 2f 73 74 72 6f 6e 67 n_reused</strong
43f0: 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 > <em>boolean</e
4400: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 m></dt>..<dd>Whe
4410: 74 68 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e ther the session
4420: 20 68 61 73 20 62 65 65 6e 20 72 65 75 73 65 64 has been reused
4430: 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c or not.</dd>..<
4440: 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 5f 73 65 dt><strong>is_se
4450: 72 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 rver</strong> <e
4460: 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f m>boolean</em></
4470: 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 dt>..<dd>Whether
4480: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 the connection
4490: 69 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 is configured as
44a0: 20 61 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 a server (1) or
44b0: 20 63 6c 69 65 6e 74 20 28 30 29 2e 3c 2f 64 64 client (0).</dd
44c0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 >..<dt><strong>c
44d0: 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f 73 74 72 6f ompression</stro
44e0: 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d ng> <em>mode</em
44f0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 6f 6d 70 ></dt>..<dd>Comp
4500: 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c ression method.<
4510: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4520: 67 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f 73 74 72 g>expansion</str
4530: 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 ong> <em>mode</e
4540: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 78 70 m></dt>..<dd>Exp
4550: 61 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f ansion method.</
4560: 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f dd>. </dl>.</
4570: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f blockquote>.<blo
4580: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 69 70 ckquote>..<b>Cip
4590: 68 65 72 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 her Info</b>.
45a0: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f <dl>..<dt><stro
45b0: 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e ng>cipher</stron
45c0: 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 g> <em>cipher</e
45d0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
45e0: 20 63 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 current cipher
45f0: 69 6e 20 75 73 65 20 66 6f 72 20 74 68 65 20 63 in use for the c
4600: 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a onnection.</dd>.
4610: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 .<dt><strong>sta
4620: 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f 73 74 72 6f ndard_name</stro
4630: 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d ng> <em>name</em
4640: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
4650: 73 74 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d standard RFC nam
4660: 65 20 6f 66 20 63 69 70 68 65 72 2e 3c 2f 64 64 e of cipher.</dd
4670: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 >..<dt><strong>b
4680: 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d its</strong> <em
4690: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 >n</em></dt>..<d
46a0: 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 d>The number of
46b0: 70 72 6f 63 65 73 73 65 64 20 62 69 74 73 20 75 processed bits u
46c0: 73 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c sed for cipher.<
46d0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
46e0: 67 3e 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 73 g>secret_bits</s
46f0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d trong> <em>n</em
4700: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
4710: 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 number of secret
4720: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 bits used for c
4730: 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 ipher.</dd>..<dt
4740: 3e 3c 73 74 72 6f 6e 67 3e 6d 69 6e 5f 76 65 72 ><strong>min_ver
4750: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 sion</strong> <e
4760: 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f m>version</em></
4770: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6d 69 6e dt>..<dd>The min
4780: 69 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 65 imum protocol ve
4790: 72 73 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 72 rsion for cipher
47a0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
47b0: 6f 6e 67 3e 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 ong>id</strong>
47c0: 3c 65 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f 64 74 3e <em>id</em></dt>
47d0: 0a 09 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 ..<dd>The OpenSS
47e0: 4c 20 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 L cipher id.</dd
47f0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 64 >..<dt><strong>d
4800: 65 73 63 72 69 70 74 69 6f 6e 3c 2f 73 74 72 6f escription</stro
4810: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f ng> <em>string</
4820: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 20 em></dt>..<dd>A
4830: 74 65 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e text description
4840: 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c of the cipher.<
4850: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c /dd>. </dl>.<
4860: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c /blockquote>.<bl
4870: 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 65 ockquote>..<b>Se
4880: 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f 62 3e 0a 20 ssion Info</b>.
4890: 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 <dl>..<dt><st
48a0: 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e rong>alpn</stron
48b0: 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c g> <em>protocol<
48c0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
48d0: 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 he protocol sele
48e0: 63 74 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 cted after Appli
48f0: 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f cation-Layer Pro
4900: 74 6f 63 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 tocol.. Negot
4910: 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f iation (ALPN).</
4920: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4930: 3e 72 65 73 75 6d 61 62 6c 65 3c 2f 73 74 72 6f >resumable</stro
4940: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c ng> <em>boolean<
4950: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 /em></dt>..<dd>C
4960: 61 6e 20 74 68 65 20 73 65 73 73 69 6f 6e 20 62 an the session b
4970: 65 20 72 65 73 75 6d 65 64 20 6f 72 20 6e 6f 74 e resumed or not
4980: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
4990: 6f 6e 67 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f ong>start_time</
49a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f strong> <em>seco
49b0: 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c nds</em></dt>..<
49c0: 64 64 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 dd>Time since se
49d0: 73 73 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e ssion started in
49e0: 20 73 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 seconds since e
49f0: 70 6f 63 68 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e poch.</dd>..<dt>
4a00: 3c 73 74 72 6f 6e 67 3e 74 69 6d 65 6f 75 74 3c <strong>timeout<
4a10: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 /strong> <em>sec
4a20: 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 onds</em></dt>..
4a30: 3c 64 64 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e <dd>Max duration
4a40: 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 of session in s
4a50: 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69 econds before ti
4a60: 6d 65 2d 6f 75 74 2e 3c 2f 64 64 3e 0a 09 3c 64 me-out.</dd>..<d
4a70: 74 3e 3c 73 74 72 6f 6e 67 3e 6c 69 66 65 74 69 t><strong>lifeti
4a80: 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e me</strong> <em>
4a90: 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 seconds</em></dt
4aa0: 3e 0a 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 74 >..<dd>Session t
4ab0: 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 68 icket lifetime h
4ac0: 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c int in seconds.<
4ad0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4ae0: 67 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 g>session_id</st
4af0: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 rong> <em>binary
4b00: 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 _string</em></dt
4b10: 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 >..<dd>Unique se
4b20: 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 ssion id for use
4b30: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 in resuming the
4b40: 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 session.</dd>..
4b50: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 <dt><strong>sess
4b60: 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f ion_ticket</stro
4b70: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 ng> <em>binary_s
4b80: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
4b90: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 .<dd>Unique sess
4ba0: 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 ion ticket for u
4bb0: 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 se in resuming t
4bc0: 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e he session.</dd>
4bd0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 ..<dt><strong>ti
4be0: 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f 73 cket_app_data</s
4bf0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 trong> <em>binar
4c00: 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 y_string</em></d
4c10: 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 t>..<dd>Unique s
4c20: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 ession ticket ap
4c30: 70 6c 69 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c plication data.<
4c40: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4c50: 67 3e 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 g>master_key</st
4c60: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 rong> <em>binary
4c70: 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 _string</em></dt
4c80: 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 >..<dd>Unique se
4c90: 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 ssion master key
4ca0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
4cb0: 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 ong>session_cach
4cc0: 65 5f 6d 6f 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 e_mode</strong>
4cd0: 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 <em>mode</em></d
4ce0: 74 3e 0a 09 3c 64 64 3e 53 65 72 76 65 72 20 63 t>..<dd>Server c
4cf0: 61 63 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e ache mode (clien
4d00: 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 20 62 6f t, server, or bo
4d10: 74 68 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f th).</dd>. </
4d20: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 dl>.</blockquote
4d30: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 >.. <dt><a na
4d40: 6d 65 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 me="tls::ciphers
4d50: 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 "><strong>tls::c
4d60: 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 0a iphers</strong>.
4d70: 20 20 20 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c <em>protocol
4d80: 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70 ?verbose? ?supp
4d90: 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 61 3e 3c orted?</em></a><
4da0: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 /dt>. <dd>Ret
4db0: 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 73 urns a list of s
4dc0: 75 70 70 6f 72 74 65 64 20 63 69 70 68 65 72 73 upported ciphers
4dd0: 20 61 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 3c available for <
4de0: 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e em>protocol</em>
4df0: 2c 0a 09 77 68 65 72 65 20 70 72 6f 74 6f 63 6f ,..where protoco
4e00: 6c 20 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 l must be one of
4e10: 20 3c 62 3e 73 73 6c 32 2c 20 73 73 6c 33 2c 20 <b>ssl2, ssl3,
4e20: 74 6c 73 31 2c 20 74 6c 73 31 2e 31 2c 0a 09 74 tls1, tls1.1,..t
4e30: 6c 73 31 2e 32 2c 3c 2f 62 3e 20 6f 72 20 3c 62 ls1.2,</b> or <b
4e40: 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 49 66 20 >tls1.3</b>. If
4e50: 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 6d 3e <em>verbose</em>
4e60: 20 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73 is specified as
4e70: 0a 09 74 72 75 65 20 74 68 65 6e 20 61 20 76 65 ..true then a ve
4e80: 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61 rbose, human rea
4e90: 64 61 62 6c 65 20 6c 69 73 74 20 69 73 20 72 65 dable list is re
4ea0: 74 75 72 6e 65 64 20 77 69 74 68 0a 09 61 64 64 turned with..add
4eb0: 69 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 6d 61 74 itional informat
4ec0: 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65 ion on the ciphe
4ed0: 72 2e 20 49 66 20 3c 65 6d 3e 73 75 70 70 6f 72 r. If <em>suppor
4ee0: 74 65 64 3c 2f 65 6d 3e 0a 09 69 73 20 73 70 65 ted</em>..is spe
4ef0: 63 69 66 69 65 64 20 61 73 20 74 72 75 65 2c 20 cified as true,
4f00: 74 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69 then only the ci
4f10: 70 68 65 72 73 20 73 75 70 70 6f 72 74 65 64 20 phers supported
4f20: 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 0a 09 77 69 for protocol..wi
4f30: 6c 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f 64 ll be listed.</d
4f40: 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e d>.. <dt><a n
4f50: 61 6d 65 3d 22 74 6c 73 3a 3a 70 72 6f 74 6f 63 ame="tls::protoc
4f60: 6f 6c 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 ols"><strong>tls
4f70: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 ::protocols</str
4f80: 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 ong></a></dt>.
4f90: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 61 20 <dd>Returns a
4fa0: 6c 69 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 list of supporte
4fb0: 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c d protocols. Val
4fc0: 69 64 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 09 id values are:..
4fd0: 3c 62 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e <b>ssl2</b>, <b>
4fe0: 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 ssl3</b>, <b>tls
4ff0: 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 1</b>, <b>tls1.1
5000: 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c </b>, <b>tls1.2<
5010: 2f 62 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 /b>,..and <b>tls
5020: 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 1.3</b>. Exact l
5030: 69 73 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f ist depends on O
5040: 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 penSSL version a
5050: 6e 64 0a 09 63 6f 6d 70 69 6c 65 20 74 69 6d 65 nd..compile time
5060: 20 66 6c 61 67 73 2e 3c 2f 64 64 3e 0a 0a 20 20 flags.</dd>..
5070: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
5080: 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 73 74 ls::version"><st
5090: 72 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 73 69 6f rong>tls::versio
50a0: 6e 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f n</strong></a></
50b0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 dt>. <dd>Retu
50c0: 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 rns the OpenSSL
50d0: 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e 3c version string.<
50e0: 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 20 /dd>.. <br>.
50f0: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 <dt><a name="
5100: 74 6c 73 3a 3a 68 61 73 68 22 3e 3c 73 74 72 6f tls::hash"><stro
5110: 6e 67 3e 74 6c 73 3a 3a 68 61 73 68 3c 2f 73 74 ng>tls::hash</st
5120: 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79 70 65 20 64 rong> <em>type d
5130: 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 ata</em></a></dt
5140: 3e 0a 20 20 20 20 3c 64 64 3e 43 61 6c 63 75 6c >. <dd>Calcul
5150: 61 74 65 20 74 68 65 20 68 61 73 68 20 66 6f 72 ate the hash for
5160: 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 75 <em>data</em> u
5170: 73 69 6e 67 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 sing <em>type</e
5180: 6d 3e 20 64 69 67 65 73 74 2e 0a 09 52 65 74 75 m> digest...Retu
5190: 72 6e 73 20 76 61 6c 75 65 20 61 73 20 61 20 68 rns value as a h
51a0: 65 78 20 73 74 72 69 6e 67 2e 20 54 79 70 65 20 ex string. Type
51b0: 63 61 6d 20 62 65 20 61 6e 79 20 4f 70 65 6e 53 cam be any OpenS
51c0: 53 4c 20 73 75 70 70 6f 72 74 65 64 0a 09 68 61 SL supported..ha
51d0: 73 68 20 64 69 67 65 73 74 20 69 6e 63 6c 75 64 sh digest includ
51e0: 69 6e 67 3a 20 3c 62 3e 6d 64 34 3c 2f 62 3e 2c ing: <b>md4</b>,
51f0: 20 3c 62 3e 6d 64 35 3c 2f 62 3e 2c 20 3c 62 3e <b>md5</b>, <b>
5200: 73 68 61 31 3c 2f 62 3e 2c 0a 09 73 68 61 32 20 sha1</b>,..sha2
5210: 28 3c 62 3e 73 68 61 32 32 34 3c 2f 62 3e 2c 20 (<b>sha224</b>,
5220: 3c 62 3e 73 68 61 32 35 36 3c 2f 62 3e 2c 20 3c <b>sha256</b>, <
5230: 62 3e 73 68 61 33 38 34 3c 2f 62 3e 2c 20 3c 62 b>sha384</b>, <b
5240: 3e 73 68 61 35 31 32 3c 2f 62 3e 2c 0a 09 3c 62 >sha512</b>,..<b
5250: 3e 73 68 61 35 31 32 2d 32 32 34 3c 2f 62 3e 2c >sha512-224</b>,
5260: 20 61 6e 64 20 3c 62 3e 73 68 61 35 31 32 2d 32 and <b>sha512-2
5270: 35 36 3c 2f 62 3e 29 2c 0a 09 73 68 61 33 20 28 56</b>),..sha3 (
5280: 3c 62 3e 73 68 61 33 2d 32 32 34 3c 2f 62 3e 2c <b>sha3-224</b>,
5290: 20 3c 62 3e 73 68 61 33 2d 32 35 36 3c 2f 62 3e <b>sha3-256</b>
52a0: 2c 20 3c 62 3e 73 68 61 33 2d 33 38 34 3c 2f 62 , <b>sha3-384</b
52b0: 3e 2c 20 61 6e 64 20 3c 62 3e 73 68 61 33 2d 35 >, and <b>sha3-5
52c0: 31 32 3c 2f 62 3e 29 2c 20 65 74 63 2e 3c 2f 64 12</b>), etc.</d
52d0: 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e d>.. <dt><a n
52e0: 61 6d 65 3d 22 74 6c 73 3a 3a 6d 64 34 22 3e 3c ame="tls::md4"><
52f0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 6d 64 34 3c strong>tls::md4<
5300: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 /strong> <em>dat
5310: 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a a</em></a></dt>.
5320: 20 20 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61 74 <dd>Calculat
5330: 65 20 74 68 65 20 68 61 73 68 20 66 6f 72 20 3c e the hash for <
5340: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 75 73 69 em>data</em> usi
5350: 6e 67 20 74 68 65 20 4d 44 34 20 6d 65 73 73 61 ng the MD4 messa
5360: 67 65 2d 64 69 67 65 73 74 20 61 6c 67 6f 72 69 ge-digest algori
5370: 74 68 6d 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c thm.</dd>.. <
5380: 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a dt><a name="tls:
5390: 3a 6d 64 35 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c :md5"><strong>tl
53a0: 73 3a 3a 6d 64 35 3c 2f 73 74 72 6f 6e 67 3e 20 s::md5</strong>
53b0: 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 61 <em>data</em></a
53c0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 43 ></dt>. <dd>C
53d0: 61 6c 63 75 6c 61 74 65 20 74 68 65 20 68 61 73 alculate the has
53e0: 68 20 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f h for <em>data</
53f0: 65 6d 3e 20 75 73 69 6e 67 20 74 68 65 20 4d 44 em> using the MD
5400: 35 20 6d 65 73 73 61 67 65 2d 64 69 67 65 73 74 5 message-digest
5410: 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64 64 3e algorithm.</dd>
5420: 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d .. <dt><a nam
5430: 65 3d 22 74 6c 73 3a 3a 73 68 61 31 22 3e 3c 73 e="tls::sha1"><s
5440: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 68 61 31 3c trong>tls::sha1<
5450: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 /strong> <em>dat
5460: 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a a</em></a></dt>.
5470: 20 20 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61 74 <dd>Calculat
5480: 65 20 74 68 65 20 68 61 73 68 20 66 6f 72 20 3c e the hash for <
5490: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 75 73 69 em>data</em> usi
54a0: 6e 67 20 74 68 65 20 53 48 41 2d 31 20 73 65 63 ng the SHA-1 sec
54b0: 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 ure hash algorit
54c0: 68 6d 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 hm.</dd>.. <d
54d0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
54e0: 73 68 61 32 35 36 22 3e 3c 73 74 72 6f 6e 67 3e sha256"><strong>
54f0: 74 6c 73 3a 3a 73 68 61 32 35 36 3c 2f 73 74 72 tls::sha256</str
5500: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 ong> <em>data</e
5510: 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 m></a></dt>.
5520: 3c 64 64 3e 43 61 6c 63 75 6c 61 74 65 20 74 68 <dd>Calculate th
5530: 65 20 68 61 73 68 20 66 6f 72 20 3c 65 6d 3e 64 e hash for <em>d
5540: 61 74 61 3c 2f 65 6d 3e 20 75 73 69 6e 67 20 74 ata</em> using t
5550: 68 65 20 53 48 41 2d 32 20 53 48 41 2d 32 35 36 he SHA-2 SHA-256
5560: 20 73 65 63 75 72 65 20 68 61 73 68 20 61 6c 67 secure hash alg
5570: 6f 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 3c 2f 64 orithm.</dd>.</d
5580: 6c 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d l>..<h3><a name=
5590: 22 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e "CALLBACK OPTION
55a0: 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 S">CALLBACK OPTI
55b0: 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 ONS</a></h3>..<p
55c0: 3e 0a 41 73 20 69 6e 64 69 63 61 74 65 64 20 61 >.As indicated a
55d0: 62 6f 76 65 2c 20 69 6e 64 69 76 69 64 75 61 6c bove, individual
55e0: 20 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20 62 65 channels can be
55f0: 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f 77 6e given their own
5600: 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 callbacks.to ha
5610: 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 74 ndle intermediat
5620: 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 e processing by
5630: 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 the OpenSSL libr
5640: 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c ary, using the.<
5650: 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c strong>-command<
5660: 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e /strong>, <stron
5670: 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 g>-password</str
5680: 6f 6e 67 3e 2c 20 61 6e 64 0a 3c 73 74 72 6f 6e ong>, and.<stron
5690: 67 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d g>-validate_comm
56a0: 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 and</strong> opt
56b0: 69 6f 6e 73 20 70 61 73 73 65 64 20 74 6f 20 65 ions passed to e
56c0: 69 74 68 65 72 20 6f 66 0a 3c 73 74 72 6f 6e 67 ither of.<strong
56d0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 >tls::socket</st
56e0: 72 6f 6e 67 3e 20 6f 72 20 3c 73 74 72 6f 6e 67 rong> or <strong
56f0: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 >tls::import</st
5700: 72 6f 6e 67 3e 2e 0a 49 66 20 74 68 65 20 63 61 rong>..If the ca
5710: 6c 6c 62 61 63 6b 20 67 65 6e 65 72 61 74 65 73 llback generates
5720: 20 61 6e 20 65 72 72 6f 72 2c 20 74 68 65 20 3c an error, the <
5730: 62 3e 62 67 65 72 72 6f 72 3c 2f 62 3e 20 63 6f b>bgerror</b> co
5740: 6d 6d 61 6e 64 20 77 69 74 68 20 62 65 0a 69 6e mmand with be.in
5750: 76 6f 6b 65 64 20 77 69 74 68 20 74 68 65 20 65 voked with the e
5760: 72 72 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e rror information
5770: 2e 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 ..</p>..<blockqu
5780: 6f 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 20 3c ote>.<dl>.. <
5790: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d dt><strong>-comm
57a0: 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d and</strong> <em
57b0: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f >callback</em></
57c0: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e dt>. <dd>..In
57d0: 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 vokes the specif
57e0: 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ied <em>callback
57f0: 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 61 74 20 </em> script at
5800: 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 0a 09 several points..
5810: 64 75 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 during the OpenS
5820: 53 4c 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 SL handshake and
5830: 20 75 73 65 2e 20 53 65 65 20 62 65 6c 6f 77 20 use. See below
5840: 66 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 for the possible
5850: 0a 09 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 ..arguments pass
5860: 65 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 ed to the callba
5870: 63 6b 20 73 63 72 69 70 74 2e 20 56 61 6c 75 65 ck script. Value
5880: 73 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 s returned from
5890: 74 68 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61 72 the..callback ar
58a0: 65 20 69 67 6e 6f 72 65 64 2e 0a 0a 09 3c 62 72 e ignored....<br
58b0: 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a >..<br>...<dl>..
58c0: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 .<dt>.. <strong
58d0: 3e 65 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 3e 20 >error</strong>
58e0: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65 73 73 <em>channel mess
58f0: 61 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a age</em>..</dt>.
5900: 09 3c 64 64 3e 0a 09 20 20 54 68 65 20 3c 65 6d .<dd>.. The <em
5910: 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 >message</em> ar
5920: 67 75 6d 65 6e 74 20 63 6f 6e 74 61 69 6e 73 20 gument contains
5930: 61 6e 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 an error message
5940: 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 generated.. by
5950: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e the OpenSSL fun
5960: 63 74 69 6f 6e 20 3c 63 6f 64 65 3e 45 52 52 5f ction <code>ERR_
5970: 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 reason_error_str
5980: 69 6e 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c ing()</code>...<
5990: 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 /dd>...<br>...<d
59a0: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e t>.. <strong>in
59b0: 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e fo</strong> <em>
59c0: 63 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 channel major mi
59d0: 6e 6f 72 20 6d 65 73 73 61 67 65 20 74 79 70 65 nor message type
59e0: 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 </em>..</dt>..<d
59f0: 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 d>.. This form
5a00: 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 of callback is i
5a10: 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 nvoked by the Op
5a20: 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 enSSL function..
5a30: 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f <code>SSL_CTX_
5a40: 73 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 set_info_callbac
5a50: 6b 28 29 3c 2f 63 6f 64 65 3e 20 64 75 72 69 6e k()</code> durin
5a60: 67 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 65 74 g connection set
5a70: 75 70 0a 09 20 20 61 6e 64 20 75 73 65 2e 0a 09 up.. and use...
5a80: 20 20 3c 62 72 3e 0a 09 20 20 3c 75 6c 3e 0a 09 <br>.. <ul>..
5a90: 20 20 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 20 76 <li>Possible v
5aa0: 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 alues for <em>ma
5ab0: 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 jor</em> are:..
5ac0: 20 3c 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 <code>handshake
5ad0: 2c 20 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 , alert, connect
5ae0: 2c 20 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e , accept</code>.
5af0: 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 50 6f 73 </li>.. <li>Pos
5b00: 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 sible values for
5b10: 20 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 <em>minor</em>
5b20: 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 73 74 are:.. <code>st
5b30: 61 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61 64 2c art, done, read,
5b40: 20 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 write, loop, ex
5b50: 69 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a it</code>.</li>.
5b60: 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 6d . <li>The <em>m
5b70: 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 essage</em> argu
5b80: 6d 65 6e 74 20 69 73 20 61 20 64 65 73 63 72 69 ment is a descri
5b90: 70 74 69 76 65 20 73 74 72 69 6e 67 20 77 68 69 ptive string whi
5ba0: 63 68 20 6d 61 79 0a 09 20 20 62 65 20 67 65 6e ch may.. be gen
5bb0: 65 72 61 74 65 64 20 65 69 74 68 65 72 20 62 79 erated either by
5bc0: 20 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 <code>SSL_state
5bd0: 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f _string_long()</
5be0: 63 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c code> or by.. <
5bf0: 63 6f 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 code>SSL_alert_d
5c00: 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 esc_string_long(
5c10: 29 3c 2f 63 6f 64 65 3e 2c 20 64 65 70 65 6e 64 )</code>, depend
5c20: 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 ing on the conte
5c30: 78 74 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e xt.</li>.. <li>
5c40: 46 6f 72 20 61 6c 65 72 74 73 2c 20 74 68 65 20 For alerts, the
5c50: 70 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 possible values
5c60: 66 6f 72 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d for <em>type</em
5c70: 3e 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e > are:.. <code>
5c80: 77 61 72 6e 69 6e 67 2c 20 66 61 74 61 6c 2c 20 warning, fatal,
5c90: 61 6e 64 20 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 and unknown</cod
5ca0: 65 3e 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c 0a e>. For others,.
5cb0: 09 20 20 3c 63 6f 64 65 3e 69 6e 66 6f 3c 2f 63 . <code>info</c
5cc0: 6f 64 65 3e 20 69 73 20 75 73 65 64 2e 3c 2f 6c ode> is used.</l
5cd0: 69 3e 0a 09 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 i>.. </ul>..</d
5ce0: 64 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 d>...<dt>.. <st
5cf0: 72 6f 6e 67 3e 6d 65 73 73 61 67 65 3c 2f 73 74 rong>message</st
5d00: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 rong> <em>channe
5d10: 6c 20 64 69 72 65 63 74 69 6f 6e 20 76 65 72 73 l direction vers
5d20: 69 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65 ion content_type
5d30: 20 64 61 74 61 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 data</em>..</dt
5d40: 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 >..<dd>.. This
5d50: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
5d60: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 is invoked by t
5d70: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 he OpenSSL funct
5d80: 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c ion.. <code>SSL
5d90: 5f 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 _set_msg_callbac
5da0: 6b 28 29 3c 2f 63 6f 64 65 3e 20 77 68 65 6e 65 k()</code> whene
5db0: 76 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 ver a message is
5dc0: 20 73 65 6e 74 20 6f 72 0a 09 20 20 72 65 63 65 sent or.. rece
5dd0: 69 76 65 64 2e 20 49 74 20 69 73 20 6f 6e 6c 79 ived. It is only
5de0: 20 61 76 61 69 6c 61 62 6c 65 20 77 68 65 6e 0a available when.
5df0: 09 20 20 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f . OpenSSL is co
5e00: 6d 70 6c 69 65 64 20 77 69 74 68 20 74 68 65 20 mplied with the
5e10: 3c 65 6d 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 <em>enable-ssl-t
5e20: 72 61 63 65 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e race</em> option
5e30: 2e 0a 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 64 ... Where <em>d
5e40: 69 72 65 63 74 69 6f 6e 3c 2f 65 6d 3e 20 69 73 irection</em> is
5e50: 20 53 65 6e 74 20 6f 72 20 52 65 63 65 69 76 65 Sent or Receive
5e60: 64 2c 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f d, <em>version</
5e70: 65 6d 3e 20 69 73 20 74 68 65 0a 09 20 20 70 72 em> is the.. pr
5e80: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 2c 20 otocol version,
5e90: 3c 65 6d 3e 63 6f 6e 74 65 6e 74 5f 74 79 70 65 <em>content_type
5ea0: 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 6d 65 73 </em> is the mes
5eb0: 73 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 70 sage content typ
5ec0: 65 2c 0a 09 20 20 61 6e 64 20 3c 65 6d 3e 64 61 e,.. and <em>da
5ed0: 74 61 3c 2f 65 6d 3e 20 69 73 20 6d 6f 72 65 20 ta</em> is more
5ee0: 69 6e 66 6f 20 6f 6e 20 74 68 65 20 6d 65 73 73 info on the mess
5ef0: 61 67 65 20 66 72 6f 6d 20 74 68 65 20 3c 63 6f age from the <co
5f00: 64 65 3e 53 53 4c 5f 74 72 61 63 65 3c 2f 63 6f de>SSL_trace</co
5f10: 64 65 3e 20 41 50 49 2e 0a 09 3c 2f 64 64 3e 0a de> API...</dd>.
5f20: 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 .<br>...<dt>..
5f30: 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 3c <strong>session<
5f40: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 /strong> <em>cha
5f50: 6e 6e 65 6c 20 73 65 73 73 69 6f 6e 5f 69 64 20 nnel session_id
5f60: 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c ticket lifetime<
5f70: 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 /em>..</dt>..<dd
5f80: 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f >.. This form o
5f90: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e f callback is in
5fa0: 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 voked by the Ope
5fb0: 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 nSSL function..
5fc0: 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 <code>SSL_CTX_s
5fd0: 65 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 ess_set_new_cb()
5fe0: 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 57 68 65 72 </code>... Wher
5ff0: 65 20 3c 65 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 e <em>session_id
6000: 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20 63 75 72 </em> is the cur
6010: 72 65 6e 74 20 73 65 73 73 69 6f 6e 20 69 64 65 rent session ide
6020: 6e 74 69 66 69 65 72 2c 0a 09 20 20 3c 65 6d 3e ntifier,.. <em>
6030: 74 69 63 6b 65 74 3c 2f 65 6d 3e 20 69 73 20 74 ticket</em> is t
6040: 68 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 he session ticke
6050: 74 20 69 6e 66 6f 2c 20 61 6e 64 20 3c 65 6d 3e t info, and <em>
6060: 6c 69 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 20 lifetime</em>..
6070: 20 69 73 20 74 68 65 20 74 68 65 20 74 69 63 6b is the the tick
6080: 65 74 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 73 et lifetime in s
6090: 65 63 6f 6e 64 73 2e 0a 09 3c 2f 64 64 3e 0a 09 econds...</dd>..
60a0: 3c 62 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 <br>..</dl>.
60b0: 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a </dd>.. <br>.
60c0: 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 . <dt><strong
60d0: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f >-password</stro
60e0: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b ng> <em>callback
60f0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c </em></dt>. <
6100: 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 dd>..Invokes the
6110: 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 specified <em>c
6120: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 allback</em> scr
6130: 69 70 74 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c ipt when OpenSSL
6140: 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62 74 61 69 needs to..obtai
6150: 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 n a password. Se
6160: 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 e below for the
6170: 70 6f 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e possible argumen
6180: 74 73 20 70 61 73 73 65 64 20 74 6f 0a 09 74 68 ts passed to..th
6190: 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 e callback scrip
61a0: 74 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 t. See below for
61b0: 20 76 61 6c 69 64 20 72 65 74 75 72 6e 20 76 61 valid return va
61c0: 6c 75 65 73 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 lues....<br>..<b
61d0: 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e r>...<dl>...<dt>
61e0: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 70 61 73 73 .. <strong>pass
61f0: 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 word</strong> <e
6200: 6d 3e 72 77 66 6c 61 67 20 73 69 7a 65 3c 2f 65 m>rwflag size</e
6210: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a m>..</dt>..<dd>.
6220: 09 20 20 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20 . Invoked when
6230: 6c 6f 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69 loading or stori
6240: 6e 67 20 61 20 50 45 4d 20 63 65 72 74 69 66 69 ng a PEM certifi
6250: 63 61 74 65 20 77 69 74 68 20 65 6e 63 72 79 70 cate with encryp
6260: 74 69 6f 6e 2e 0a 09 20 20 57 68 65 72 65 20 3c tion... Where <
6270: 65 6d 3e 72 77 66 6c 61 67 3c 2f 65 6d 3e 20 69 em>rwflag</em> i
6280: 73 20 30 20 66 6f 72 20 72 65 61 64 69 6e 67 2f s 0 for reading/
6290: 64 65 63 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 decryption or 1
62a0: 66 6f 72 0a 09 20 20 77 72 69 74 69 6e 67 2f 65 for.. writing/e
62b0: 6e 63 72 79 70 74 69 6f 6e 20 28 63 61 6e 20 70 ncryption (can p
62c0: 72 6f 6d 70 74 20 75 73 65 72 20 74 6f 20 63 6f rompt user to co
62d0: 6e 66 69 72 6d 29 20 61 6e 64 0a 09 20 20 3c 65 nfirm) and.. <e
62e0: 6d 3e 73 69 7a 65 3c 2f 65 6d 3e 20 69 73 20 74 m>size</em> is t
62f0: 68 65 20 6d 61 78 20 70 61 73 73 77 6f 72 64 20 he max password
6300: 6c 65 6e 67 74 68 20 69 6e 20 62 79 74 65 73 2e length in bytes.
6310: 0a 09 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b .. The callback
6320: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 74 should return t
6330: 68 65 20 70 61 73 73 77 6f 72 64 20 61 73 20 61 he password as a
6340: 20 73 74 72 69 6e 67 2e 0a 09 3c 2f 64 64 3e 0a string...</dd>.
6350: 20 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c </dd>.. <
6360: 62 72 3e 0a 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 br>... <dt><s
6370: 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 trong>-validatec
6380: 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 ommand</strong>
6390: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d <em>callback</em
63a0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a ></dt>. <dd>.
63b0: 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 .Invokes the spe
63c0: 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 cified <em>callb
63d0: 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 ack</em> script
63e0: 64 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 during handshake
63f0: 20 69 6e 0a 09 6f 72 64 65 72 20 74 6f 20 76 61 in..order to va
6400: 6c 69 64 61 74 65 20 74 68 65 20 70 72 6f 76 69 lidate the provi
6410: 64 65 64 20 76 61 6c 75 65 28 73 29 2e 20 53 65 ded value(s). Se
6420: 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 e below for the
6430: 70 6f 73 73 69 62 6c 65 0a 09 61 72 67 75 6d 65 possible..argume
6440: 6e 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 nts passed to th
6450: 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 e callback scrip
6460: 74 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 t...To reject th
6470: 65 20 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 e value and abor
6480: 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 t connection, th
6490: 65 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c e callback shoul
64a0: 64 20 72 65 74 75 72 6e 20 30 2e 0a 09 54 6f 20 d return 0...To
64b0: 61 63 63 65 70 74 20 74 68 65 20 76 61 6c 75 65 accept the value
64c0: 20 61 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 and continue th
64d0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 e connection, it
64e0: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 should return 1
64f0: 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65 ...To reject the
6500: 20 76 61 6c 75 65 2c 20 62 75 74 20 63 6f 6e 74 value, but cont
6510: 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 inue the connect
6520: 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 ion, it should r
6530: 65 74 75 72 6e 20 32 2e 0a 0a 09 3c 62 72 3e 0a eturn 2....<br>.
6540: 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c .<br>...<dl>...<
6550: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 61 dt>.. <strong>a
6560: 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d lpn</strong> <em
6570: 3e 63 68 61 6e 6e 65 6c 20 70 72 6f 74 6f 63 6f >channel protoco
6580: 6c 20 6d 61 74 63 68 3c 2f 65 6d 3e 0a 09 3c 2f l match</em>..</
6590: 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 dt>..<dd>.. For
65a0: 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 servers, this f
65b0: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 orm of callback
65c0: 69 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 is invoked when
65d0: 74 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e 0a the client ALPN.
65e0: 09 20 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 . extension is
65f0: 72 65 63 65 69 76 65 64 2e 20 49 66 20 3c 65 6d received. If <em
6600: 3e 6d 61 74 63 68 3c 2f 65 6d 3e 20 69 73 20 74 >match</em> is t
6610: 72 75 65 2c 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f rue, <em>protoco
6620: 6c 3c 2f 65 6d 3e 0a 09 20 20 69 73 20 74 68 65 l</em>.. is the
6630: 20 66 69 72 73 74 20 3c 62 3e 2d 61 6c 70 6e 3c first <b>-alpn<
6640: 2f 62 3e 20 73 70 65 63 69 66 69 65 64 20 70 72 /b> specified pr
6650: 6f 74 6f 63 6f 6c 20 63 6f 6d 6d 6f 6e 20 74 6f otocol common to
6660: 20 74 68 65 20 62 6f 74 68 20 74 68 65 0a 09 20 the both the..
6670: 20 63 6c 69 65 6e 74 20 61 6e 64 20 73 65 72 76 client and serv
6680: 65 72 2e 20 49 66 20 6e 6f 74 2c 20 74 68 65 20 er. If not, the
6690: 66 69 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 first client spe
66a0: 63 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 cified protocol
66b0: 69 73 0a 09 20 20 75 73 65 64 2e 20 43 61 6c 6c is.. used. Call
66c0: 65 64 20 61 66 74 65 72 20 68 65 6c 6c 6f 20 61 ed after hello a
66d0: 6e 64 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b nd ALPN callback
66e0: 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e s...</dd>...<br>
66f0: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f ...<dt>.. <stro
6700: 6e 67 3e 68 65 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 ng>hello</strong
6710: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 73 65 > <em>channel se
6720: 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c rvername</em>..<
6730: 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f /dt>..<dd>.. Fo
6740: 72 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 r servers, this
6750: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b form of callback
6760: 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 is invoked duri
6770: 6e 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 0a ng client hello.
6780: 09 20 20 6d 65 73 73 61 67 65 20 70 72 6f 63 65 . message proce
6790: 73 73 69 6e 67 2e 20 49 74 20 69 73 20 75 73 65 ssing. It is use
67a0: 64 20 74 6f 20 73 65 6c 65 63 74 20 61 6e 20 61 d to select an a
67b0: 70 70 72 6f 70 72 69 61 74 65 20 63 65 72 74 69 ppropriate certi
67c0: 66 69 63 61 74 65 20 74 6f 0a 09 20 20 70 72 65 ficate to.. pre
67d0: 73 65 6e 74 2c 20 61 6e 64 20 6d 61 6b 65 20 6f sent, and make o
67e0: 74 68 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 ther configurati
67f0: 6f 6e 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 on adjustments r
6800: 65 6c 65 76 61 6e 74 20 74 6f 20 74 68 61 74 0a elevant to that.
6810: 09 20 20 73 65 72 76 65 72 20 6e 61 6d 65 20 61 . server name a
6820: 6e 64 20 69 74 73 20 63 6f 6e 66 69 67 75 72 61 nd its configura
6830: 74 69 6f 6e 2e 20 43 61 6c 6c 65 64 20 62 65 66 tion. Called bef
6840: 6f 72 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e ore SNI and ALPN
6850: 20 63 61 6c 6c 62 61 63 6b 73 2e 0a 09 3c 2f 64 callbacks...</d
6860: 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e d>...<br>...<dt>
6870: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c .. <strong>sni<
6880: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 /strong> <em>cha
6890: 6e 6e 65 6c 20 73 65 72 76 65 72 6e 61 6d 65 3c nnel servername<
68a0: 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 /em>..</dt>..<dd
68b0: 3e 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 >.. For servers
68c0: 2c 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 , this form of c
68d0: 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b allback is invok
68e0: 65 64 20 77 68 65 6e 20 74 68 65 20 53 4e 49 20 ed when the SNI
68f0: 65 78 74 65 6e 73 69 6f 6e 0a 09 20 20 66 72 6f extension.. fro
6900: 6d 20 74 68 65 20 63 6c 69 65 6e 74 20 69 73 20 m the client is
6910: 72 65 63 65 69 76 65 64 2e 20 57 68 65 72 65 20 received. Where
6920: 3c 65 6d 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f <em>servername</
6930: 65 6d 3e 20 69 73 20 74 68 65 20 63 6c 69 65 6e em> is the clien
6940: 74 0a 09 20 20 70 72 6f 76 69 64 65 64 20 73 65 t.. provided se
6950: 72 76 65 72 20 6e 61 6d 65 20 66 72 6f 6d 20 74 rver name from t
6960: 68 65 20 3c 62 3e 2d 73 65 72 76 65 72 6e 61 6d he <b>-servernam
6970: 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 e</b> option. Th
6980: 69 73 20 69 73 0a 09 20 20 75 73 65 64 20 77 68 is is.. used wh
6990: 65 6e 20 61 20 73 65 72 76 65 72 20 73 75 70 70 en a server supp
69a0: 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e 61 orts multiple na
69b0: 6d 65 73 2c 20 73 6f 20 74 68 65 20 72 69 67 68 mes, so the righ
69c0: 74 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 t certificate..
69d0: 20 63 61 6e 20 62 65 20 75 73 65 64 2e 20 43 61 can be used. Ca
69e0: 6c 6c 65 64 20 61 66 74 65 72 20 68 65 6c 6c 6f lled after hello
69f0: 20 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 callback but be
6a00: 66 6f 72 65 20 41 4c 50 4e 20 63 61 6c 6c 62 61 fore ALPN callba
6a10: 63 6b 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 ck...</dd>...<br
6a20: 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 >...<dt>.. <str
6a30: 6f 6e 67 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f ong>verify</stro
6a40: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 ng> <em>channel
6a50: 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 depth cert statu
6a60: 73 20 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f s error</em>..</
6a70: 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 dt>..<dd>.. Thi
6a80: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 s form of callba
6a90: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 ck is invoked by
6aa0: 20 4f 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 OpenSSL when a
6ab0: 6e 65 77 20 63 65 72 74 69 66 69 63 61 74 65 0a new certificate.
6ac0: 09 20 20 69 73 20 72 65 63 65 69 76 65 64 20 66 . is received f
6ad0: 72 6f 6d 20 74 68 65 20 70 65 65 72 2e 20 49 74 rom the peer. It
6ae0: 20 61 6c 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 allows the clie
6af0: 6e 74 20 74 6f 20 63 68 65 63 6b 20 74 68 65 0a nt to check the.
6b00: 09 20 20 63 65 72 74 69 66 69 63 61 74 65 20 76 . certificate v
6b10: 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75 erification resu
6b20: 6c 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 20 77 lts and choose w
6b30: 68 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69 6e hether to contin
6b40: 75 65 0a 09 20 20 6f 72 20 6e 6f 74 2e 20 49 74 ue.. or not. It
6b50: 20 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 is called for e
6b60: 61 63 68 20 63 65 72 74 69 66 69 63 61 74 65 20 ach certificate
6b70: 69 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61 in the certifica
6b80: 74 65 20 63 68 61 69 6e 2e 0a 09 20 20 3c 75 6c te chain... <ul
6b90: 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d >.. <li>The <em
6ba0: 3e 64 65 70 74 68 3c 2f 65 6d 3e 20 61 72 67 75 >depth</em> argu
6bb0: 6d 65 6e 74 20 69 73 20 61 6e 20 69 6e 74 65 67 ment is an integ
6bc0: 65 72 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 er representing
6bd0: 74 68 65 0a 09 20 20 63 75 72 72 65 6e 74 20 64 the.. current d
6be0: 65 70 74 68 20 6f 6e 20 74 68 65 20 63 65 72 74 epth on the cert
6bf0: 69 66 69 63 61 74 65 20 63 68 61 69 6e 2c 20 77 ificate chain, w
6c00: 69 74 68 0a 09 20 20 3c 63 6f 64 65 3e 30 3c 2f ith.. <code>0</
6c10: 63 6f 64 65 3e 20 61 73 20 74 68 65 20 70 65 65 code> as the pee
6c20: 72 20 63 65 72 74 69 66 69 63 61 74 65 20 61 6e r certificate an
6c30: 64 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 20 d higher values
6c40: 67 6f 69 6e 67 0a 09 20 20 75 70 20 74 6f 20 74 going.. up to t
6c50: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 he Certificate A
6c60: 75 74 68 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f uthority (CA).</
6c70: 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c li>.. <li>The <
6c80: 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 20 61 72 67 em>cert</em> arg
6c90: 75 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20 ument is a list
6ca0: 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 of key-value pai
6cb0: 72 73 20 73 69 6d 69 6c 61 72 0a 09 20 20 74 6f rs similar.. to
6cc0: 20 74 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 those returned
6cd0: 62 79 0a 09 20 20 3c 61 20 68 72 65 66 3d 22 23 by.. <a href="#
6ce0: 74 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 tls::status"><st
6cf0: 72 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 rong>tls::status
6d00: 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 2e 3c 2f </strong></a>.</
6d10: 6c 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c li>.. <li>The <
6d20: 65 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 61 em>status</em> a
6d30: 72 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 62 6f rgument is an bo
6d40: 6f 6c 65 61 6e 20 72 65 70 72 65 73 65 6e 74 69 olean representi
6d50: 6e 67 20 74 68 65 0a 09 20 20 76 61 6c 69 64 69 ng the.. validi
6d60: 74 79 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e ty of the curren
6d70: 74 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 09 t certificate...
6d80: 20 20 41 20 76 61 6c 75 65 20 6f 66 20 3c 63 6f A value of <co
6d90: 64 65 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e de>0</code> mean
6da0: 73 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 s the certificat
6db0: 65 20 69 73 20 64 65 65 6d 65 64 20 69 6e 76 61 e is deemed inva
6dc0: 6c 69 64 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 lid... A value
6dd0: 6f 66 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f 64 65 of <code>1</code
6de0: 3e 20 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 > means the cert
6df0: 69 66 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 ificate is deeme
6e00: 64 20 76 61 6c 69 64 2e 3c 2f 6c 69 3e 0a 09 20 d valid.</li>..
6e10: 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 65 72 72 <li>The <em>err
6e20: 6f 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 or</em> argument
6e30: 20 73 75 70 70 6c 69 65 73 20 74 68 65 20 6d 65 supplies the me
6e40: 73 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 ssage, if any, g
6e50: 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20 3c enerated.. by <
6e60: 63 6f 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f code>X509_STORE_
6e70: 43 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c CTX_get_error()<
6e80: 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 /code>.</li>..
6e90: 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 </ul>..</dd>..<b
6ea0: 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f r>..</dl>. </
6eb0: 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 dd>.</dl>.</bloc
6ec0: 6b 71 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 kquote>..<p>.Ref
6ed0: 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 erence implement
6ee0: 61 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 ations of these
6ef0: 63 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 callbacks are pr
6f00: 6f 76 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69 ovided in the.di
6f10: 73 74 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 stribution as <s
6f20: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 trong>tls::callb
6f30: 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 ack</strong>, <s
6f40: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 trong>tls::passw
6f50: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 61 6e ord</strong>,.an
6f60: 64 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 d <strong>tls::v
6f70: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c alidate_command<
6f80: 2f 73 74 72 6f 6e 67 3e 20 72 65 73 70 65 63 74 /strong> respect
6f90: 69 76 65 6c 79 2e 20 20 4e 6f 74 65 20 74 68 61 ively. Note tha
6fa0: 74 20 74 68 65 73 65 20 61 72 65 0a 3c 65 6d 3e t these are.<em>
6fb0: 73 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c sample</em> impl
6fc0: 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 ementations only
6fd0: 2e 20 20 49 6e 20 61 20 6d 6f 72 65 20 72 65 61 . In a more rea
6fe0: 6c 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e listic deploymen
6ff0: 74 0a 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 t.you would spec
7000: 69 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c ify your own cal
7010: 6c 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e lback scripts on
7020: 20 65 61 63 68 20 54 4c 53 20 63 68 61 6e 6e 65 each TLS channe
7030: 6c 20 75 73 69 6e 67 20 74 68 65 0a 3c 73 74 72 l using the.<str
7040: 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 ong>-command</st
7050: 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d rong>, <strong>-
7060: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 password</strong
7070: 3e 2c 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d >, and <strong>-
7080: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 validate_command
7090: 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e </strong> option
70a0: 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 s..</p>..<p>.The
70b0: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f default behavio
70c0: 72 20 77 68 65 6e 20 74 68 65 20 3c 73 74 72 6f r when the <stro
70d0: 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 ng>-command</str
70e0: 6f 6e 67 3e 20 61 6e 64 20 3c 73 74 72 6f 6e 67 ong> and <strong
70f0: 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 >-validate_comma
7100: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 0a 6f 70 74 69 nd</strong>.opti
7110: 6f 6e 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 ons are not spec
7120: 69 66 69 65 64 20 69 73 20 66 6f 72 20 54 4c 53 ified is for TLS
7130: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 to process the
7140: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 associated libra
7150: 72 79 20 63 61 6c 6c 62 61 63 6b 73 0a 69 6e 74 ry callbacks.int
7160: 65 72 6e 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 ernally. The def
7170: 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 ault behavior wh
7180: 65 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 2d en the <strong>-
7190: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 password</strong
71a0: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 0a > option is not.
71b0: 73 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 specified is for
71c0: 20 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 TLS to process
71d0: 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c the associated l
71e0: 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 ibrary callbacks
71f0: 20 62 79 20 61 74 74 65 6d 70 74 69 6e 67 0a 74 by attempting.t
7200: 6f 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 o call <strong>t
7210: 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 ls::password</st
7220: 72 6f 6e 67 3e 2e 0a 54 68 65 20 64 69 66 66 65 rong>..The diffe
7230: 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 rence between th
7240: 65 73 65 20 74 77 6f 20 62 65 68 61 76 69 6f 72 ese two behavior
7250: 73 20 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e s is a consequen
7260: 63 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e ce of maintainin
7270: 67 0a 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 g.compatibility
7280: 77 69 74 68 20 65 61 72 6c 69 65 72 20 69 6d 70 with earlier imp
7290: 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f lementations..</
72a0: 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 74 72 p>..<p>.The <str
72b0: 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f ong>tls::debug</
72c0: 73 74 72 6f 6e 67 3e 20 76 61 72 69 61 62 6c 65 strong> variable
72d0: 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 provides some a
72e0: 64 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f dditional.contro
72f0: 6c 20 6f 76 65 72 20 74 68 65 73 65 20 72 65 66 l over these ref
7300: 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 erence callbacks
7310: 2e 20 20 49 74 73 20 76 61 6c 75 65 20 69 73 20 . Its value is
7320: 7a 65 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e zero by default.
7330: 0a 48 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 .Higher values p
7340: 72 6f 64 75 63 65 20 6d 6f 72 65 20 64 69 61 67 roduce more diag
7350: 6e 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61 nostic output, a
7360: 6e 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 nd will also for
7370: 63 65 20 74 68 65 0a 76 65 72 69 66 79 20 6d 65 ce the.verify me
7380: 74 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67 3e thod in <strong>
7390: 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 tls::callback</s
73a0: 74 72 6f 6e 67 3e 20 74 6f 20 61 63 63 65 70 74 trong> to accept
73b0: 20 74 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 the.certificate
73c0: 2c 20 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 , even when it i
73d0: 73 20 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 3e 0a s invalid..</p>.
73e0: 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 .<p>.<em>.The us
73f0: 65 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e e of the referen
7400: 63 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c 73 74 ce callbacks <st
7410: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 rong>tls::callba
7420: 63 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 3c 73 74 ck</strong>,.<st
7430: 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f rong>tls::passwo
7440: 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 rd</strong>, and
7450: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 <strong>tls::va
7460: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f lidate_command</
7470: 73 74 72 6f 6e 67 3e 0a 69 73 20 6e 6f 74 20 72 strong>.is not r
7480: 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 ecommended. The
7490: 79 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 y may be removed
74a0: 20 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c from future rel
74b0: 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 eases..</em>.</p
74c0: 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 >..<p>.<em>.The
74d0: 75 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 use of the varia
74e0: 62 6c 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a ble <strong>tls:
74f0: 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 :debug</strong>
7500: 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 is not recommend
7510: 65 64 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 ed..It may be re
7520: 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 moved from futur
7530: 65 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d e releases..</em
7540: 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e >.</p>..<h3><a n
7550: 61 6d 65 3d 22 44 45 42 55 47 22 3e 44 45 42 55 ame="DEBUG">DEBU
7560: 47 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 54 4c 53 20 G</a></h3>..TLS
7570: 6b 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 key logging can
7580: 62 65 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 be enabled by se
7590: 74 74 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f tting the enviro
75a0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c nment variable.<
75b0: 62 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c b>SSLKEYLOGFILE<
75c0: 2f 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 /b> to the name
75d0: 6f 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c of the file to l
75e0: 6f 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e og to. Then when
75f0: 65 76 65 72 20 54 4c 53 0a 6b 65 79 20 6d 61 74 ever TLS.key mat
7600: 65 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74 erial is generat
7610: 65 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 69 ed or received i
7620: 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 t will be logged
7630: 20 74 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68 to the file. Th
7640: 69 73 0a 69 73 20 75 73 65 66 75 6c 20 66 6f 72 is.is useful for
7650: 20 6c 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74 logging key dat
7660: 61 20 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f a for network lo
7670: 67 67 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 gging tools to u
7680: 73 65 20 74 6f 0a 64 65 63 72 79 70 74 20 74 68 se to.decrypt th
7690: 65 20 64 61 74 61 2e 0a 0a 3c 68 33 3e 3c 61 20 e data...<h3><a
76a0: 6e 61 6d 65 3d 22 48 54 54 50 53 20 45 58 41 4d name="HTTPS EXAM
76b0: 50 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 PLE">HTTPS EXAMP
76c0: 4c 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e LE</a></h3>..<p>
76d0: 54 68 69 73 20 65 78 61 6d 70 6c 65 20 75 73 65 This example use
76e0: 73 20 61 20 73 61 6d 70 6c 65 20 73 65 72 76 65 s a sample serve
76f0: 72 2e 70 65 6d 20 70 72 6f 76 69 64 65 64 20 77 r.pem provided w
7700: 69 74 68 20 74 68 65 20 54 4c 53 20 72 65 6c 65 ith the TLS rele
7710: 61 73 65 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 ase,.courtesy of
7720: 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 the <strong>Ope
7730: 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 nSSL</strong> pr
7740: 6f 6a 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 oject.</p>..<pre
7750: 3e 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 ><code>.package
7760: 72 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 require http.pac
7770: 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 kage require tls
7780: 0a 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 ..http::register
7790: 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 https 443 [list
77a0: 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d ::tls::socket -
77b0: 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 autoservername t
77c0: 72 75 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 rue -require tru
77d0: 65 20 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 e -cadir /etc/ss
77e0: 6c 2f 63 65 72 74 73 5d 0a 0a 73 65 74 20 74 6f l/certs]..set to
77f0: 6b 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 k [http::geturl
7800: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e https://www.tcl.
7810: 74 6b 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 tk/].</code></pr
7820: 65 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d e>..<h3><a name=
7830: 22 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 "SPECIAL CONSIDE
7840: 52 41 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c RATIONS">SPECIAL
7850: 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c CONSIDERATIONS<
7860: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 /a></h3>..<p>The
7870: 20 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 capabilities of
7880: 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 this package ca
7890: 6e 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c n vary enormousl
78a0: 79 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 y based upon how
78b0: 20 79 6f 75 72 0a 4f 70 65 6e 53 53 4c 20 6c 69 your.OpenSSL li
78c0: 62 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 brary was config
78d0: 75 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 ured and built.
78e0: 4e 65 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79 New versions may
78f0: 20 6f 62 73 6f 6c 65 74 65 20 6f 6c 64 65 72 0a obsolete older.
7900: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e protocol version
7910: 73 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 s, add or remove
7920: 20 63 69 70 68 65 72 73 2c 20 63 68 61 6e 67 65 ciphers, change
7930: 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2c default values,
7940: 20 65 74 63 2e 20 55 73 65 20 74 68 65 0a 3c 73 etc. Use the.<s
7950: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 68 65 trong>tls::ciphe
7960: 72 73 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 20 rs</strong> and
7970: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f <strong>tls::pro
7980: 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 tocols</strong>
7990: 63 6f 6d 6d 61 6e 64 73 20 74 6f 0a 6f 62 74 61 commands to.obta
79a0: 69 6e 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 in the supported
79b0: 20 76 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a versions.</p>..
79c0: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 <h3><a name="SEE
79d0: 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c ALSO">SEE ALSO<
79e0: 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 /a></h3>..<p><st
79f0: 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 rong>socket</str
7a00: 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 ong>, <strong>fi
7a10: 6c 65 65 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e leevent, </stron
7a20: 67 3e 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a g><a.href="http:
7a30: 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 //www.openssl.or
7a40: 67 2f 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e g/"><strong>Open
7a50: 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e SSL</strong></a>
7a60: 3c 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65 </p>..<hr>..<pre
7a70: 3e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 >.Copyright &cop
7a80: 79 3b 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 y; 1999 Matt New
7a90: 6d 61 6e 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 man..Copyright &
7aa0: 63 6f 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 copy; 2004 Starf
7ab0: 69 73 68 20 53 79 73 74 65 6d 73 2e 0a 3c 2f 70 ish Systems..</p
7ac0: 72 65 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 re>.</body>.</ht
7ad0: 6d 6c 3e 0a ml>.