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 68 61 <dd><b>tls::ha
0530: 73 68 65 73 3c 2f 62 3e 3c 2f 64 64 3e 0a 09 20 shes</b></dd>..
0540: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 6d <dd><b>tls::m
0550: 64 34 3c 2f 62 3e 20 3c 65 6d 3e 64 61 74 61 3c d4</b> <em>data<
0560: 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c /em></dd>.. <
0570: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 35 3c 2f dd><b>tls::md5</
0580: 62 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e b> <em>data</em>
0590: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c </dd>.. <dd><
05a0: 62 3e 74 6c 73 3a 3a 73 68 61 31 3c 2f 62 3e 20 b>tls::sha1</b>
05b0: 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 <em>data</em></d
05c0: 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 d>.. <dd><b>t
05d0: 6c 73 3a 3a 73 68 61 32 35 36 3c 2f 62 3e 20 3c ls::sha256</b> <
05e0: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 em>data</em></dd
05f0: 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 >..</dl>. </d
0600: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 d>. <dd><a hr
0610: 65 66 3d 22 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 ef="#COMMANDS">C
0620: 4f 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e OMMANDS</a></dd>
0630: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 . <dd><a href
0640: 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 ="#CALLBACK OPTI
0650: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 ONS">CALLBACK OP
0660: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 TIONS</a></dd>.
0670: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 <dd><a href="
0680: 23 48 54 54 50 53 20 45 58 41 4d 50 4c 45 22 3e #HTTPS EXAMPLE">
0690: 48 54 54 50 53 20 45 58 41 4d 50 4c 45 3c 2f 61 HTTPS EXAMPLE</a
06a0: 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c ></dd>. <dd><
06b0: 61 20 68 72 65 66 3d 22 23 53 45 45 20 41 4c 53 a href="#SEE ALS
06c0: 4f 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 O">SPECIAL CONSI
06d0: 44 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 DERATIONS</a></d
06e0: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 d>. <dd><a hr
06f0: 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 ef="#SEE ALSO">S
0700: 45 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e EE ALSO</a></dd>
0710: 0a 3c 2f 64 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 .</dl>..<hr>..<h
0720: 33 3e 3c 61 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3><a name="NAME"
0730: 3e 4e 41 4d 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a >NAME</a></h3>..
0740: 3c 70 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f <p><strong>tls</
0750: 73 74 72 6f 6e 67 3e 20 2d 20 62 69 6e 64 69 6e strong> - bindin
0760: 67 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 g to <strong>Ope
0770: 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f nSSL</strong>.to
0780: 6f 6c 6b 69 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e olkit.</p>..<h3>
0790: 3c 61 20 6e 61 6d 65 3d 22 53 59 4e 4f 50 53 49 <a name="SYNOPSI
07a0: 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c S">SYNOPSIS</a><
07b0: 2f 68 33 3e 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b /h3>..<p><b>pack
07c0: 61 67 65 20 72 65 71 75 69 72 65 20 54 63 6c 20 age require Tcl
07d0: 38 2e 35 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70 8.5</b><br>.<b>p
07e0: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 ackage require t
07f0: 6c 73 3c 2f 62 3e 3c 62 72 3e 0a 3c 62 72 3e 0a ls</b><br>.<br>.
0800: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 <a href="#tls::i
0810: 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 nit"><b>tls::ini
0820: 74 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e t</b> <i>?option
0830: 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c s?</i></a><br>.<
0840: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 6f a href="#tls::so
0850: 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f cket"><b>tls::so
0860: 63 6b 65 74 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 cket</b> <i>?opt
0870: 69 6f 6e 73 3f 20 68 6f 73 74 20 70 6f 72 74 3c ions? host port<
0880: 2f 69 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d /i><br>.<a href=
0890: 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c "#tls::socket"><
08a0: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 b>tls::socket</b
08b0: 3e 20 3c 69 3e 3f 2d 73 65 72 76 65 72 20 63 6f > <i>?-server co
08c0: 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f mmand? ?options?
08d0: 20 70 6f 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 port</i></a><br
08e0: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a >.<a href="#tls:
08f0: 3a 73 74 61 74 75 73 22 3e 3c 62 3e 74 6c 73 3a :status"><b>tls:
0900: 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 69 3e 3f :status</b> <i>?
0910: 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c -local? channel<
0920: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 /i></a><br>.<a h
0930: 72 65 66 3d 22 23 74 6c 73 3a 3a 63 6f 6e 6e 65 ref="#tls::conne
0940: 63 74 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 63 ction"><b>tls::c
0950: 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 onnection</b> <i
0960: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e >channel</i></a>
0970: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 <br>.<a href="#t
0980: 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 22 3e 3c ls::handshake"><
0990: 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 b>tls::handshake
09a0: 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c </b> <i>channel<
09b0: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 /i></a><br>.<a h
09c0: 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 ref="#tls::impor
09d0: 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 t"><b>tls::impor
09e0: 74 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c t</b> <i>channel
09f0: 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f ?options?</i></
0a00: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 a><br>.<a href="
0a10: 23 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e #tls::unimport">
0a20: 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 <b>tls::unimport
0a30: 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c </b> <i>channel<
0a40: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e /i></a><br>.<br>
0a50: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a .<a href="#tls::
0a60: 63 69 70 68 65 72 73 22 3e 3c 62 3e 74 6c 73 3a ciphers"><b>tls:
0a70: 3a 63 69 70 68 65 72 73 3c 2f 62 3e 20 3c 69 3e :ciphers</b> <i>
0a80: 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 protocol ?verbos
0a90: 65 3f 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f e? ?supported?</
0aa0: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
0ab0: 65 66 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 ef="#tls::protoc
0ac0: 6f 6c 73 22 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f ols"><b>tls::pro
0ad0: 74 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 tocols</b></a><b
0ae0: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 r>.<a href="#tls
0af0: 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74 6c ::version"><b>tl
0b00: 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f s::version</b></
0b10: 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 a><br>.<br>.<a h
0b20: 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61 73 68 22 ref="#tls::hash"
0b30: 3e 3c 62 3e 74 6c 73 3a 3a 68 61 73 68 3c 2f 62 ><b>tls::hash</b
0b40: 3e 20 3c 69 3e 74 79 70 65 20 64 61 74 61 3c 2f > <i>type data</
0b50: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 i></a><br>.<a hr
0b60: 65 66 3d 22 23 74 6c 73 3a 3a 68 61 73 68 65 73 ef="#tls::hashes
0b70: 22 3e 3c 62 3e 74 6c 73 3a 3a 68 61 73 68 65 73 "><b>tls::hashes
0b80: 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 </b></a><br>.<a
0b90: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 6d 64 34 22 href="#tls::md4"
0ba0: 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 62 3e ><b>tls::md4</b>
0bb0: 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e <i>data</i></a>
0bc0: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 <br>.<a href="#t
0bd0: 6c 73 3a 3a 6d 64 35 22 3e 3c 62 3e 74 6c 73 3a ls::md5"><b>tls:
0be0: 3a 6d 64 35 3c 2f 62 3e 20 3c 69 3e 64 61 74 61 :md5</b> <i>data
0bf0: 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 </i></a><br>.<a
0c00: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 68 61 31 href="#tls::sha1
0c10: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 68 61 31 3c 2f "><b>tls::sha1</
0c20: 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c 2f b> <i>data</i></
0c30: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 a><br>.<a href="
0c40: 23 74 6c 73 3a 3a 73 68 61 32 35 36 22 3e 3c 62 #tls::sha256"><b
0c50: 3e 74 6c 73 3a 3a 73 68 61 32 35 36 3c 2f 62 3e >tls::sha256</b>
0c60: 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e <i>data</i></a>
0c70: 3c 62 72 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c <br>.</p>..<h3><
0c80: 61 20 6e 61 6d 65 3d 22 44 45 53 43 52 49 50 54 a name="DESCRIPT
0c90: 49 4f 4e 22 3e 44 45 53 43 52 49 50 54 49 4f 4e ION">DESCRIPTION
0ca0: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 </a></h3>..<p>Th
0cb0: 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 70 72 6f is extension pro
0cc0: 76 69 64 65 73 20 61 20 67 65 6e 65 72 69 63 20 vides a generic
0cd0: 62 69 6e 64 69 6e 67 20 74 6f 20 3c 61 0a 68 72 binding to <a.hr
0ce0: 65 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f ef="http://www.o
0cf0: 70 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 penssl.org/">Ope
0d00: 6e 53 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a nSSL</a>, utiliz
0d10: 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e ing the.<strong>
0d20: 54 63 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c Tcl_StackChannel
0d30: 3c 2f 73 74 72 6f 6e 67 3e 0a 41 50 49 20 66 6f </strong>.API fo
0d40: 72 20 54 63 6c 20 38 2e 34 20 61 6e 64 20 68 69 r Tcl 8.4 and hi
0d50: 67 68 65 72 2e 20 54 68 65 20 73 6f 63 6b 65 74 gher. The socket
0d60: 73 20 62 65 68 61 76 65 20 65 78 61 63 74 6c 79 s behave exactly
0d70: 20 74 68 65 20 73 61 6d 65 0a 61 73 20 63 68 61 the same.as cha
0d80: 6e 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 73 nnels created us
0d90: 69 6e 67 20 54 63 6c 27 73 20 62 75 69 6c 74 2d ing Tcl's built-
0da0: 69 6e 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 in <strong>socke
0db0: 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 t</strong>.comma
0dc0: 6e 64 20 77 69 74 68 20 61 64 64 69 74 69 6f 6e nd with addition
0dd0: 61 6c 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 63 al options for c
0de0: 6f 6e 74 72 6f 6c 6c 69 6e 67 20 74 68 65 20 53 ontrolling the S
0df0: 53 4c 20 73 65 73 73 69 6f 6e 2e 0a 3c 2f 70 3e SL session..</p>
0e00: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43 ..<h3><a name="C
0e10: 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44 OMMANDS">COMMAND
0e20: 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 S</a></h3>..<p>T
0e30: 79 70 69 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75 ypically one wou
0e40: 6c 64 20 75 73 65 20 74 68 65 20 3c 73 74 72 6f ld use the <stro
0e50: 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c ng>tls::socket <
0e60: 2f 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a /strong>command.
0e70: 77 68 69 63 68 20 70 72 6f 76 69 64 65 73 20 63 which provides c
0e80: 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 ompatibility wit
0e90: 68 20 74 68 65 20 6e 61 74 69 76 65 20 54 63 6c h the native Tcl
0ea0: 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c <strong>socket<
0eb0: 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 /strong>.command
0ec0: 2e 20 49 6e 20 73 75 63 68 20 63 61 73 65 73 20 . In such cases
0ed0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 <strong>tls::imp
0ee0: 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f ort</strong> sho
0ef0: 75 6c 64 20 6e 6f 74 20 62 65 0a 75 73 65 64 20 uld not be.used
0f00: 64 69 72 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c directly.</p>..<
0f10: 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e dl>. <dt><a n
0f20: 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e ame="tls::init">
0f30: 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c 2f 62 <b>tls::init </b
0f40: 3e 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 ><i>?options?</i
0f50: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c ></a></dt>. <
0f60: 64 64 3e 4f 70 74 69 6f 6e 61 6c 20 66 75 6e 63 dd>Optional func
0f70: 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 68 65 20 tion to set the
0f80: 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e 73 20 default options
0f90: 75 73 65 64 20 62 79 0a 09 3c 73 74 72 6f 6e 67 used by..<strong
0fa0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 >tls::socket</st
0fb0: 72 6f 6e 67 3e 2e 20 49 66 20 79 6f 75 20 63 61 rong>. If you ca
0fc0: 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a ll <strong>tls::
0fd0: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 0a import</strong>.
0fe0: 09 64 69 72 65 63 74 6c 79 20 74 68 69 73 20 72 .directly this r
0ff0: 6f 75 74 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 outine has no ef
1000: 66 65 63 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 fect. Any of the
1010: 20 6f 70 74 69 6f 6e 73 0a 09 74 68 61 74 20 3c options..that <
1020: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b strong>tls::sock
1030: 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 61 63 63 65 et</strong> acce
1040: 70 74 73 20 63 61 6e 20 62 65 20 73 65 74 0a 09 pts can be set..
1050: 75 73 69 6e 67 20 74 68 69 73 20 63 6f 6d 6d 61 using this comma
1060: 6e 64 2c 20 74 68 6f 75 67 68 20 79 6f 75 20 73 nd, though you s
1070: 68 6f 75 6c 64 20 6c 69 6d 69 74 20 79 6f 75 72 hould limit your
1080: 20 6f 70 74 69 6f 6e 73 0a 09 74 6f 20 6f 6e 6c options..to onl
1090: 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20 6f 6e y TLS related on
10a0: 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 es.</dd>. <dt
10b0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 > </dt>.
10c0: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
10d0: 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c s::socket"><b>tl
10e0: 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c 65 s::socket </b><e
10f0: 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 09 68 6f 73 m>?options?..hos
1100: 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 61 3e 3c t port</em></a><
1110: 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 62 3e /dt>. <dt><b>
1120: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 3c tls::socket</b><
1130: 65 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f 6d em> ?-server com
1140: 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 mand? ?options?
1150: 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 port</em></dt>.
1160: 20 20 20 3c 64 64 3e 54 68 69 73 20 69 73 20 61 <dd>This is a
1170: 20 68 65 6c 70 65 72 20 66 75 6e 63 74 69 6f 6e helper function
1180: 20 74 68 61 74 20 75 74 69 6c 69 7a 65 73 20 74 that utilizes t
1190: 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 0a 09 63 he underlying..c
11a0: 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67 ommands (<strong
11b0: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 >tls::import</st
11c0: 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76 rong>). It behav
11d0: 65 73 0a 09 65 78 61 63 74 6c 79 20 74 68 65 20 es..exactly the
11e0: 73 61 6d 65 20 61 73 20 74 68 65 20 6e 61 74 69 same as the nati
11f0: 76 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73 ve Tcl <strong>s
1200: 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 ocket</strong>..
1210: 63 6f 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 command except t
1220: 68 61 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 hat the options
1230: 63 61 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 can include any
1240: 6f 66 20 74 68 65 0a 09 61 70 70 6c 69 63 61 62 of the..applicab
1250: 6c 65 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 le <a href="#tls
1260: 3a 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72 6f 6e ::import"><stron
1270: 67 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f 73 74 g>tls:import</st
1280: 72 6f 6e 67 3e 3c 2f 61 3e 0a 09 6f 70 74 69 6f rong></a>..optio
1290: 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 64 64 69 ns with one addi
12a0: 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 3a 0a 3c tional option:.<
12b0: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 blockquote>.
12c0: 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e <dl>..<dt><stron
12d0: 67 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d g>-autoservernam
12e0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 e</strong> <em>b
12f0: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ool</em></dt>..<
1300: 64 64 3e 41 75 74 6f 6d 61 74 69 63 61 6c 6c 79 dd>Automatically
1310: 20 73 65 6e 64 20 74 68 65 20 2d 73 65 72 76 65 send the -serve
1320: 72 6e 61 6d 65 20 61 73 20 74 68 65 20 3c 65 6d rname as the <em
1330: 3e 68 6f 73 74 3c 2f 65 6d 3e 20 61 72 67 75 6d >host</em> argum
1340: 65 6e 74 0a 09 20 20 20 20 28 64 65 66 61 75 6c ent.. (defaul
1350: 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f t is <em>false</
1360: 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f em>)</dd>. </
1370: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 dl>.</blockquote
1380: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 >.. <dt><a na
1390: 6d 65 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 me="tls::import"
13a0: 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 20 ><b>tls::import
13b0: 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a 09 </b><i>channel..
13c0: 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 ?options?</i></a
13d0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 53 ></dt>. <dd>S
13e0: 53 4c 2d 65 6e 61 62 6c 65 20 61 20 72 65 67 75 SL-enable a regu
13f0: 6c 61 72 20 54 63 6c 20 63 68 61 6e 6e 65 6c 20 lar Tcl channel
1400: 2d 20 69 74 20 6e 65 65 64 20 6e 6f 74 20 62 65 - it need not be
1410: 20 61 0a 09 73 6f 63 6b 65 74 2c 20 62 75 74 20 a..socket, but
1420: 6d 75 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d must provide bi-
1430: 64 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 directional flow
1440: 2e 20 41 6c 73 6f 0a 09 73 65 74 74 69 6e 67 20 . Also..setting
1450: 73 65 73 73 69 6f 6e 20 70 61 72 61 6d 65 74 65 session paramete
1460: 72 73 20 66 6f 72 20 53 53 4c 20 68 61 6e 64 73 rs for SSL hands
1470: 68 61 6b 65 2e 3c 2f 64 64 3e 0a 0a 3c 62 6c 6f hake.</dd>..<blo
1480: 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c ckquote>. <dl
1490: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d >..<dt><strong>-
14a0: 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 alpn</strong> <e
14b0: 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e m>list</em></dt>
14c0: 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 70 72 ..<dd>List of pr
14d0: 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65 72 otocols to offer
14e0: 20 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61 74 during Applicat
14f0: 69 6f 6e 2d 4c 61 79 65 72 0a 09 20 20 20 20 50 ion-Layer.. P
1500: 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61 74 rotocol Negotiat
1510: 69 6f 6e 20 28 41 4c 50 4e 29 2e 20 46 6f 72 20 ion (ALPN). For
1520: 65 78 61 6d 70 6c 65 3a 20 3c 65 6d 3e 68 32 3c example: <em>h2<
1530: 2f 65 6d 3e 20 61 6e 64 0a 09 20 20 20 20 3c 65 /em> and.. <e
1540: 6d 3e 68 74 74 70 2f 31 2e 31 3c 2f 65 6d 3e 2c m>http/1.1</em>,
1550: 20 62 75 74 20 6e 6f 74 20 3c 65 6d 3e 68 33 3c but not <em>h3<
1560: 2f 65 6d 3e 20 6f 72 20 3c 65 6d 3e 71 75 69 63 /em> or <em>quic
1570: 3c 2f 65 6d 3e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 </em>.</dd>..<dt
1580: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 64 69 72 3c ><strong>-cadir<
1590: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72 /strong> <em>dir
15a0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
15b0: 53 65 74 20 74 68 65 20 43 41 20 63 65 72 74 69 Set the CA certi
15c0: 66 69 63 61 74 65 73 20 70 61 74 68 2e 20 54 68 ficates path. Th
15d0: 65 20 64 65 66 61 75 6c 74 20 64 69 72 65 63 74 e default direct
15e0: 6f 72 79 20 69 73 20 70 6c 61 74 66 6f 72 6d 0a ory is platform.
15f0: 09 20 20 20 20 73 70 65 63 69 66 69 63 20 61 6e . specific an
1600: 64 20 63 61 6e 20 62 65 20 73 65 74 20 61 74 20 d can be set at
1610: 63 6f 6d 70 69 6c 65 20 74 69 6d 65 2e 20 54 68 compile time. Th
1620: 69 73 20 63 61 6e 20 62 65 20 6f 76 65 72 72 69 is can be overri
1630: 64 64 65 6e 0a 09 20 20 20 20 76 69 61 20 74 68 dden.. via th
1640: 65 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 44 49 e <b>SSL_CERT_DI
1650: 52 3c 2f 62 3e 20 65 6e 76 69 72 6f 6e 6d 65 6e R</b> environmen
1660: 74 20 76 61 72 69 61 62 6c 65 2e 3c 2f 64 64 3e t variable.</dd>
1670: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 ..<dt><strong>-c
1680: 61 66 69 6c 65 20 3c 2f 73 74 72 6f 6e 67 3e 3c afile </strong><
1690: 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e em>filename</em>
16a0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 20 74 </dt>..<dd>Set t
16b0: 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 he certificate a
16c0: 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 uthority (CA) ce
16d0: 72 74 69 66 69 63 61 74 65 73 20 66 69 6c 65 2e rtificates file.
16e0: 20 54 68 65 20 64 65 66 61 75 6c 74 0a 09 20 20 The default..
16f0: 20 20 69 73 20 74 68 65 20 63 65 72 74 2e 70 65 is the cert.pe
1700: 6d 20 66 69 6c 65 20 69 6e 20 74 68 65 20 4f 70 m file in the Op
1710: 73 6e 53 53 4c 20 64 69 72 65 63 74 6f 72 79 2e snSSL directory.
1720: 20 54 68 69 73 20 63 61 6e 20 61 6c 73 6f 20 62 This can also b
1730: 65 0a 09 20 20 20 20 6f 76 65 72 72 69 64 64 65 e.. overridde
1740: 6e 20 76 69 61 20 74 68 65 20 3c 62 3e 53 53 4c n via the <b>SSL
1750: 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 _CERT_FILE</b> e
1760: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 nvironment varia
1770: 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ble.</dd>..<dt><
1780: 73 74 72 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65 strong>-certfile
1790: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 </strong> <em>fi
17a0: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e lename</em></dt>
17b0: 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 ..<dd>Specify th
17c0: 65 20 66 69 6c 65 6e 61 6d 65 20 77 69 74 68 20 e filename with
17d0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
17e0: 74 6f 20 75 73 65 2e 3c 2f 64 64 3e 0a 09 3c 64 to use.</dd>..<d
17f0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74 3c t><strong>-cert<
1800: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c /strong> <em>fil
1810: 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a ename</em></dt>.
1820: 09 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 .<dd>Specify the
1830: 20 63 6f 6e 74 65 6e 74 73 20 6f 66 20 61 20 63 contents of a c
1840: 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73 ertificate to us
1850: 65 2c 20 61 73 20 61 20 44 45 52 0a 09 20 20 20 e, as a DER..
1860: 20 65 6e 63 6f 64 65 64 20 62 69 6e 61 72 79 20 encoded binary
1870: 76 61 6c 75 65 20 28 58 2e 35 30 39 20 44 45 52 value (X.509 DER
1880: 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 ).</dd>..<dt><st
1890: 72 6f 6e 67 3e 2d 63 69 70 68 65 72 3c 2f 73 74 rong>-cipher</st
18a0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 rong> <em>string
18b0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
18c0: 4c 69 73 74 20 6f 66 20 63 69 70 68 65 72 73 20 List of ciphers
18d0: 74 6f 20 75 73 65 2e 20 53 74 72 69 6e 67 20 69 to use. String i
18e0: 73 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22 29 20 s a colon (":")
18f0: 73 65 70 61 72 61 74 65 64 20 6c 69 73 74 0a 09 separated list..
1900: 20 20 20 20 6f 66 20 63 69 70 68 65 72 73 20 6f of ciphers o
1910: 72 20 63 69 70 68 65 72 20 73 75 69 74 65 73 2e r cipher suites.
1920: 20 43 69 70 68 65 72 20 73 75 69 74 65 73 20 63 Cipher suites c
1930: 61 6e 20 62 65 20 63 6f 6d 62 69 6e 65 64 0a 09 an be combined..
1940: 20 20 20 20 75 73 69 6e 67 20 74 68 65 20 3c 62 using the <b
1950: 3e 2b 3c 2f 62 3e 20 63 68 61 72 61 63 74 65 72 >+</b> character
1960: 2e 20 50 72 65 66 69 78 65 73 20 63 61 6e 20 62 . Prefixes can b
1970: 65 20 75 73 65 64 20 74 6f 20 70 65 72 6d 61 6e e used to perman
1980: 65 6e 74 6c 79 0a 09 20 20 20 20 72 65 6d 6f 76 ently.. remov
1990: 65 20 28 22 21 22 29 2c 20 64 65 6c 65 74 65 20 e ("!"), delete
19a0: 28 22 2d 22 29 2c 20 6f 72 20 6d 6f 76 65 20 61 ("-"), or move a
19b0: 20 63 79 70 68 65 72 20 74 6f 20 74 68 65 20 65 cypher to the e
19c0: 6e 64 20 6f 66 0a 09 20 20 20 20 74 68 65 20 6c nd of.. the l
19d0: 69 73 74 20 28 22 2b 22 29 2e 20 4b 65 79 77 6f ist ("+"). Keywo
19e0: 72 64 73 20 3c 62 3e 40 53 54 52 45 4e 47 54 48 rds <b>@STRENGTH
19f0: 3c 2f 62 3e 20 28 73 6f 72 74 20 62 79 20 61 6c </b> (sort by al
1a00: 67 6f 72 69 74 68 6d 0a 09 20 20 20 20 6b 65 79 gorithm.. key
1a10: 20 6c 65 6e 67 74 68 29 2c 20 3c 62 3e 40 53 45 length), <b>@SE
1a20: 43 4c 45 56 45 4c 3d 3c 2f 62 3e 3c 69 3e 6e 3c CLEVEL=</b><i>n<
1a30: 2f 69 3e 20 28 73 65 74 20 73 65 63 75 72 69 74 /i> (set securit
1a40: 79 20 6c 65 76 65 6c 20 74 6f 0a 09 20 20 20 20 y level to..
1a50: 6e 29 2c 20 61 6e 64 20 3c 62 3e 44 45 46 41 55 n), and <b>DEFAU
1a60: 4c 54 3c 2f 62 3e 20 28 75 73 65 20 64 65 66 61 LT</b> (use defa
1a70: 75 6c 74 20 63 69 70 68 65 72 20 6c 69 73 74 2c ult cipher list,
1a80: 20 61 74 20 73 74 61 72 74 20 6f 6e 6c 79 29 0a at start only).
1a90: 09 20 20 20 20 63 61 6e 20 61 6c 73 6f 20 62 65 . can also be
1aa0: 20 73 70 65 63 69 66 69 65 64 2e 20 53 65 65 20 specified. See
1ab0: 4f 70 65 6e 53 53 4c 20 64 6f 63 75 6d 65 6e 74 OpenSSL document
1ac0: 61 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 66 75 ation for the fu
1ad0: 6c 6c 0a 09 20 20 20 20 6c 69 73 74 20 6f 66 20 ll.. list of
1ae0: 76 61 6c 69 64 20 76 61 6c 75 65 73 2e 20 28 54 valid values. (T
1af0: 4c 53 20 31 2e 32 20 61 6e 64 20 65 61 72 6c 69 LS 1.2 and earli
1b00: 65 72 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a 09 3c er only)</dd>..<
1b10: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 dt><strong>-ciph
1b20: 65 72 73 75 69 74 65 73 3c 2f 73 74 72 6f 6e 67 ersuites</strong
1b30: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
1b40: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 ></dt>..<dd>List
1b50: 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65 of cipher suite
1b60: 73 20 74 6f 20 75 73 65 2e 20 53 74 72 69 6e 67 s to use. String
1b70: 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28 22 3a 22 is a colon (":"
1b80: 29 0a 09 20 20 20 20 73 65 70 61 72 61 74 65 64 ).. separated
1b90: 20 6c 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 list of cipher
1ba0: 73 75 69 74 65 20 6e 61 6d 65 73 2e 20 28 54 4c suite names. (TL
1bb0: 53 20 31 2e 33 20 6f 6e 6c 79 29 3c 2f 64 64 3e S 1.3 only)</dd>
1bc0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 ..<dt><strong>-c
1bd0: 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 ommand</strong>
1be0: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d <em>callback</em
1bf0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6c 6c ></dt>..<dd>Call
1c00: 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 61 back to invoke a
1c10: 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 t several points
1c20: 20 64 75 72 69 6e 67 20 74 68 65 20 68 61 6e 64 during the hand
1c30: 73 68 61 6b 65 2e 0a 09 20 20 20 20 54 68 69 73 shake... This
1c40: 20 69 73 20 75 73 65 64 20 74 6f 20 70 61 73 73 is used to pass
1c50: 20 65 72 72 6f 72 73 20 61 6e 64 20 74 72 61 63 errors and trac
1c60: 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c ing information,
1c70: 20 61 6e 64 0a 09 20 20 20 20 69 74 20 63 61 6e and.. it can
1c80: 20 61 6c 6c 6f 77 20 54 63 6c 20 73 63 72 69 70 allow Tcl scrip
1c90: 74 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 ts to perform th
1ca0: 65 69 72 20 6f 77 6e 20 63 65 72 74 69 66 69 63 eir own certific
1cb0: 61 74 65 0a 09 20 20 20 20 76 61 6c 69 64 61 74 ate.. validat
1cc0: 69 6f 6e 20 69 6e 20 70 6c 61 63 65 20 6f 66 20 ion in place of
1cd0: 74 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 69 the default vali
1ce0: 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20 dation provided
1cf0: 62 79 0a 09 20 20 20 20 4f 70 65 6e 53 53 4c 2e by.. OpenSSL.
1d00: 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43 See <a href="#C
1d10: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 ALLBACK OPTIONS"
1d20: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e >CALLBACK OPTION
1d30: 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 S</a>.. for f
1d40: 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f urther discussio
1d50: 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 n.</dd>..<dt><st
1d60: 72 6f 6e 67 3e 2d 64 68 70 61 72 61 6d 73 20 3c rong>-dhparams <
1d70: 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65 /strong><em>file
1d80: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 name</em></dt>..
1d90: 3c 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 <dd>Specify the
1da0: 44 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 70 Diffie-Hellman p
1db0: 61 72 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c arameters file.<
1dc0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1dd0: 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f 73 74 72 6f g>-keyfile</stro
1de0: 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 ng> <em>filename
1df0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
1e00: 53 70 65 63 69 66 79 20 74 68 65 20 70 72 69 76 Specify the priv
1e10: 61 74 65 20 6b 65 79 20 66 69 6c 65 2e 20 28 64 ate key file. (d
1e20: 65 66 61 75 6c 74 20 69 73 0a 09 20 20 20 20 76 efault is.. v
1e30: 61 6c 75 65 20 6f 66 20 2d 63 65 72 74 66 69 6c alue of -certfil
1e40: 65 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 e)</dd>..<dt><st
1e50: 72 6f 6e 67 3e 2d 6b 65 79 3c 2f 73 74 72 6f 6e rong>-key</stron
1e60: 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c g> <em>filename<
1e70: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 /em></dt>..<dd>S
1e80: 70 65 63 69 66 79 20 74 68 65 20 70 72 69 76 61 pecify the priva
1e90: 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73 te key to use as
1ea0: 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 76 a DER encoded v
1eb0: 61 6c 75 65 20 28 50 4b 43 53 23 31 20 44 45 52 alue (PKCS#1 DER
1ec0: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 )</dd>..<dt><str
1ed0: 6f 6e 67 3e 2d 6d 6f 64 65 6c 3c 2f 73 74 72 6f ong>-model</stro
1ee0: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c ng> <em>channel<
1ef0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 46 /em></dt>..<dd>F
1f00: 6f 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65 orce this channe
1f10: 6c 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73 l to share the s
1f20: 61 6d 65 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e ame <em><strong>
1f30: 53 53 4c 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e SSL_CTX</strong>
1f40: 3c 2f 65 6d 3e 0a 09 20 20 20 20 73 74 72 75 63 </em>.. struc
1f50: 74 75 72 65 20 61 73 20 74 68 65 20 73 70 65 63 ture as the spec
1f60: 69 66 69 65 64 20 3c 65 6d 3e 63 68 61 6e 6e 65 ified <em>channe
1f70: 6c 3c 2f 65 6d 3e 2c 20 61 6e 64 0a 09 20 20 20 l</em>, and..
1f80: 20 74 68 65 72 65 66 6f 72 65 20 73 68 61 72 65 therefore share
1f90: 20 63 61 6c 6c 62 61 63 6b 73 20 65 74 63 2e 3c callbacks etc.<
1fa0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
1fb0: 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 g>-password</str
1fc0: 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 ong> <em>callbac
1fd0: 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 k</em></dt>..<dd
1fe0: 3e 43 61 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76 >Callback to inv
1ff0: 6f 6b 65 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c oke when OpenSSL
2000: 20 6e 65 65 64 73 20 74 6f 20 6f 62 74 61 69 6e needs to obtain
2010: 20 61 20 70 61 73 73 77 6f 72 64 2c 0a 09 20 20 a password,..
2020: 20 20 74 79 70 69 63 61 6c 6c 79 20 74 6f 20 75 typically to u
2030: 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 76 61 74 nlock the privat
2040: 65 20 6b 65 79 20 6f 66 20 61 20 63 65 72 74 69 e key of a certi
2050: 66 69 63 61 74 65 2e 20 54 68 65 0a 09 20 20 20 ficate. The..
2060: 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 callback should
2070: 20 72 65 74 75 72 6e 20 61 20 73 74 72 69 6e 67 return a string
2080: 20 77 68 69 63 68 20 72 65 70 72 65 73 65 6e 74 which represent
2090: 73 20 74 68 65 20 70 61 73 73 77 6f 72 64 0a 09 s the password..
20a0: 20 20 20 20 74 6f 20 62 65 20 75 73 65 64 2e 20 to be used.
20b0: 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 See <a href="#CA
20c0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e LLBACK OPTIONS">
20d0: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
20e0: 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 </a>.. for fu
20f0: 72 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e rther discussion
2100: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
2110: 6f 6e 67 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 ong>-post_handsh
2120: 61 6b 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ake</strong> <em
2130: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
2140: 09 3c 64 64 3e 41 6c 6c 6f 77 20 70 6f 73 74 2d .<dd>Allow post-
2150: 68 61 6e 64 73 68 61 6b 65 20 74 69 63 6b 65 74 handshake ticket
2160: 20 75 70 64 61 74 65 73 2e 3c 2f 64 64 3e 0a 09 updates.</dd>..
2170: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 <dt><strong>-req
2180: 75 65 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 uest </strong><e
2190: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e m>bool</em></dt>
21a0: 0a 09 3c 64 64 3e 52 65 71 75 65 73 74 20 61 20 ..<dd>Request a
21b0: 63 65 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d certificate from
21c0: 20 70 65 65 72 20 64 75 72 69 6e 67 20 53 53 4c peer during SSL
21d0: 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 handshake...
21e0: 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d (default is <em
21f0: 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e >true</em>)</dd>
2200: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 ..<dt><strong>-r
2210: 65 71 75 69 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 equire</strong>
2220: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 <em>bool</em></d
2230: 74 3e 0a 09 3c 64 64 3e 52 65 71 75 69 72 65 20 t>..<dd>Require
2240: 61 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 a valid certific
2250: 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 ate from peer du
2260: 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68 61 ring SSL handsha
2270: 6b 65 2e 0a 09 20 20 20 20 49 66 20 74 68 69 73 ke... If this
2280: 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 2c is set to true,
2290: 20 74 68 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d 72 then <strong>-r
22a0: 65 71 75 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 equest</strong>
22b0: 6d 75 73 74 0a 09 20 20 20 20 61 6c 73 6f 20 62 must.. also b
22c0: 65 20 73 65 74 20 74 6f 20 74 72 75 65 2e 20 28 e set to true. (
22d0: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 default is <em>f
22e0: 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a alse</em>)</dd>.
22f0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 .<dt><strong>-se
2300: 63 75 72 69 74 79 6c 65 76 65 6c 3c 2f 73 74 72 curitylevel</str
2310: 6f 6e 67 3e 20 3c 65 6d 3e 69 6e 74 65 67 65 72 ong> <em>integer
2320: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
2330: 53 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 76 Set security lev
2340: 65 6c 2e 20 4d 75 73 74 20 62 65 20 30 20 74 6f el. Must be 0 to
2350: 20 35 2e 20 54 68 65 20 73 65 63 75 72 69 74 79 5. The security
2360: 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73 0a 09 level affects..
2370: 20 20 20 20 63 69 70 68 65 72 20 73 75 69 74 65 cipher suite
2380: 20 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c 67 6f encryption algo
2390: 72 69 74 68 6d 73 2c 20 73 75 70 70 6f 72 74 65 rithms, supporte
23a0: 64 20 45 43 43 20 63 75 72 76 65 73 2c 0a 09 20 d ECC curves,..
23b0: 20 20 20 73 75 70 70 6f 72 74 65 64 20 73 69 67 supported sig
23c0: 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74 68 6d nature algorithm
23d0: 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65 72 20 s, DH parameter
23e0: 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69 63 61 sizes, certifica
23f0: 74 65 0a 09 20 20 20 20 6b 65 79 20 73 69 7a 65 te.. key size
2400: 73 20 61 6e 64 20 73 69 67 6e 61 74 75 72 65 20 s and signature
2410: 61 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68 65 20 algorithms. The
2420: 64 65 66 61 75 6c 74 20 69 73 20 31 2e 0a 09 20 default is 1...
2430: 20 20 20 4c 65 76 65 6c 20 33 20 61 6e 64 20 68 Level 3 and h
2440: 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 73 75 igher disable su
2450: 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69 6f pport for sessio
2460: 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 20 6f 6e n tickets and on
2470: 6c 79 0a 09 20 20 20 20 61 63 63 65 70 74 20 63 ly.. accept c
2480: 69 70 68 65 72 20 73 75 69 74 65 73 20 74 68 61 ipher suites tha
2490: 74 20 70 72 6f 76 69 64 65 20 66 6f 72 77 61 72 t provide forwar
24a0: 64 20 73 65 63 72 65 63 79 2e 3c 2f 64 64 3e 0a d secrecy.</dd>.
24b0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 .<dt><strong>-se
24c0: 72 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 rver</strong> <e
24d0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e m>bool</em></dt>
24e0: 0a 09 3c 64 64 3e 48 61 6e 64 73 68 61 6b 65 20 ..<dd>Handshake
24f0: 61 73 20 73 65 72 76 65 72 20 69 66 20 74 72 75 as server if tru
2500: 65 2c 20 65 6c 73 65 20 68 61 6e 64 73 68 61 6b e, else handshak
2510: 65 20 61 73 0a 09 20 20 20 20 63 6c 69 65 6e 74 e as.. client
2520: 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 . (default is <e
2530: 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 m>false</em>)</d
2540: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
2550: 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 -servername</str
2560: 6f 6e 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 ong> <em>host</e
2570: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 m></dt>..<dd>Spe
2580: 63 69 66 79 20 73 65 72 76 65 72 20 68 6f 73 74 cify server host
2590: 6e 61 6d 65 2e 20 4f 6e 6c 79 20 61 76 61 69 6c name. Only avail
25a0: 61 62 6c 65 20 69 66 20 74 68 65 20 4f 70 65 6e able if the Open
25b0: 53 53 4c 20 6c 69 62 72 61 72 79 0a 09 20 20 20 SSL library..
25c0: 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 the package is
25d0: 6c 69 6e 6b 65 64 20 61 67 61 69 6e 73 74 20 73 linked against s
25e0: 75 70 70 6f 72 74 73 20 74 68 65 20 54 4c 53 20 upports the TLS
25f0: 68 6f 73 74 6e 61 6d 65 20 65 78 74 65 6e 73 69 hostname extensi
2600: 6f 6e 0a 09 20 20 20 20 66 6f 72 20 27 53 65 72 on.. for 'Ser
2610: 76 65 72 20 4e 61 6d 65 20 49 6e 64 69 63 61 74 ver Name Indicat
2620: 69 6f 6e 27 20 28 53 4e 49 29 2e 20 55 73 65 20 ion' (SNI). Use
2630: 74 6f 20 6e 61 6d 65 20 74 68 65 20 6c 6f 67 69 to name the logi
2640: 63 61 6c 20 68 6f 73 74 0a 09 20 20 20 20 77 65 cal host.. we
2650: 20 61 72 65 20 74 61 6c 6b 69 6e 67 20 74 6f 20 are talking to
2660: 61 6e 64 20 65 78 70 65 63 74 69 6e 67 20 61 20 and expecting a
2670: 63 65 72 74 69 66 69 63 61 74 65 20 66 6f 72 2e certificate for.
2680: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
2690: 6e 67 3e 2d 73 65 73 73 69 6f 6e 5f 69 64 3c 2f ng>-session_id</
26a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 strong> <em>stri
26b0: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ng</em></dt>..<d
26c0: 64 3e 53 65 73 73 69 6f 6e 20 69 64 20 74 6f 20 d>Session id to
26d0: 72 65 73 75 6d 65 20 73 65 73 73 69 6f 6e 2e 3c resume session.<
26e0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
26f0: 67 3e 2d 73 73 6c 32 3c 2f 73 74 72 6f 6e 67 3e g>-ssl2</strong>
2700: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f <em>bool</em></
2710: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 dt>..<dd>Enable
2720: 75 73 65 20 6f 66 20 53 53 4c 20 76 32 2e 20 28 use of SSL v2. (
2730: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 default is <em>f
2740: 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a alse</em>)</dd>.
2750: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73 .<dt><strong>-ss
2760: 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e l3 </strong><em>
2770: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 bool</em></dt>..
2780: 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f <dd>Enable use o
2790: 66 20 53 53 4c 20 76 33 2e 20 28 64 65 66 61 75 f SSL v3. (defau
27a0: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c lt is <em>false<
27b0: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e /em>)</dd>..<dt>
27c0: 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 3c 2f 73 -<strong>tls1</s
27d0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c trong> <em>bool<
27e0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 /em></dt>..<dd>E
27f0: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 nable use of TLS
2800: 20 76 31 2e 20 28 64 65 66 61 75 6c 74 20 69 73 v1. (default is
2810: 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c <em>true</em>)<
2820: 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f /dd>..<dt>-<stro
2830: 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73 74 72 6f 6e ng>tls1.1</stron
2840: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e g> <em>bool</em>
2850: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c </dt>..<dd>Enabl
2860: 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e e use of TLS v1.
2870: 31 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 1 (default is <e
2880: 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 m>true</em>)</dd
2890: 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e >..<dt>-<strong>
28a0: 74 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67 3e 20 tls1.2</strong>
28b0: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 <em>bool</em></d
28c0: 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 t>..<dd>Enable u
28d0: 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 20 28 se of TLS v1.2 (
28e0: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 default is <em>t
28f0: 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 rue</em>)</dd>..
2900: 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 <dt>-<strong>tls
2910: 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 1.3</strong> <em
2920: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a >bool</em></dt>.
2930: 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 .<dd>Enable use
2940: 6f 66 20 54 4c 53 20 76 31 2e 33 20 28 64 65 66 of TLS v1.3 (def
2950: 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 ault is <em>true
2960: 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 </em>)</dd>..<dt
2970: 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 ><strong>-valida
2980: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e tecommand</stron
2990: 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c g> <em>callback<
29a0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 /em></dt>..<dd>C
29b0: 61 6c 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b allback to invok
29c0: 65 20 74 6f 20 76 65 72 69 66 79 20 6f 72 20 76 e to verify or v
29d0: 61 6c 69 64 61 74 65 20 70 72 6f 74 6f 63 6f 6c alidate protocol
29e0: 20 63 6f 6e 66 69 67 0a 09 20 20 20 20 70 61 72 config.. par
29f0: 61 6d 65 74 65 72 73 20 64 75 72 69 6e 67 20 74 ameters during t
2a00: 68 65 20 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f he protocol nego
2a10: 74 69 61 74 69 6f 6e 20 70 68 61 73 65 2e 20 53 tiation phase. S
2a20: 65 65 0a 09 20 20 20 20 3c 61 20 68 72 65 66 3d ee.. <a href=
2a30: 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f "#CALLBACK OPTIO
2a40: 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 NS">CALLBACK OPT
2a50: 49 4f 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f IONS</a>.. fo
2a60: 72 20 66 75 72 74 68 65 72 20 64 69 73 63 75 73 r further discus
2a70: 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c sion.</dd>. <
2a80: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 /dl>.</blockquot
2a90: 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e e>.. <dt><a n
2aa0: 61 6d 65 3d 22 74 6c 73 3a 3a 75 6e 69 6d 70 6f ame="tls::unimpo
2ab0: 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d rt"><b>tls::unim
2ac0: 70 6f 72 74 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e port </b><i>chan
2ad0: 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e nel</i></a></dt>
2ae0: 0a 20 20 20 20 3c 64 64 3e 50 72 6f 76 69 64 65 . <dd>Provide
2af0: 64 20 66 6f 72 20 73 79 6d 6d 65 74 72 79 20 74 d for symmetry t
2b00: 6f 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 o <strong>tls::i
2b10: 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 mport</strong>,
2b20: 74 68 69 73 0a 20 20 20 20 20 20 75 6e 73 74 61 this. unsta
2b30: 63 6b 73 20 74 68 65 20 53 53 4c 2d 65 6e 61 62 cks the SSL-enab
2b40: 6c 69 6e 67 20 6f 66 20 61 20 72 65 67 75 6c 61 ling of a regula
2b50: 72 20 54 63 6c 20 63 68 61 6e 6e 65 6c 2e 20 20 r Tcl channel.
2b60: 41 6e 20 65 72 72 6f 72 0a 20 20 20 20 20 20 69 An error. i
2b70: 73 20 74 68 72 6f 77 6e 20 69 66 20 54 4c 53 20 s thrown if TLS
2b80: 69 73 20 6e 6f 74 20 74 68 65 20 74 6f 70 20 73 is not the top s
2b90: 74 61 63 6b 65 64 20 63 68 61 6e 6e 65 6c 20 74 tacked channel t
2ba0: 79 70 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 ype.</dd>. <d
2bb0: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 t> </dt>.
2bc0: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
2bd0: 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 22 3e 3c ls::handshake"><
2be0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 68 61 6e 64 strong>tls::hand
2bf0: 73 68 61 6b 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c shake</strong> <
2c00: 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c em>channel</em><
2c10: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 /a></dt>. <dd
2c20: 3e 46 6f 72 63 65 73 20 68 61 6e 64 73 68 61 6b >Forces handshak
2c30: 65 20 74 6f 20 74 61 6b 65 20 70 6c 61 63 65 2c e to take place,
2c40: 20 61 6e 64 20 72 65 74 75 72 6e 73 20 30 20 69 and returns 0 i
2c50: 66 0a 09 68 61 6e 64 73 68 61 6b 65 20 69 73 20 f..handshake is
2c60: 73 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 still in progres
2c70: 73 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 s (non-blocking)
2c80: 2c 20 6f 72 20 31 20 69 66 0a 09 74 68 65 20 68 , or 1 if..the h
2c90: 61 6e 64 73 68 61 6b 65 20 77 61 73 20 73 75 63 andshake was suc
2ca0: 63 65 73 73 66 75 6c 2e 20 49 66 20 74 68 65 20 cessful. If the
2cb0: 68 61 6e 64 73 68 61 6b 65 20 66 61 69 6c 65 64 handshake failed
2cc0: 0a 09 74 68 69 73 20 72 6f 75 74 69 6e 65 20 77 ..this routine w
2cd0: 69 6c 6c 20 74 68 72 6f 77 20 61 6e 20 65 72 72 ill throw an err
2ce0: 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 or.</dd>. <dt
2cf0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 > </dt>.
2d00: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c <dt><a name="tl
2d10: 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f s::status"><stro
2d20: 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f ng>tls::status</
2d30: 73 74 72 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e strong>. <em>
2d40: 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c ?-local? channel
2d50: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
2d60: 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 <dd>Returns t
2d70: 68 65 20 63 75 72 72 65 6e 74 20 73 74 61 74 75 he current statu
2d80: 73 20 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 s of the certifi
2d90: 63 61 74 65 20 66 6f 72 20 61 6e 20 53 53 4c 0a cate for an SSL.
2da0: 09 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72 65 .channel. The re
2db0: 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 20 6f sult is a list o
2dc0: 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 f key-value pair
2dd0: 73 20 64 65 73 63 72 69 62 69 6e 67 0a 09 74 68 s describing..th
2de0: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 20 49 e certificate. I
2df0: 66 20 74 68 65 20 72 65 73 75 6c 74 20 69 73 20 f the result is
2e00: 61 6e 20 65 6d 70 74 79 20 6c 69 73 74 20 74 68 an empty list th
2e10: 65 6e 20 74 68 65 0a 09 53 53 4c 20 68 61 6e 64 en the..SSL hand
2e20: 73 68 61 6b 65 20 68 61 73 20 6e 6f 74 20 79 65 shake has not ye
2e30: 74 20 63 6f 6d 70 6c 65 74 65 64 2e 20 49 66 20 t completed. If
2e40: 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f 65 6d 3e 20 <em>-local</em>
2e50: 69 73 0a 09 73 70 65 63 69 66 69 65 64 2c 20 74 is..specified, t
2e60: 68 65 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63 65 hen the local ce
2e70: 72 74 69 66 69 63 61 74 65 20 69 73 20 75 73 65 rtificate is use
2e80: 64 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71 75 d.</dd>.<blockqu
2e90: 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c 20 53 74 61 ote>..<b>SSL Sta
2ea0: 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e tus</b>. <dl>
2eb0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c ..<dt><strong>al
2ec0: 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e pn</strong> <em>
2ed0: 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 protocol</em></d
2ee0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 t>..<dd>The prot
2ef0: 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61 66 ocol selected af
2f00: 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d ter Application-
2f10: 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 0a 09 Layer Protocol..
2f20: 20 20 20 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 Negotiation
2f30: 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 09 3c 64 (ALPN).</dd>..<d
2f40: 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65 72 t><strong>cipher
2f50: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69 </strong> <em>ci
2f60: 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 pher</em></dt>..
2f70: 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74 20 <dd>The current
2f80: 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 62 65 cipher in use be
2f90: 74 77 65 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 tween the client
2fa0: 20 61 6e 64 0a 09 20 20 20 20 73 65 72 76 65 72 and.. server
2fb0: 20 63 68 61 6e 6e 65 6c 73 2e 3c 2f 64 64 3e 0a channels.</dd>.
2fc0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 65 65 .<dt><strong>pee
2fd0: 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c rname</strong> <
2fe0: 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 em>name</em></dt
2ff0: 3e 0a 09 3c 64 64 3e 54 68 65 20 70 65 65 72 6e >..<dd>The peern
3000: 61 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 72 ame from the cer
3010: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 tificate.</dd>..
3020: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 <dt><strong>prot
3030: 6f 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ocol</strong> <e
3040: 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f m>version</em></
3050: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f dt>..<dd>The pro
3060: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 tocol version us
3070: 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 ed for the conne
3080: 63 74 69 6f 6e 3a 0a 09 20 20 20 20 53 53 4c 32 ction:.. SSL2
3090: 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c , SSL3, TLS1, TL
30a0: 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c S1.1, TLS1.2, TL
30b0: 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e S1.3, or unknown
30c0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
30d0: 6f 6e 67 3e 73 62 69 74 73 3c 2f 73 74 72 6f 6e ong>sbits</stron
30e0: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 g> <em>n</em></d
30f0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62 t>..<dd>The numb
3100: 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 er of bits used
3110: 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 for the session
3120: 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c key.</dd>..<dt><
3130: 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 strong>signature
3140: 48 61 73 68 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 HashAlgorithm</s
3150: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 trong> <em>algor
3160: 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 ithm</em></dt>..
3170: 3c 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 <dd>The signatur
3180: 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d e hash algorithm
3190: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
31a0: 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 54 79 70 ong>signatureTyp
31b0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 74 e</strong> <em>t
31c0: 79 70 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ype</em></dt>..<
31d0: 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 dd>The signature
31e0: 20 74 79 70 65 20 76 61 6c 75 65 2e 3c 2f 64 64 type value.</dd
31f0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 >..<dt><strong>v
3200: 65 72 69 66 79 44 65 70 74 68 3c 2f 73 74 72 6f erifyDepth</stro
3210: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f ng> <em>n</em></
3220: 64 74 3e 0a 09 3c 64 64 3e 4d 61 78 69 6d 75 6d dt>..<dd>Maximum
3230: 20 64 65 70 74 68 20 66 6f 72 20 74 68 65 20 63 depth for the c
3240: 65 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e ertificate chain
3250: 20 76 65 72 69 66 69 63 61 74 69 6f 6e 2e 0a 09 verification...
3260: 20 20 20 20 44 65 66 61 75 6c 74 20 69 73 20 2d Default is -
3270: 31 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 1, to check all.
3280: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3290: 6e 67 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f 73 ng>verifyMode</s
32a0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c trong> <em>list<
32b0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c /em></dt>..<dd>L
32c0: 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 ist of certifica
32d0: 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 te verification
32e0: 6d 6f 64 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 modes.</dd>..<dt
32f0: 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 52 ><strong>verifyR
3300: 65 73 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c esult</strong> <
3310: 65 6d 3e 72 65 73 75 6c 74 3c 2f 65 6d 3e 3c 2f em>result</em></
3320: 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 dt>..<dd>Certifi
3330: 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f cate verificatio
3340: 6e 20 72 65 73 75 6c 74 2e 3c 2f 64 64 3e 0a 09 n result.</dd>..
3350: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 61 5f 6e <dt><strong>ca_n
3360: 61 6d 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 ames</strong> <e
3370: 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e m>list</em></dt>
3380: 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 74 68 ..<dd>List of th
3390: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 e Certificate Au
33a0: 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 74 thorities used t
33b0: 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 65 72 o create the cer
33c0: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 tificate.</dd>.
33d0: 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b </dl>.</block
33e0: 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f quote>.<blockquo
33f0: 74 65 3e 0a 09 3c 62 3e 43 65 72 74 69 66 69 63 te>..<b>Certific
3400: 61 74 65 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 ate Status</b>.
3410: 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 <dl>..<dt><st
3420: 72 6f 6e 67 3e 61 6c 6c 3c 2f 73 74 72 6f 6e 67 rong>all</strong
3430: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d > <em>string</em
3440: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 44 75 6d 70 ></dt>..<dd>Dump
3450: 20 6f 66 20 61 6c 6c 20 63 65 72 74 69 66 69 63 of all certific
3460: 61 74 65 20 69 6e 66 6f 2e 3c 2f 64 64 3e 0a 0a ate info.</dd>..
3470: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 .<dt><strong>ver
3480: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 sion</strong> <e
3490: 6d 3e 76 61 6c 75 65 3c 2f 65 6d 3e 3c 2f 64 74 m>value</em></dt
34a0: 3e 0a 09 3c 64 64 3e 54 68 65 20 63 65 72 74 69 >..<dd>The certi
34b0: 66 69 63 61 74 65 20 76 65 72 73 69 6f 6e 2e 3c ficate version.<
34c0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
34d0: 67 3e 73 65 72 69 61 6c 4e 75 6d 62 65 72 3c 2f g>serialNumber</
34e0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 strong> <em>n</e
34f0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 m></dt>..<dd>The
3500: 20 73 65 72 69 61 6c 20 6e 75 6d 62 65 72 20 6f serial number o
3510: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 f the certificat
3520: 65 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e e as hex string.
3530: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3540: 6e 67 3e 73 69 67 6e 61 74 75 72 65 3c 2f 73 74 ng>signature</st
3550: 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 rong> <em>algori
3560: 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c thm</em></dt>..<
3570: 64 64 3e 43 69 70 68 65 72 20 61 6c 67 6f 72 69 dd>Cipher algori
3580: 74 68 6d 20 75 73 65 64 20 66 6f 72 20 63 65 72 thm used for cer
3590: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 tificate signatu
35a0: 72 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 re.</dd>..<dt><s
35b0: 74 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73 74 trong>issuer</st
35c0: 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d rong> <em>dn</em
35d0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
35e0: 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e 61 distinguished na
35f0: 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20 63 me (DN) of the c
3600: 65 72 74 69 66 69 63 61 74 65 20 69 73 73 75 65 ertificate issue
3610: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 r.</dd>..<dt><st
3620: 72 6f 6e 67 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f rong>notBefore</
3630: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 strong> <em>date
3640: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3650: 54 68 65 20 62 65 67 69 6e 20 64 61 74 65 20 66 The begin date f
3660: 6f 72 20 74 68 65 20 76 61 6c 69 64 69 74 79 20 or the validity
3670: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 of the certifica
3680: 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 te.</dd>..<dt><s
3690: 74 72 6f 6e 67 3e 6e 6f 74 41 66 74 65 72 3c 2f trong>notAfter</
36a0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 strong> <em>date
36b0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
36c0: 54 68 65 20 65 78 70 69 72 61 74 69 6f 6e 20 64 The expiration d
36d0: 61 74 65 20 66 6f 72 20 74 68 65 20 63 65 72 74 ate for the cert
36e0: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c ificate.</dd>..<
36f0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 dt><strong>subje
3700: 63 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ct</strong> <em>
3710: 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 dn</em></dt>..<d
3720: 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73 d>The distinguis
3730: 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66 hed name (DN) of
3740: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
3750: 20 73 75 62 6a 65 63 74 2e 0a 09 20 20 20 20 46 subject... F
3760: 69 65 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20 43 ields include: C
3770: 6f 6d 6d 6f 6e 20 4e 61 6d 65 20 28 43 4e 29 2c ommon Name (CN),
3780: 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f Organization (O
3790: 29 2c 20 4c 6f 63 61 6c 69 74 79 0a 09 20 20 20 ), Locality..
37a0: 20 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74 or City (L), St
37b0: 61 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20 ate or Province
37c0: 28 53 29 2c 20 61 6e 64 20 43 6f 75 6e 74 72 79 (S), and Country
37d0: 20 4e 61 6d 65 20 28 43 29 2e 3c 2f 64 64 3e 0a Name (C).</dd>.
37e0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 73 .<dt><strong>iss
37f0: 75 65 72 55 6e 69 71 75 65 49 44 3c 2f 73 74 72 uerUniqueID</str
3800: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c ong> <em>string<
3810: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
3820: 68 65 20 69 73 73 75 65 72 20 75 6e 69 71 75 65 he issuer unique
3830: 20 69 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c id.</dd>..<dt><
3840: 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 55 6e strong>subjectUn
3850: 69 71 75 65 49 44 3c 2f 73 74 72 6f 6e 67 3e 20 iqueID</strong>
3860: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c <em>string</em><
3870: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 75 /dt>..<dd>The su
3880: 62 6a 65 63 74 20 75 6e 69 71 75 65 20 69 64 2e bject unique id.
3890: 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 </dd>...<dt><str
38a0: 6f 6e 67 3e 6e 75 6d 5f 65 78 74 65 6e 73 69 6f ong>num_extensio
38b0: 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ns</strong> <em>
38c0: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 n</em></dt>..<dd
38d0: 3e 4e 75 6d 62 65 72 20 6f 66 20 63 65 72 74 69 >Number of certi
38e0: 66 69 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e ficate extension
38f0: 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 s.</dd>..<dt><st
3900: 72 6f 6e 67 3e 65 78 74 65 6e 73 69 6f 6e 73 3c rong>extensions<
3910: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 /strong> <em>lis
3920: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 t</em></dt>..<dd
3930: 3e 4c 69 73 74 20 6f 66 20 63 65 72 74 69 66 69 >List of certifi
3940: 63 61 74 65 20 65 78 74 65 6e 73 69 6f 6e 20 6e cate extension n
3950: 61 6d 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e ames.</dd>..<dt>
3960: 3c 73 74 72 6f 6e 67 3e 61 75 74 68 6f 72 69 74 <strong>authorit
3970: 79 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f yKeyIdentifier</
3980: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 strong> <em>stri
3990: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ng</em></dt>..<d
39a0: 64 3e 28 41 4b 49 29 20 4b 65 79 20 69 64 65 6e d>(AKI) Key iden
39b0: 74 69 66 69 65 72 20 6f 66 20 74 68 65 20 49 73 tifier of the Is
39c0: 73 75 69 6e 67 20 43 41 20 63 65 72 74 69 66 69 suing CA certifi
39d0: 63 61 74 65 20 74 68 61 74 20 73 69 67 6e 65 64 cate that signed
39e0: 0a 09 20 20 20 20 74 68 65 20 53 53 4c 20 63 65 .. the SSL ce
39f0: 72 74 69 66 69 63 61 74 65 20 61 73 20 68 65 78 rtificate as hex
3a00: 20 73 74 72 69 6e 67 2e 20 54 68 69 73 20 76 61 string. This va
3a10: 6c 75 65 20 6d 61 74 63 68 65 73 20 74 68 65 20 lue matches the
3a20: 53 4b 49 0a 09 20 20 20 20 76 61 6c 75 65 20 6f SKI.. value o
3a30: 66 20 74 68 65 20 49 6e 74 65 72 6d 65 64 69 61 f the Intermedia
3a40: 74 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74 te CA certificat
3a50: 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 e.</dd>..<dt><st
3a60: 72 6f 6e 67 3e 73 75 62 6a 65 63 74 4b 65 79 49 rong>subjectKeyI
3a70: 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e dentifier</stron
3a80: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 g> <em>string</e
3a90: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 53 4b m></dt>..<dd>(SK
3aa0: 49 29 20 48 61 73 68 20 6f 66 20 74 68 65 20 70 I) Hash of the p
3ab0: 75 62 6c 69 63 20 6b 65 79 20 69 6e 73 69 64 65 ublic key inside
3ac0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
3ad0: 20 61 73 20 68 65 78 0a 09 20 20 20 73 74 72 69 as hex.. stri
3ae0: 6e 67 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e ng. Used to iden
3af0: 74 69 66 79 20 63 65 72 74 69 66 69 63 61 74 65 tify certificate
3b00: 73 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61 s that contain a
3b10: 20 70 61 72 74 69 63 75 6c 61 72 0a 09 20 20 20 particular..
3b20: 70 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 64 64 3e public key.</dd>
3b30: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 ..<dt><strong>su
3b40: 62 6a 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 73 74 bjectAltName</st
3b50: 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f rong> <em>list</
3b60: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 em></dt>..<dd>Li
3b70: 73 74 20 6f 66 20 61 6c 6c 20 6f 66 20 74 68 65 st of all of the
3b80: 20 61 6c 74 65 72 6e 61 74 69 76 65 20 64 6f 6d alternative dom
3b90: 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62 20 64 ain names, sub d
3ba0: 6f 6d 61 69 6e 73 2c 0a 09 20 20 20 20 61 6e 64 omains,.. and
3bb0: 20 49 50 20 61 64 64 72 65 73 73 65 73 20 74 68 IP addresses th
3bc0: 61 74 20 61 72 65 20 73 65 63 75 72 65 64 20 62 at are secured b
3bd0: 79 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 y the certificat
3be0: 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 e.</dd>..<dt><st
3bf0: 72 6f 6e 67 3e 6f 63 73 70 3c 2f 73 74 72 6f 6e rong>ocsp</stron
3c00: 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e g> <em>list</em>
3c10: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 </dt>..<dd>List
3c20: 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 20 43 65 of all Online Ce
3c30: 72 74 69 66 69 63 61 74 65 20 53 74 61 74 75 73 rtificate Status
3c40: 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 53 50 29 Protocol (OCSP)
3c50: 20 55 52 4c 73 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 URLs.</dd>...<d
3c60: 74 3e 3c 73 74 72 6f 6e 67 3e 63 65 72 74 69 66 t><strong>certif
3c70: 69 63 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c icate</strong> <
3c80: 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 3c 2f 64 74 em>cert</em></dt
3c90: 3e 0a 09 3c 64 64 3e 54 68 65 20 50 45 4d 20 65 >..<dd>The PEM e
3ca0: 6e 63 6f 64 65 64 20 63 65 72 74 69 66 69 63 61 ncoded certifica
3cb0: 74 65 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c te.</dd>...<dt><
3cc0: 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 strong>signature
3cd0: 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e Algorithm</stron
3ce0: 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d g> <em>algorithm
3cf0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3d00: 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d Cipher algorithm
3d10: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 used for certif
3d20: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e icate signature.
3d30: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f </dd>..<dt><stro
3d40: 6e 67 3e 73 69 67 6e 61 74 75 72 65 56 61 6c 75 ng>signatureValu
3d50: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 e</strong> <em>s
3d60: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a tring</em></dt>.
3d70: 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 .<dd>Certificate
3d80: 20 73 69 67 6e 61 74 75 72 65 20 61 73 20 68 65 signature as he
3d90: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 x string.</dd>..
3da0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e <dt><strong>sign
3db0: 61 74 75 72 65 44 69 67 65 73 74 3c 2f 73 74 72 atureDigest</str
3dc0: 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69 6f 6e ong> <em>version
3dd0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
3de0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e Certificate sign
3df0: 69 6e 67 20 64 69 67 65 73 74 2e 3c 2f 64 64 3e ing digest.</dd>
3e00: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 ..<dt><strong>pu
3e10: 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69 74 68 6d blicKeyAlgorithm
3e20: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c </strong> <em>al
3e30: 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 gorithm</em></dt
3e40: 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 >..<dd>Certifica
3e50: 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62 te signature pub
3e60: 6c 69 63 20 6b 65 79 20 61 6c 67 6f 72 69 74 68 lic key algorith
3e70: 6d 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 m.</dd>..<dt><st
3e80: 72 6f 6e 67 3e 70 75 62 6c 69 63 4b 65 79 3c 2f rong>publicKey</
3e90: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 strong> <em>stri
3ea0: 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ng</em></dt>..<d
3eb0: 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 d>Certificate si
3ec0: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b gnature public k
3ed0: 65 79 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 ey as hex string
3ee0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
3ef0: 6f 6e 67 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 ong>bits</strong
3f00: 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 > <em>n</em></dt
3f10: 3e 0a 09 3c 64 64 3e 4e 75 6d 62 65 72 20 6f 66 >..<dd>Number of
3f20: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 bits used for c
3f30: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 ertificate signa
3f40: 74 75 72 65 20 6b 65 79 3c 2f 64 64 3e 0a 09 3c ture key</dd>..<
3f50: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 6c 66 5f dt><strong>self_
3f60: 73 69 67 6e 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 signed</strong>
3f70: 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e <em>boolean</em>
3f80: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 49 73 20 63 65 </dt>..<dd>Is ce
3f90: 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 rtificate signat
3fa0: 75 72 65 20 73 65 6c 66 20 73 69 67 6e 65 64 2e ure self signed.
3fb0: 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 </dd>...<dt><str
3fc0: 6f 6e 67 3e 73 68 61 31 5f 68 61 73 68 3c 2f 73 ong>sha1_hash</s
3fd0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c trong> <em>hash<
3fe0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
3ff0: 68 65 20 53 48 41 31 20 68 61 73 68 20 6f 66 20 he SHA1 hash of
4000: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20 the certificate
4010: 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f as hex string.</
4020: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4030: 3e 73 68 61 32 35 36 5f 68 61 73 68 3c 2f 73 74 >sha256_hash</st
4040: 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f rong> <em>hash</
4050: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 em></dt>..<dd>Th
4060: 65 20 53 48 41 32 35 36 20 68 61 73 68 20 6f 66 e SHA256 hash of
4070: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
4080: 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c as hex string.<
4090: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c /dd>. </dl>.<
40a0: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 /blockquote>..
40b0: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 <dt><a name="t
40c0: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e ls::connection">
40d0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 6f 6e <strong>tls::con
40e0: 6e 65 63 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e nection</strong>
40f0: 0a 20 20 20 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c . <em>channel
4100: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
4110: 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 <dd>Returns t
4120: 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65 he current conne
4130: 63 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66 20 ction status of
4140: 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20 an SSL channel.
4150: 54 68 65 0a 09 72 65 73 75 6c 74 20 69 73 20 61 The..result is a
4160: 20 6c 69 73 74 20 6f 66 20 6b 65 79 2d 76 61 6c list of key-val
4170: 75 65 20 70 61 69 72 73 20 64 65 73 63 72 69 62 ue pairs describ
4180: 69 6e 67 20 74 68 65 0a 09 63 6f 6e 6e 65 63 74 ing the..connect
4190: 65 64 20 70 65 65 72 2e 3c 2f 64 64 3e 0a 3c 62 ed peer.</dd>.<b
41a0: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 lockquote>..<b>S
41b0: 53 4c 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 SL Status</b>.
41c0: 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 <dl>..<dt><str
41d0: 6f 6e 67 3e 73 74 61 74 65 3c 2f 73 74 72 6f 6e ong>state</stron
41e0: 67 3e 20 3c 65 6d 3e 73 74 61 74 65 3c 2f 65 6d g> <em>state</em
41f0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 74 61 74 ></dt>..<dd>Stat
4200: 65 20 6f 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 e of the connect
4210: 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c ion.</dd>..<dt><
4220: 73 74 72 6f 6e 67 3e 73 65 72 76 65 72 6e 61 6d strong>servernam
4230: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e e</strong> <em>n
4240: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c ame</em></dt>..<
4250: 64 64 3e 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 dd>The name of t
4260: 68 65 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 he connected to
4270: 73 65 72 76 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 server.</dd>..<d
4280: 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 t><strong>protoc
4290: 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ol</strong> <em>
42a0: 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 version</em></dt
42b0: 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f >..<dd>The proto
42c0: 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65 64 col version used
42d0: 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 for the connect
42e0: 69 6f 6e 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 ion:.. SSL2,
42f0: 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 SSL3, TLS1, TLS1
4300: 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 .1, TLS1.2, TLS1
4310: 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c .3, or unknown.<
4320: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4330: 67 3e 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 3c g>renegotiation<
4340: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f /strong> <em>boo
4350: 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 lean</em></dt>..
4360: 3c 64 64 3e 57 68 65 74 68 65 72 20 70 72 6f 74 <dd>Whether prot
4370: 6f 63 6f 6c 20 72 65 6e 65 67 6f 74 69 61 74 69 ocol renegotiati
4380: 6f 6e 20 69 73 20 73 75 70 70 6f 72 74 65 64 20 on is supported
4390: 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 or not.</dd>..<d
43a0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 63 75 72 69 t><strong>securi
43b0: 74 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e tylevel</strong>
43c0: 20 3c 65 6d 3e 6c 65 76 65 6c 3c 2f 65 6d 3e 3c <em>level</em><
43d0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 65 /dt>..<dd>The se
43e0: 63 75 72 69 74 79 20 6c 65 76 65 6c 20 75 73 65 curity level use
43f0: 64 20 66 6f 72 20 73 65 6c 65 63 74 69 6f 6e 20 d for selection
4400: 6f 66 20 63 69 70 68 65 72 73 2c 20 6b 65 79 20 of ciphers, key
4410: 73 69 7a 65 2c 20 65 74 63 2e 3c 2f 64 64 3e 0a size, etc.</dd>.
4420: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 .<dt><strong>ses
4430: 73 69 6f 6e 5f 72 65 75 73 65 64 3c 2f 73 74 72 sion_reused</str
4440: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e ong> <em>boolean
4450: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
4460: 57 68 65 74 68 65 72 20 74 68 65 20 73 65 73 73 Whether the sess
4470: 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 72 65 75 ion has been reu
4480: 73 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e sed or not.</dd>
4490: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73 ..<dt><strong>is
44a0: 5f 73 65 72 76 65 72 3c 2f 73 74 72 6f 6e 67 3e _server</strong>
44b0: 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d <em>boolean</em
44c0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 ></dt>..<dd>Whet
44d0: 68 65 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 her the connecti
44e0: 6f 6e 20 69 73 20 63 6f 6e 66 69 67 75 72 65 64 on is configured
44f0: 20 61 73 20 61 20 73 65 72 76 65 72 20 28 31 29 as a server (1)
4500: 20 6f 72 20 63 6c 69 65 6e 74 20 28 30 29 2e 3c or client (0).<
4510: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4520: 67 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 3c 2f 73 g>compression</s
4530: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c trong> <em>mode<
4540: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 /em></dt>..<dd>C
4550: 6f 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f ompression metho
4560: 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 d.</dd>..<dt><st
4570: 72 6f 6e 67 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f rong>expansion</
4580: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65 strong> <em>mode
4590: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
45a0: 45 78 70 61 6e 73 69 6f 6e 20 6d 65 74 68 6f 64 Expansion method
45b0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e .</dd>. </dl>
45c0: 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c .</blockquote>.<
45d0: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e blockquote>..<b>
45e0: 43 69 70 68 65 72 20 49 6e 66 6f 3c 2f 62 3e 0a Cipher Info</b>.
45f0: 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 <dl>..<dt><s
4600: 74 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 trong>cipher</st
4610: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 rong> <em>cipher
4620: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e </em></dt>..<dd>
4630: 54 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 The current ciph
4640: 65 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68 er in use for th
4650: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 64 e connection.</d
4660: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e d>..<dt><strong>
4670: 73 74 61 6e 64 61 72 64 5f 6e 61 6d 65 3c 2f 73 standard_name</s
4680: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c trong> <em>name<
4690: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
46a0: 68 65 20 73 74 61 6e 64 61 72 64 20 52 46 43 20 he standard RFC
46b0: 6e 61 6d 65 20 6f 66 20 63 69 70 68 65 72 2e 3c name of cipher.<
46c0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
46d0: 67 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 g>bits</strong>
46e0: 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a <em>n</em></dt>.
46f0: 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 .<dd>The number
4700: 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 69 74 of processed bit
4710: 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 68 65 s used for ciphe
4720: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 r.</dd>..<dt><st
4730: 72 6f 6e 67 3e 73 65 63 72 65 74 5f 62 69 74 73 rong>secret_bits
4740: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c </strong> <em>n<
4750: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 /em></dt>..<dd>T
4760: 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 he number of sec
4770: 72 65 74 20 62 69 74 73 20 75 73 65 64 20 66 6f ret bits used fo
4780: 72 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 r cipher.</dd>..
4790: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6d 69 6e 5f <dt><strong>min_
47a0: 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e version</strong>
47b0: 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d <em>version</em
47c0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 ></dt>..<dd>The
47d0: 6d 69 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c minimum protocol
47e0: 20 76 65 72 73 69 6f 6e 20 66 6f 72 20 63 69 70 version for cip
47f0: 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c her.</dd>..<dt><
4800: 73 74 72 6f 6e 67 3e 69 64 3c 2f 73 74 72 6f 6e strong>id</stron
4810: 67 3e 20 3c 65 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f g> <em>id</em></
4820: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 4f 70 65 dt>..<dd>The Ope
4830: 6e 53 53 4c 20 63 69 70 68 65 72 20 69 64 2e 3c nSSL cipher id.<
4840: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e /dd>..<dt><stron
4850: 67 3e 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f 73 g>description</s
4860: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e trong> <em>strin
4870: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 g</em></dt>..<dd
4880: 3e 41 20 74 65 78 74 20 64 65 73 63 72 69 70 74 >A text descript
4890: 69 6f 6e 20 6f 66 20 74 68 65 20 63 69 70 68 65 ion of the ciphe
48a0: 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c r.</dd>. </dl
48b0: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a >.</blockquote>.
48c0: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 <blockquote>..<b
48d0: 3e 53 65 73 73 69 6f 6e 20 49 6e 66 6f 3c 2f 62 >Session Info</b
48e0: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e >. <dl>..<dt>
48f0: 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74 <strong>alpn</st
4900: 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 rong> <em>protoc
4910: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 ol</em></dt>..<d
4920: 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 73 d>The protocol s
4930: 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41 70 elected after Ap
4940: 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 20 plication-Layer
4950: 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 4e 65 Protocol.. Ne
4960: 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 gotiation (ALPN)
4970: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 .</dd>..<dt><str
4980: 6f 6e 67 3e 72 65 73 75 6d 61 62 6c 65 3c 2f 73 ong>resumable</s
4990: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 trong> <em>boole
49a0: 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 an</em></dt>..<d
49b0: 64 3e 43 61 6e 20 74 68 65 20 73 65 73 73 69 6f d>Can the sessio
49c0: 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72 20 n be resumed or
49d0: 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c not.</dd>..<dt><
49e0: 73 74 72 6f 6e 67 3e 73 74 61 72 74 5f 74 69 6d strong>start_tim
49f0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 e</strong> <em>s
4a00: 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e econds</em></dt>
4a10: 0a 09 3c 64 64 3e 54 69 6d 65 20 73 69 6e 63 65 ..<dd>Time since
4a20: 20 73 65 73 73 69 6f 6e 20 73 74 61 72 74 65 64 session started
4a30: 20 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 6e 63 in seconds sinc
4a40: 65 20 65 70 6f 63 68 2e 3c 2f 64 64 3e 0a 09 3c e epoch.</dd>..<
4a50: 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 6d 65 6f dt><strong>timeo
4a60: 75 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e ut</strong> <em>
4a70: 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 seconds</em></dt
4a80: 3e 0a 09 3c 64 64 3e 4d 61 78 20 64 75 72 61 74 >..<dd>Max durat
4a90: 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69 ion of session i
4aa0: 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65 n seconds before
4ab0: 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 64 64 3e 0a time-out.</dd>.
4ac0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6c 69 66 .<dt><strong>lif
4ad0: 65 74 69 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c etime</strong> <
4ae0: 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c em>seconds</em><
4af0: 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 73 73 69 6f /dt>..<dd>Sessio
4b00: 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d n ticket lifetim
4b10: 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64 e hint in second
4b20: 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 s.</dd>..<dt><st
4b30: 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 69 64 3c rong>session_id<
4b40: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e /strong> <em>bin
4b50: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c ary_string</em><
4b60: 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 /dt>..<dd>Unique
4b70: 20 73 65 73 73 69 6f 6e 20 69 64 20 66 6f 72 20 session id for
4b80: 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 use in resuming
4b90: 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 the session.</dd
4ba0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 >..<dt><strong>s
4bb0: 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 73 ession_ticket</s
4bc0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 trong> <em>binar
4bd0: 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 y_string</em></d
4be0: 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 t>..<dd>Unique s
4bf0: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f ession ticket fo
4c00: 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e r use in resumin
4c10: 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f g the session.</
4c20: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 dd>..<dt><strong
4c30: 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 74 61 >ticket_app_data
4c40: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 </strong> <em>bi
4c50: 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e nary_string</em>
4c60: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 </dt>..<dd>Uniqu
4c70: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 e session ticket
4c80: 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 61 74 application dat
4c90: 61 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 a.</dd>..<dt><st
4ca0: 72 6f 6e 67 3e 6d 61 73 74 65 72 5f 6b 65 79 3c rong>master_key<
4cb0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e /strong> <em>bin
4cc0: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c ary_string</em><
4cd0: 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 /dt>..<dd>Unique
4ce0: 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 72 20 session master
4cf0: 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c key.</dd>..<dt><
4d00: 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 63 strong>session_c
4d10: 61 63 68 65 5f 6d 6f 64 65 3c 2f 73 74 72 6f 6e ache_mode</stron
4d20: 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e g> <em>mode</em>
4d30: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 72 76 65 </dt>..<dd>Serve
4d40: 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c r cache mode (cl
4d50: 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72 ient, server, or
4d60: 20 62 6f 74 68 29 2e 3c 2f 64 64 3e 0a 20 20 20 both).</dd>.
4d70: 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 </dl>.</blockqu
4d80: 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 ote>.. <dt><a
4d90: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63 69 70 68 name="tls::ciph
4da0: 65 72 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 ers"><strong>tls
4db0: 3a 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e ::ciphers</stron
4dc0: 67 3e 0a 20 20 20 20 3c 65 6d 3e 70 72 6f 74 6f g>. <em>proto
4dd0: 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 col ?verbose? ?s
4de0: 75 70 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f upported?</em></
4df0: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e a></dt>. <dd>
4e00: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f Returns a list o
4e10: 66 20 73 75 70 70 6f 72 74 65 64 20 63 69 70 68 f supported ciph
4e20: 65 72 73 20 61 76 61 69 6c 61 62 6c 65 20 66 6f ers available fo
4e30: 72 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f r <em>protocol</
4e40: 65 6d 3e 2c 0a 09 77 68 65 72 65 20 70 72 6f 74 em>,..where prot
4e50: 6f 63 6f 6c 20 6d 75 73 74 20 62 65 20 6f 6e 65 ocol must be one
4e60: 20 6f 66 20 3c 62 3e 73 73 6c 32 2c 20 73 73 6c of <b>ssl2, ssl
4e70: 33 2c 20 74 6c 73 31 2c 20 74 6c 73 31 2e 31 2c 3, tls1, tls1.1,
4e80: 0a 09 74 6c 73 31 2e 32 2c 3c 2f 62 3e 20 6f 72 ..tls1.2,</b> or
4e90: 20 3c 62 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 <b>tls1.3</b>.
4ea0: 49 66 20 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f If <em>verbose</
4eb0: 65 6d 3e 20 69 73 20 73 70 65 63 69 66 69 65 64 em> is specified
4ec0: 20 61 73 0a 09 74 72 75 65 20 74 68 65 6e 20 61 as..true then a
4ed0: 20 76 65 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 verbose, human
4ee0: 72 65 61 64 61 62 6c 65 20 6c 69 73 74 20 69 73 readable list is
4ef0: 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 0a 09 returned with..
4f00: 61 64 64 69 74 69 6f 6e 61 6c 20 69 6e 66 6f 72 additional infor
4f10: 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 mation on the ci
4f20: 70 68 65 72 2e 20 49 66 20 3c 65 6d 3e 73 75 70 pher. If <em>sup
4f30: 70 6f 72 74 65 64 3c 2f 65 6d 3e 0a 09 69 73 20 ported</em>..is
4f40: 73 70 65 63 69 66 69 65 64 20 61 73 20 74 72 75 specified as tru
4f50: 65 2c 20 74 68 65 6e 20 6f 6e 6c 79 20 74 68 65 e, then only the
4f60: 20 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 ciphers support
4f70: 65 64 20 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 0a ed for protocol.
4f80: 09 77 69 6c 6c 20 62 65 20 6c 69 73 74 65 64 2e .will be listed.
4f90: 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c </dd>.. <dt><
4fa0: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 70 72 6f a name="tls::pro
4fb0: 74 6f 63 6f 6c 73 22 3e 3c 73 74 72 6f 6e 67 3e tocols"><strong>
4fc0: 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f tls::protocols</
4fd0: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e strong></a></dt>
4fe0: 0a 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 . <dd>Returns
4ff0: 20 61 20 6c 69 73 74 20 6f 66 20 73 75 70 70 6f a list of suppo
5000: 72 74 65 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 rted protocols.
5010: 56 61 6c 69 64 20 76 61 6c 75 65 73 20 61 72 65 Valid values are
5020: 3a 0a 09 3c 62 3e 73 73 6c 32 3c 2f 62 3e 2c 20 :..<b>ssl2</b>,
5030: 3c 62 3e 73 73 6c 33 3c 2f 62 3e 2c 20 3c 62 3e <b>ssl3</b>, <b>
5040: 74 6c 73 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 tls1</b>, <b>tls
5050: 31 2e 31 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 1.1</b>, <b>tls1
5060: 2e 32 3c 2f 62 3e 2c 0a 09 61 6e 64 20 3c 62 3e .2</b>,..and <b>
5070: 74 6c 73 31 2e 33 3c 2f 62 3e 2e 20 45 78 61 63 tls1.3</b>. Exac
5080: 74 20 6c 69 73 74 20 64 65 70 65 6e 64 73 20 6f t list depends o
5090: 6e 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f n OpenSSL versio
50a0: 6e 20 61 6e 64 0a 09 63 6f 6d 70 69 6c 65 20 74 n and..compile t
50b0: 69 6d 65 20 66 6c 61 67 73 2e 3c 2f 64 64 3e 0a ime flags.</dd>.
50c0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
50d0: 3d 22 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e ="tls::version">
50e0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 <strong>tls::ver
50f0: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 sion</strong></a
5100: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 ></dt>. <dd>R
5110: 65 74 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 eturns the OpenS
5120: 53 4c 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e SL version strin
5130: 67 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 g.</dd>.. <br
5140: 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d >. <dt><a nam
5150: 65 3d 22 74 6c 73 3a 3a 68 61 73 68 22 3e 3c 73 e="tls::hash"><s
5160: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 68 61 73 68 3c trong>tls::hash<
5170: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79 70 /strong> <em>typ
5180: 65 20 64 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c e data</em></a><
5190: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 43 61 6c /dt>. <dd>Cal
51a0: 63 75 6c 61 74 65 20 74 68 65 20 68 61 73 68 20 culate the hash
51b0: 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d for <em>data</em
51c0: 3e 20 75 73 69 6e 67 20 3c 65 6d 3e 74 79 70 65 > using <em>type
51d0: 3c 2f 65 6d 3e 20 64 69 67 65 73 74 2e 0a 09 52 </em> digest...R
51e0: 65 74 75 72 6e 73 20 76 61 6c 75 65 20 61 73 20 eturns value as
51f0: 61 20 68 65 78 20 73 74 72 69 6e 67 2e 20 54 79 a hex string. Ty
5200: 70 65 20 63 61 6d 20 62 65 20 61 6e 79 20 4f 70 pe cam be any Op
5210: 65 6e 53 53 4c 20 73 75 70 70 6f 72 74 65 64 0a enSSL supported.
5220: 09 68 61 73 68 20 64 69 67 65 73 74 20 69 6e 63 .hash digest inc
5230: 6c 75 64 69 6e 67 3a 20 3c 62 3e 6d 64 34 3c 2f luding: <b>md4</
5240: 62 3e 2c 20 3c 62 3e 6d 64 35 3c 2f 62 3e 2c 20 b>, <b>md5</b>,
5250: 3c 62 3e 73 68 61 31 3c 2f 62 3e 2c 0a 09 73 68 <b>sha1</b>,..sh
5260: 61 32 20 28 3c 62 3e 73 68 61 32 32 34 3c 2f 62 a2 (<b>sha224</b
5270: 3e 2c 20 3c 62 3e 73 68 61 32 35 36 3c 2f 62 3e >, <b>sha256</b>
5280: 2c 20 3c 62 3e 73 68 61 33 38 34 3c 2f 62 3e 2c , <b>sha384</b>,
5290: 20 3c 62 3e 73 68 61 35 31 32 3c 2f 62 3e 2c 0a <b>sha512</b>,.
52a0: 09 3c 62 3e 73 68 61 35 31 32 2d 32 32 34 3c 2f .<b>sha512-224</
52b0: 62 3e 2c 20 61 6e 64 20 3c 62 3e 73 68 61 35 31 b>, and <b>sha51
52c0: 32 2d 32 35 36 3c 2f 62 3e 29 2c 0a 09 73 68 61 2-256</b>),..sha
52d0: 33 20 28 3c 62 3e 73 68 61 33 2d 32 32 34 3c 2f 3 (<b>sha3-224</
52e0: 62 3e 2c 20 3c 62 3e 73 68 61 33 2d 32 35 36 3c b>, <b>sha3-256<
52f0: 2f 62 3e 2c 20 3c 62 3e 73 68 61 33 2d 33 38 34 /b>, <b>sha3-384
5300: 3c 2f 62 3e 2c 20 61 6e 64 20 3c 62 3e 73 68 61 </b>, and <b>sha
5310: 33 2d 35 31 32 3c 2f 62 3e 29 2c 20 65 74 63 2e 3-512</b>), etc.
5320: 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c </dd>.. <dt><
5330: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 61 73 a name="tls::has
5340: 68 65 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 hes"><strong>tls
5350: 3a 3a 68 61 73 68 65 73 3c 2f 73 74 72 6f 6e 67 ::hashes</strong
5360: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c ></a></dt>. <
5370: 64 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69 73 dd>Returns a lis
5380: 74 20 6f 66 20 74 68 65 20 76 61 6c 69 64 20 68 t of the valid h
5390: 61 73 68 20 64 69 67 65 73 74 73 2e 3c 2f 64 64 ash digests.</dd
53a0: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 >.. <dt><a na
53b0: 6d 65 3d 22 74 6c 73 3a 3a 6d 64 34 22 3e 3c 73 me="tls::md4"><s
53c0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 6d 64 34 3c 2f trong>tls::md4</
53d0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 strong> <em>data
53e0: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
53f0: 20 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61 74 65 <dd>Calculate
5400: 20 74 68 65 20 68 61 73 68 20 66 6f 72 20 3c 65 the hash for <e
5410: 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 75 73 69 6e m>data</em> usin
5420: 67 20 74 68 65 20 4d 44 34 20 6d 65 73 73 61 67 g the MD4 messag
5430: 65 2d 64 69 67 65 73 74 20 61 6c 67 6f 72 69 74 e-digest algorit
5440: 68 6d 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 hm.</dd>.. <d
5450: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a t><a name="tls::
5460: 6d 64 35 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 md5"><strong>tls
5470: 3a 3a 6d 64 35 3c 2f 73 74 72 6f 6e 67 3e 20 3c ::md5</strong> <
5480: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e em>data</em></a>
5490: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 43 61 </dt>. <dd>Ca
54a0: 6c 63 75 6c 61 74 65 20 74 68 65 20 68 61 73 68 lculate the hash
54b0: 20 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 for <em>data</e
54c0: 6d 3e 20 75 73 69 6e 67 20 74 68 65 20 4d 44 35 m> using the MD5
54d0: 20 6d 65 73 73 61 67 65 2d 64 69 67 65 73 74 20 message-digest
54e0: 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a algorithm.</dd>.
54f0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 . <dt><a name
5500: 3d 22 74 6c 73 3a 3a 73 68 61 31 22 3e 3c 73 74 ="tls::sha1"><st
5510: 72 6f 6e 67 3e 74 6c 73 3a 3a 73 68 61 31 3c 2f rong>tls::sha1</
5520: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 strong> <em>data
5530: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 </em></a></dt>.
5540: 20 20 20 3c 64 64 3e 43 61 6c 63 75 6c 61 74 65 <dd>Calculate
5550: 20 74 68 65 20 68 61 73 68 20 66 6f 72 20 3c 65 the hash for <e
5560: 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 75 73 69 6e m>data</em> usin
5570: 67 20 74 68 65 20 53 48 41 2d 31 20 73 65 63 75 g the SHA-1 secu
5580: 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 re hash algorith
5590: 6d 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 m.</dd>.. <dt
55a0: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 ><a name="tls::s
55b0: 68 61 32 35 36 22 3e 3c 73 74 72 6f 6e 67 3e 74 ha256"><strong>t
55c0: 6c 73 3a 3a 73 68 61 32 35 36 3c 2f 73 74 72 6f ls::sha256</stro
55d0: 6e 67 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d ng> <em>data</em
55e0: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c ></a></dt>. <
55f0: 64 64 3e 43 61 6c 63 75 6c 61 74 65 20 74 68 65 dd>Calculate the
5600: 20 68 61 73 68 20 66 6f 72 20 3c 65 6d 3e 64 61 hash for <em>da
5610: 74 61 3c 2f 65 6d 3e 20 75 73 69 6e 67 20 74 68 ta</em> using th
5620: 65 20 53 48 41 2d 32 20 53 48 41 2d 32 35 36 20 e SHA-2 SHA-256
5630: 73 65 63 75 72 65 20 68 61 73 68 20 61 6c 67 6f secure hash algo
5640: 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c rithm.</dd>.</dl
5650: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
5660: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 CALLBACK OPTIONS
5670: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f ">CALLBACK OPTIO
5680: 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e NS</a></h3>..<p>
5690: 0a 41 73 20 69 6e 64 69 63 61 74 65 64 20 61 62 .As indicated ab
56a0: 6f 76 65 2c 20 69 6e 64 69 76 69 64 75 61 6c 20 ove, individual
56b0: 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20 62 65 20 channels can be
56c0: 67 69 76 65 6e 20 74 68 65 69 72 20 6f 77 6e 20 given their own
56d0: 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 6e callbacks.to han
56e0: 64 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 74 65 dle intermediate
56f0: 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 74 processing by t
5700: 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 he OpenSSL libra
5710: 72 79 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c 73 ry, using the.<s
5720: 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f trong>-command</
5730: 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 strong>, <strong
5740: 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f >-password</stro
5750: 6e 67 3e 2c 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 ng>, and.<strong
5760: 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 >-validate_comma
5770: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 nd</strong> opti
5780: 6f 6e 73 20 70 61 73 73 65 64 20 74 6f 20 65 69 ons passed to ei
5790: 74 68 65 72 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e ther of.<strong>
57a0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 tls::socket</str
57b0: 6f 6e 67 3e 20 6f 72 20 3c 73 74 72 6f 6e 67 3e ong> or <strong>
57c0: 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 tls::import</str
57d0: 6f 6e 67 3e 2e 0a 49 66 20 74 68 65 20 63 61 6c ong>..If the cal
57e0: 6c 62 61 63 6b 20 67 65 6e 65 72 61 74 65 73 20 lback generates
57f0: 61 6e 20 65 72 72 6f 72 2c 20 74 68 65 20 3c 62 an error, the <b
5800: 3e 62 67 65 72 72 6f 72 3c 2f 62 3e 20 63 6f 6d >bgerror</b> com
5810: 6d 61 6e 64 20 77 69 74 68 20 62 65 0a 69 6e 76 mand with be.inv
5820: 6f 6b 65 64 20 77 69 74 68 20 74 68 65 20 65 72 oked with the er
5830: 72 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e ror information.
5840: 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f .</p>..<blockquo
5850: 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 te>.<dl>.. <d
5860: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 t><strong>-comma
5870: 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e nd</strong> <em>
5880: 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 callback</em></d
5890: 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 t>. <dd>..Inv
58a0: 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 69 okes the specifi
58b0: 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c ed <em>callback<
58c0: 2f 65 6d 3e 20 73 63 72 69 70 74 20 61 74 20 73 /em> script at s
58d0: 65 76 65 72 61 6c 20 70 6f 69 6e 74 73 0a 09 64 everal points..d
58e0: 75 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 53 uring the OpenSS
58f0: 4c 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 L handshake and
5900: 75 73 65 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 use. See below f
5910: 6f 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a or the possible.
5920: 09 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 .arguments passe
5930: 64 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 d to the callbac
5940: 6b 20 73 63 72 69 70 74 2e 20 56 61 6c 75 65 73 k script. Values
5950: 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 returned from t
5960: 68 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61 72 65 he..callback are
5970: 20 69 67 6e 6f 72 65 64 2e 0a 0a 09 3c 62 72 3e ignored....<br>
5980: 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 ..<br>...<dl>...
5990: 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e <dt>.. <strong>
59a0: 65 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c error</strong> <
59b0: 65 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65 73 73 61 em>channel messa
59c0: 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 ge</em>..</dt>..
59d0: 3c 64 64 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e <dd>.. The <em>
59e0: 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 message</em> arg
59f0: 75 6d 65 6e 74 20 63 6f 6e 74 61 69 6e 73 20 61 ument contains a
5a00: 6e 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 n error message
5a10: 67 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20 generated.. by
5a20: 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 the OpenSSL func
5a30: 74 69 6f 6e 20 3c 63 6f 64 65 3e 45 52 52 5f 72 tion <code>ERR_r
5a40: 65 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 eason_error_stri
5a50: 6e 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f ng()</code>...</
5a60: 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 dd>...<br>...<dt
5a70: 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e 66 >.. <strong>inf
5a80: 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 o</strong> <em>c
5a90: 68 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 6e hannel major min
5aa0: 6f 72 20 6d 65 73 73 61 67 65 20 74 79 70 65 3c or message type<
5ab0: 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 /em>..</dt>..<dd
5ac0: 3e 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f >.. This form o
5ad0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e f callback is in
5ae0: 76 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 voked by the Ope
5af0: 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 nSSL function..
5b00: 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 <code>SSL_CTX_s
5b10: 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b et_info_callback
5b20: 28 29 3c 2f 63 6f 64 65 3e 20 64 75 72 69 6e 67 ()</code> during
5b30: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 65 74 75 connection setu
5b40: 70 0a 09 20 20 61 6e 64 20 75 73 65 2e 0a 09 20 p.. and use...
5b50: 20 3c 62 72 3e 0a 09 20 20 3c 75 6c 3e 0a 09 20 <br>.. <ul>..
5b60: 20 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 20 76 61 <li>Possible va
5b70: 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 6a lues for <em>maj
5b80: 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 20 or</em> are:..
5b90: 3c 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c <code>handshake,
5ba0: 20 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c alert, connect,
5bb0: 20 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c accept</code>.<
5bc0: 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 50 6f 73 73 /li>.. <li>Poss
5bd0: 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 ible values for
5be0: 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 <em>minor</em> a
5bf0: 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 73 74 61 re:.. <code>sta
5c00: 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61 64 2c 20 rt, done, read,
5c10: 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 69 write, loop, exi
5c20: 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 t</code>.</li>..
5c30: 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 6d 65 <li>The <em>me
5c40: 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d ssage</em> argum
5c50: 65 6e 74 20 69 73 20 61 20 64 65 73 63 72 69 70 ent is a descrip
5c60: 74 69 76 65 20 73 74 72 69 6e 67 20 77 68 69 63 tive string whic
5c70: 68 20 6d 61 79 0a 09 20 20 62 65 20 67 65 6e 65 h may.. be gene
5c80: 72 61 74 65 64 20 65 69 74 68 65 72 20 62 79 20 rated either by
5c90: 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f <code>SSL_state_
5ca0: 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 string_long()</c
5cb0: 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c 63 ode> or by.. <c
5cc0: 6f 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 ode>SSL_alert_de
5cd0: 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 sc_string_long()
5ce0: 3c 2f 63 6f 64 65 3e 2c 20 64 65 70 65 6e 64 69 </code>, dependi
5cf0: 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78 ng on the contex
5d00: 74 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 46 t.</li>.. <li>F
5d10: 6f 72 20 61 6c 65 72 74 73 2c 20 74 68 65 20 70 or alerts, the p
5d20: 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 ossible values f
5d30: 6f 72 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e or <em>type</em>
5d40: 20 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 77 are:.. <code>w
5d50: 61 72 6e 69 6e 67 2c 20 66 61 74 61 6c 2c 20 61 arning, fatal, a
5d60: 6e 64 20 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 65 nd unknown</code
5d70: 3e 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c 0a 09 >. For others,..
5d80: 20 20 3c 63 6f 64 65 3e 69 6e 66 6f 3c 2f 63 6f <code>info</co
5d90: 64 65 3e 20 69 73 20 75 73 65 64 2e 3c 2f 6c 69 de> is used.</li
5da0: 3e 0a 09 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 >.. </ul>..</dd
5db0: 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 >...<dt>.. <str
5dc0: 6f 6e 67 3e 6d 65 73 73 61 67 65 3c 2f 73 74 72 ong>message</str
5dd0: 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c ong> <em>channel
5de0: 20 64 69 72 65 63 74 69 6f 6e 20 76 65 72 73 69 direction versi
5df0: 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65 20 on content_type
5e00: 64 61 74 61 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e data</em>..</dt>
5e10: 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 ..<dd>.. This f
5e20: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 orm of callback
5e30: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 is invoked by th
5e40: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 e OpenSSL functi
5e50: 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f on.. <code>SSL_
5e60: 73 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b set_msg_callback
5e70: 28 29 3c 2f 63 6f 64 65 3e 20 77 68 65 6e 65 76 ()</code> whenev
5e80: 65 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20 er a message is
5e90: 73 65 6e 74 20 6f 72 0a 09 20 20 72 65 63 65 69 sent or.. recei
5ea0: 76 65 64 2e 20 49 74 20 69 73 20 6f 6e 6c 79 20 ved. It is only
5eb0: 61 76 61 69 6c 61 62 6c 65 20 77 68 65 6e 0a 09 available when..
5ec0: 20 20 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d OpenSSL is com
5ed0: 70 6c 69 65 64 20 77 69 74 68 20 74 68 65 20 3c plied with the <
5ee0: 65 6d 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 em>enable-ssl-tr
5ef0: 61 63 65 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e ace</em> option.
5f00: 0a 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 64 69 .. Where <em>di
5f10: 72 65 63 74 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20 rection</em> is
5f20: 53 65 6e 74 20 6f 72 20 52 65 63 65 69 76 65 64 Sent or Received
5f30: 2c 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 , <em>version</e
5f40: 6d 3e 20 69 73 20 74 68 65 0a 09 20 20 70 72 6f m> is the.. pro
5f50: 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 2c 20 3c tocol version, <
5f60: 65 6d 3e 63 6f 6e 74 65 6e 74 5f 74 79 70 65 3c em>content_type<
5f70: 2f 65 6d 3e 20 69 73 20 74 68 65 20 6d 65 73 73 /em> is the mess
5f80: 61 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 70 65 age content type
5f90: 2c 0a 09 20 20 61 6e 64 20 3c 65 6d 3e 64 61 74 ,.. and <em>dat
5fa0: 61 3c 2f 65 6d 3e 20 69 73 20 6d 6f 72 65 20 69 a</em> is more i
5fb0: 6e 66 6f 20 6f 6e 20 74 68 65 20 6d 65 73 73 61 nfo on the messa
5fc0: 67 65 20 66 72 6f 6d 20 74 68 65 20 3c 63 6f 64 ge from the <cod
5fd0: 65 3e 53 53 4c 5f 74 72 61 63 65 3c 2f 63 6f 64 e>SSL_trace</cod
5fe0: 65 3e 20 41 50 49 2e 0a 09 3c 2f 64 64 3e 0a 09 e> API...</dd>..
5ff0: 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c <br>...<dt>.. <
6000: 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 3c 2f strong>session</
6010: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e strong> <em>chan
6020: 6e 65 6c 20 73 65 73 73 69 6f 6e 5f 69 64 20 74 nel session_id t
6030: 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f icket lifetime</
6040: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e em>..</dt>..<dd>
6050: 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 .. This form of
6060: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 callback is inv
6070: 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e oked by the Open
6080: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 SSL function..
6090: 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 <code>SSL_CTX_se
60a0: 73 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c ss_set_new_cb()<
60b0: 2f 63 6f 64 65 3e 2e 0a 09 20 20 57 68 65 72 65 /code>... Where
60c0: 20 3c 65 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 3c <em>session_id<
60d0: 2f 65 6d 3e 20 69 73 20 74 68 65 20 63 75 72 72 /em> is the curr
60e0: 65 6e 74 20 73 65 73 73 69 6f 6e 20 69 64 65 6e ent session iden
60f0: 74 69 66 69 65 72 2c 0a 09 20 20 3c 65 6d 3e 74 tifier,.. <em>t
6100: 69 63 6b 65 74 3c 2f 65 6d 3e 20 69 73 20 74 68 icket</em> is th
6110: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 e session ticket
6120: 20 69 6e 66 6f 2c 20 61 6e 64 20 3c 65 6d 3e 6c info, and <em>l
6130: 69 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 20 20 ifetime</em>..
6140: 69 73 20 74 68 65 20 74 68 65 20 74 69 63 6b 65 is the the ticke
6150: 74 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 73 65 t lifetime in se
6160: 63 6f 6e 64 73 2e 0a 09 3c 2f 64 64 3e 0a 09 3c conds...</dd>..<
6170: 62 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c br>..</dl>. <
6180: 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a /dd>.. <br>..
6190: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e <dt><strong>
61a0: 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e -password</stron
61b0: 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c g> <em>callback<
61c0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 /em></dt>. <d
61d0: 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 d>..Invokes the
61e0: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 specified <em>ca
61f0: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 llback</em> scri
6200: 70 74 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 pt when OpenSSL
6210: 6e 65 65 64 73 20 74 6f 0a 09 6f 62 74 61 69 6e needs to..obtain
6220: 20 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 65 a password. See
6230: 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 below for the p
6240: 6f 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 ossible argument
6250: 73 20 70 61 73 73 65 64 20 74 6f 0a 09 74 68 65 s passed to..the
6260: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 callback script
6270: 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 . See below for
6280: 76 61 6c 69 64 20 72 65 74 75 72 6e 20 76 61 6c valid return val
6290: 75 65 73 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 ues....<br>..<br
62a0: 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a >...<dl>...<dt>.
62b0: 09 20 20 3c 73 74 72 6f 6e 67 3e 70 61 73 73 77 . <strong>passw
62c0: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d ord</strong> <em
62d0: 3e 72 77 66 6c 61 67 20 73 69 7a 65 3c 2f 65 6d >rwflag size</em
62e0: 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 >..</dt>..<dd>..
62f0: 20 20 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20 6c Invoked when l
6300: 6f 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69 6e oading or storin
6310: 67 20 61 20 50 45 4d 20 63 65 72 74 69 66 69 63 g a PEM certific
6320: 61 74 65 20 77 69 74 68 20 65 6e 63 72 79 70 74 ate with encrypt
6330: 69 6f 6e 2e 0a 09 20 20 57 68 65 72 65 20 3c 65 ion... Where <e
6340: 6d 3e 72 77 66 6c 61 67 3c 2f 65 6d 3e 20 69 73 m>rwflag</em> is
6350: 20 30 20 66 6f 72 20 72 65 61 64 69 6e 67 2f 64 0 for reading/d
6360: 65 63 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 66 ecryption or 1 f
6370: 6f 72 0a 09 20 20 77 72 69 74 69 6e 67 2f 65 6e or.. writing/en
6380: 63 72 79 70 74 69 6f 6e 20 28 63 61 6e 20 70 72 cryption (can pr
6390: 6f 6d 70 74 20 75 73 65 72 20 74 6f 20 63 6f 6e ompt user to con
63a0: 66 69 72 6d 29 20 61 6e 64 0a 09 20 20 3c 65 6d firm) and.. <em
63b0: 3e 73 69 7a 65 3c 2f 65 6d 3e 20 69 73 20 74 68 >size</em> is th
63c0: 65 20 6d 61 78 20 70 61 73 73 77 6f 72 64 20 6c e max password l
63d0: 65 6e 67 74 68 20 69 6e 20 62 79 74 65 73 2e 0a ength in bytes..
63e0: 09 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 . The callback
63f0: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 74 68 should return th
6400: 65 20 70 61 73 73 77 6f 72 64 20 61 73 20 61 20 e password as a
6410: 73 74 72 69 6e 67 2e 0a 09 3c 2f 64 64 3e 0a 20 string...</dd>.
6420: 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 </dd>.. <b
6430: 72 3e 0a 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 r>... <dt><st
6440: 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 6f rong>-validateco
6450: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c mmand</strong> <
6460: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e em>callback</em>
6470: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 </dt>. <dd>..
6480: 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 Invokes the spec
6490: 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 ified <em>callba
64a0: 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 64 ck</em> script d
64b0: 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 20 uring handshake
64c0: 69 6e 0a 09 6f 72 64 65 72 20 74 6f 20 76 61 6c in..order to val
64d0: 69 64 61 74 65 20 74 68 65 20 70 72 6f 76 69 64 idate the provid
64e0: 65 64 20 76 61 6c 75 65 28 73 29 2e 20 53 65 65 ed value(s). See
64f0: 20 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 below for the p
6500: 6f 73 73 69 62 6c 65 0a 09 61 72 67 75 6d 65 6e ossible..argumen
6510: 74 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 ts passed to the
6520: 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 callback script
6530: 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65 ...To reject the
6540: 20 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74 value and abort
6550: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 connection, the
6560: 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 callback should
6570: 20 72 65 74 75 72 6e 20 30 2e 0a 09 54 6f 20 61 return 0...To a
6580: 63 63 65 70 74 20 74 68 65 20 76 61 6c 75 65 20 ccept the value
6590: 61 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 and continue the
65a0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 connection, it
65b0: 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 2e should return 1.
65c0: 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20 ..To reject the
65d0: 76 61 6c 75 65 2c 20 62 75 74 20 63 6f 6e 74 69 value, but conti
65e0: 6e 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 nue the connecti
65f0: 6f 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 on, it should re
6600: 74 75 72 6e 20 32 2e 0a 0a 09 3c 62 72 3e 0a 09 turn 2....<br>..
6610: 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 <br>...<dl>...<d
6620: 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 61 6c t>.. <strong>al
6630: 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e pn</strong> <em>
6640: 63 68 61 6e 6e 65 6c 20 70 72 6f 74 6f 63 6f 6c channel protocol
6650: 20 6d 61 74 63 68 3c 2f 65 6d 3e 0a 09 3c 2f 64 match</em>..</d
6660: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 t>..<dd>.. For
6670: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f servers, this fo
6680: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 rm of callback i
6690: 73 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 s invoked when t
66a0: 68 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e 0a 09 he client ALPN..
66b0: 20 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 extension is r
66c0: 65 63 65 69 76 65 64 2e 20 49 66 20 3c 65 6d 3e eceived. If <em>
66d0: 6d 61 74 63 68 3c 2f 65 6d 3e 20 69 73 20 74 72 match</em> is tr
66e0: 75 65 2c 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c ue, <em>protocol
66f0: 3c 2f 65 6d 3e 0a 09 20 20 69 73 20 74 68 65 20 </em>.. is the
6700: 66 69 72 73 74 20 3c 62 3e 2d 61 6c 70 6e 3c 2f first <b>-alpn</
6710: 62 3e 20 73 70 65 63 69 66 69 65 64 20 70 72 6f b> specified pro
6720: 74 6f 63 6f 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 20 tocol common to
6730: 74 68 65 20 62 6f 74 68 20 74 68 65 0a 09 20 20 the both the..
6740: 63 6c 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65 client and serve
6750: 72 2e 20 49 66 20 6e 6f 74 2c 20 74 68 65 20 66 r. If not, the f
6760: 69 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63 irst client spec
6770: 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 ified protocol i
6780: 73 0a 09 20 20 75 73 65 64 2e 20 43 61 6c 6c 65 s.. used. Calle
6790: 64 20 61 66 74 65 72 20 68 65 6c 6c 6f 20 61 6e d after hello an
67a0: 64 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73 d ALPN callbacks
67b0: 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a ...</dd>...<br>.
67c0: 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e ..<dt>.. <stron
67d0: 67 3e 68 65 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 3e g>hello</strong>
67e0: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 73 65 72 <em>channel ser
67f0: 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f vername</em>..</
6800: 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 dt>..<dd>.. For
6810: 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 servers, this f
6820: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 orm of callback
6830: 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e is invoked durin
6840: 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 0a 09 g client hello..
6850: 20 20 6d 65 73 73 61 67 65 20 70 72 6f 63 65 73 message proces
6860: 73 69 6e 67 2e 20 49 74 20 69 73 20 75 73 65 64 sing. It is used
6870: 20 74 6f 20 73 65 6c 65 63 74 20 61 6e 20 61 70 to select an ap
6880: 70 72 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 propriate certif
6890: 69 63 61 74 65 20 74 6f 0a 09 20 20 70 72 65 73 icate to.. pres
68a0: 65 6e 74 2c 20 61 6e 64 20 6d 61 6b 65 20 6f 74 ent, and make ot
68b0: 68 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f her configuratio
68c0: 6e 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 n adjustments re
68d0: 6c 65 76 61 6e 74 20 74 6f 20 74 68 61 74 0a 09 levant to that..
68e0: 20 20 73 65 72 76 65 72 20 6e 61 6d 65 20 61 6e server name an
68f0: 64 20 69 74 73 20 63 6f 6e 66 69 67 75 72 61 74 d its configurat
6900: 69 6f 6e 2e 20 43 61 6c 6c 65 64 20 62 65 66 6f ion. Called befo
6910: 72 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 20 re SNI and ALPN
6920: 63 61 6c 6c 62 61 63 6b 73 2e 0a 09 3c 2f 64 64 callbacks...</dd
6930: 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a >...<br>...<dt>.
6940: 09 20 20 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f . <strong>sni</
6950: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e strong> <em>chan
6960: 6e 65 6c 20 73 65 72 76 65 72 6e 61 6d 65 3c 2f nel servername</
6970: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e em>..</dt>..<dd>
6980: 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c .. For servers,
6990: 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 this form of ca
69a0: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 llback is invoke
69b0: 64 20 77 68 65 6e 20 74 68 65 20 53 4e 49 20 65 d when the SNI e
69c0: 78 74 65 6e 73 69 6f 6e 0a 09 20 20 66 72 6f 6d xtension.. from
69d0: 20 74 68 65 20 63 6c 69 65 6e 74 20 69 73 20 72 the client is r
69e0: 65 63 65 69 76 65 64 2e 20 57 68 65 72 65 20 3c eceived. Where <
69f0: 65 6d 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 em>servername</e
6a00: 6d 3e 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74 m> is the client
6a10: 0a 09 20 20 70 72 6f 76 69 64 65 64 20 73 65 72 .. provided ser
6a20: 76 65 72 20 6e 61 6d 65 20 66 72 6f 6d 20 74 68 ver name from th
6a30: 65 20 3c 62 3e 2d 73 65 72 76 65 72 6e 61 6d 65 e <b>-servername
6a40: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 69 </b> option. Thi
6a50: 73 20 69 73 0a 09 20 20 75 73 65 64 20 77 68 65 s is.. used whe
6a60: 6e 20 61 20 73 65 72 76 65 72 20 73 75 70 70 6f n a server suppo
6a70: 72 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e 61 6d rts multiple nam
6a80: 65 73 2c 20 73 6f 20 74 68 65 20 72 69 67 68 74 es, so the right
6a90: 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 20 certificate..
6aa0: 63 61 6e 20 62 65 20 75 73 65 64 2e 20 43 61 6c can be used. Cal
6ab0: 6c 65 64 20 61 66 74 65 72 20 68 65 6c 6c 6f 20 led after hello
6ac0: 63 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 66 callback but bef
6ad0: 6f 72 65 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 ore ALPN callbac
6ae0: 6b 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e k...</dd>...<br>
6af0: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f ...<dt>.. <stro
6b00: 6e 67 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e ng>verify</stron
6b10: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 g> <em>channel d
6b20: 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73 epth cert status
6b30: 20 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 error</em>..</d
6b40: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 t>..<dd>.. This
6b50: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 form of callbac
6b60: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 k is invoked by
6b70: 4f 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e OpenSSL when a n
6b80: 65 77 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 ew certificate..
6b90: 20 20 69 73 20 72 65 63 65 69 76 65 64 20 66 72 is received fr
6ba0: 6f 6d 20 74 68 65 20 70 65 65 72 2e 20 49 74 20 om the peer. It
6bb0: 61 6c 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 6e allows the clien
6bc0: 74 20 74 6f 20 63 68 65 63 6b 20 74 68 65 0a 09 t to check the..
6bd0: 20 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 certificate ve
6be0: 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75 6c rification resul
6bf0: 74 73 20 61 6e 64 20 63 68 6f 6f 73 65 20 77 68 ts and choose wh
6c00: 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69 6e 75 ether to continu
6c10: 65 0a 09 20 20 6f 72 20 6e 6f 74 2e 20 49 74 20 e.. or not. It
6c20: 69 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 61 is called for ea
6c30: 63 68 20 63 65 72 74 69 66 69 63 61 74 65 20 69 ch certificate i
6c40: 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 n the certificat
6c50: 65 20 63 68 61 69 6e 2e 0a 09 20 20 3c 75 6c 3e e chain... <ul>
6c60: 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e .. <li>The <em>
6c70: 64 65 70 74 68 3c 2f 65 6d 3e 20 61 72 67 75 6d depth</em> argum
6c80: 65 6e 74 20 69 73 20 61 6e 20 69 6e 74 65 67 65 ent is an intege
6c90: 72 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 r representing t
6ca0: 68 65 0a 09 20 20 63 75 72 72 65 6e 74 20 64 65 he.. current de
6cb0: 70 74 68 20 6f 6e 20 74 68 65 20 63 65 72 74 69 pth on the certi
6cc0: 66 69 63 61 74 65 20 63 68 61 69 6e 2c 20 77 69 ficate chain, wi
6cd0: 74 68 0a 09 20 20 3c 63 6f 64 65 3e 30 3c 2f 63 th.. <code>0</c
6ce0: 6f 64 65 3e 20 61 73 20 74 68 65 20 70 65 65 72 ode> as the peer
6cf0: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 6e 64 certificate and
6d00: 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 20 67 higher values g
6d10: 6f 69 6e 67 0a 09 20 20 75 70 20 74 6f 20 74 68 oing.. up to th
6d20: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 e Certificate Au
6d30: 74 68 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f 6c thority (CA).</l
6d40: 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 i>.. <li>The <e
6d50: 6d 3e 63 65 72 74 3c 2f 65 6d 3e 20 61 72 67 75 m>cert</em> argu
6d60: 6d 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20 6f ment is a list o
6d70: 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 f key-value pair
6d80: 73 20 73 69 6d 69 6c 61 72 0a 09 20 20 74 6f 20 s similar.. to
6d90: 74 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 those returned b
6da0: 79 0a 09 20 20 3c 61 20 68 72 65 66 3d 22 23 74 y.. <a href="#t
6db0: 6c 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 ls::status"><str
6dc0: 6f 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c ong>tls::status<
6dd0: 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 2e 3c 2f 6c /strong></a>.</l
6de0: 69 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 i>.. <li>The <e
6df0: 6d 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 61 72 m>status</em> ar
6e00: 67 75 6d 65 6e 74 20 69 73 20 61 6e 20 62 6f 6f gument is an boo
6e10: 6c 65 61 6e 20 72 65 70 72 65 73 65 6e 74 69 6e lean representin
6e20: 67 20 74 68 65 0a 09 20 20 76 61 6c 69 64 69 74 g the.. validit
6e30: 79 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 y of the current
6e40: 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 09 20 certificate...
6e50: 20 41 20 76 61 6c 75 65 20 6f 66 20 3c 63 6f 64 A value of <cod
6e60: 65 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 e>0</code> means
6e70: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 the certificate
6e80: 20 69 73 20 64 65 65 6d 65 64 20 69 6e 76 61 6c is deemed inval
6e90: 69 64 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 6f id... A value o
6ea0: 66 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f 64 65 3e f <code>1</code>
6eb0: 20 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 69 means the certi
6ec0: 66 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 64 ficate is deemed
6ed0: 20 76 61 6c 69 64 2e 3c 2f 6c 69 3e 0a 09 20 20 valid.</li>..
6ee0: 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 65 72 72 6f <li>The <em>erro
6ef0: 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 r</em> argument
6f00: 73 75 70 70 6c 69 65 73 20 74 68 65 20 6d 65 73 supplies the mes
6f10: 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 sage, if any, ge
6f20: 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20 3c 63 nerated.. by <c
6f30: 6f 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 ode>X509_STORE_C
6f40: 54 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f TX_get_error()</
6f50: 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c code>.</li>.. <
6f60: 2f 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 /ul>..</dd>..<br
6f70: 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 >..</dl>. </d
6f80: 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b d>.</dl>.</block
6f90: 71 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 quote>..<p>.Refe
6fa0: 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 rence implementa
6fb0: 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 tions of these c
6fc0: 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f allbacks are pro
6fd0: 76 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69 73 vided in the.dis
6fe0: 74 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 74 tribution as <st
6ff0: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 rong>tls::callba
7000: 63 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 ck</strong>, <st
7010: 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f rong>tls::passwo
7020: 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 61 6e 64 rd</strong>,.and
7030: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 <strong>tls::va
7040: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f lidate_command</
7050: 73 74 72 6f 6e 67 3e 20 72 65 73 70 65 63 74 69 strong> respecti
7060: 76 65 6c 79 2e 20 20 4e 6f 74 65 20 74 68 61 74 vely. Note that
7070: 20 74 68 65 73 65 20 61 72 65 0a 3c 65 6d 3e 73 these are.<em>s
7080: 61 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 ample</em> imple
7090: 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 2e mentations only.
70a0: 20 20 49 6e 20 61 20 6d 6f 72 65 20 72 65 61 6c In a more real
70b0: 69 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 istic deployment
70c0: 0a 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 69 .you would speci
70d0: 66 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c fy your own call
70e0: 62 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 back scripts on
70f0: 65 61 63 68 20 54 4c 53 20 63 68 61 6e 6e 65 6c each TLS channel
7100: 20 75 73 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f using the.<stro
7110: 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 ng>-command</str
7120: 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 ong>, <strong>-p
7130: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e assword</strong>
7140: 2c 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d 76 , and <strong>-v
7150: 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c alidate_command<
7160: 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 /strong> options
7170: 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 ..</p>..<p>.The
7180: 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 default behavior
7190: 20 77 68 65 6e 20 74 68 65 20 3c 73 74 72 6f 6e when the <stron
71a0: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f g>-command</stro
71b0: 6e 67 3e 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e ng> and <strong>
71c0: 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e -validate_comman
71d0: 64 3c 2f 73 74 72 6f 6e 67 3e 0a 6f 70 74 69 6f d</strong>.optio
71e0: 6e 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 ns are not speci
71f0: 66 69 65 64 20 69 73 20 66 6f 72 20 54 4c 53 20 fied is for TLS
7200: 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 to process the a
7210: 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 ssociated librar
7220: 79 20 63 61 6c 6c 62 61 63 6b 73 0a 69 6e 74 65 y callbacks.inte
7230: 72 6e 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 61 rnally. The defa
7240: 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 ult behavior whe
7250: 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 2d 70 n the <strong>-p
7260: 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e assword</strong>
7270: 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 0a 73 option is not.s
7280: 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 20 pecified is for
7290: 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 TLS to process t
72a0: 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 he associated li
72b0: 62 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 brary callbacks
72c0: 62 79 20 61 74 74 65 6d 70 74 69 6e 67 0a 74 6f by attempting.to
72d0: 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c call <strong>tl
72e0: 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 s::password</str
72f0: 6f 6e 67 3e 2e 0a 54 68 65 20 64 69 66 66 65 72 ong>..The differ
7300: 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 65 ence between the
7310: 73 65 20 74 77 6f 20 62 65 68 61 76 69 6f 72 73 se two behaviors
7320: 20 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 is a consequenc
7330: 65 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 e of maintaining
7340: 0a 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 .compatibility w
7350: 69 74 68 20 65 61 72 6c 69 65 72 20 69 6d 70 6c ith earlier impl
7360: 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70 ementations..</p
7370: 3e 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 74 72 6f >..<p>.The <stro
7380: 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 ng>tls::debug</s
7390: 74 72 6f 6e 67 3e 20 76 61 72 69 61 62 6c 65 20 trong> variable
73a0: 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 provides some ad
73b0: 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c ditional.control
73c0: 20 6f 76 65 72 20 74 68 65 73 65 20 72 65 66 65 over these refe
73d0: 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 2e rence callbacks.
73e0: 20 20 49 74 73 20 76 61 6c 75 65 20 69 73 20 7a Its value is z
73f0: 65 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e 0a ero by default..
7400: 48 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 Higher values pr
7410: 6f 64 75 63 65 20 6d 6f 72 65 20 64 69 61 67 6e oduce more diagn
7420: 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61 6e ostic output, an
7430: 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 d will also forc
7440: 65 20 74 68 65 0a 76 65 72 69 66 79 20 6d 65 74 e the.verify met
7450: 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67 3e 74 hod in <strong>t
7460: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 ls::callback</st
7470: 72 6f 6e 67 3e 20 74 6f 20 61 63 63 65 70 74 20 rong> to accept
7480: 74 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c the.certificate,
7490: 20 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 73 even when it is
74a0: 20 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a invalid..</p>..
74b0: 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 <p>.<em>.The use
74c0: 20 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 of the referenc
74d0: 65 20 63 61 6c 6c 62 61 63 6b 73 20 3c 73 74 72 e callbacks <str
74e0: 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 ong>tls::callbac
74f0: 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 3c 73 74 72 k</strong>,.<str
7500: 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 ong>tls::passwor
7510: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 20 d</strong>, and
7520: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c <strong>tls::val
7530: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 idate_command</s
7540: 74 72 6f 6e 67 3e 0a 69 73 20 6e 6f 74 20 72 65 trong>.is not re
7550: 63 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 79 commended. They
7560: 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 may be removed
7570: 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 from future rele
7580: 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e ases..</em>.</p>
7590: 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 ..<p>.<em>.The u
75a0: 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 se of the variab
75b0: 6c 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a le <strong>tls::
75c0: 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 debug</strong> i
75d0: 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 s not recommende
75e0: 64 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d d..It may be rem
75f0: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 oved from future
7600: 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e releases..</em>
7610: 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 .</p>..<h3><a na
7620: 6d 65 3d 22 44 45 42 55 47 22 3e 44 45 42 55 47 me="DEBUG">DEBUG
7630: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 54 4c 53 20 6b </a></h3>..TLS k
7640: 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62 ey logging can b
7650: 65 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74 e enabled by set
7660: 74 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e ting the environ
7670: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62 ment variable.<b
7680: 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f >SSLKEYLOGFILE</
7690: 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f b> to the name o
76a0: 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f f the file to lo
76b0: 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e 65 g to. Then whene
76c0: 76 65 72 20 54 4c 53 0a 6b 65 79 20 6d 61 74 65 ver TLS.key mate
76d0: 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74 65 rial is generate
76e0: 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 69 74 d or received it
76f0: 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20 will be logged
7700: 74 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68 69 to the file. Thi
7710: 73 0a 69 73 20 75 73 65 66 75 6c 20 66 6f 72 20 s.is useful for
7720: 6c 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74 61 logging key data
7730: 20 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 for network log
7740: 67 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73 ging tools to us
7750: 65 20 74 6f 0a 64 65 63 72 79 70 74 20 74 68 65 e to.decrypt the
7760: 20 64 61 74 61 2e 0a 0a 3c 68 33 3e 3c 61 20 6e data...<h3><a n
7770: 61 6d 65 3d 22 48 54 54 50 53 20 45 58 41 4d 50 ame="HTTPS EXAMP
7780: 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c LE">HTTPS EXAMPL
7790: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 E</a></h3>..<p>T
77a0: 68 69 73 20 65 78 61 6d 70 6c 65 20 75 73 65 73 his example uses
77b0: 20 61 20 73 61 6d 70 6c 65 20 73 65 72 76 65 72 a sample server
77c0: 2e 70 65 6d 20 70 72 6f 76 69 64 65 64 20 77 69 .pem provided wi
77d0: 74 68 20 74 68 65 20 54 4c 53 20 72 65 6c 65 61 th the TLS relea
77e0: 73 65 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 20 se,.courtesy of
77f0: 74 68 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e the <strong>Open
7800: 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 6f SSL</strong> pro
7810: 6a 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e ject.</p>..<pre>
7820: 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 <code>.package r
7830: 65 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b equire http.pack
7840: 61 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a age require tls.
7850: 0a 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 .http::register
7860: 68 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 https 443 [list
7870: 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 ::tls::socket -a
7880: 75 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 72 utoservername tr
7890: 75 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 65 ue -require true
78a0: 20 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 6c -cadir /etc/ssl
78b0: 2f 63 65 72 74 73 5d 0a 0a 73 65 74 20 74 6f 6b /certs]..set tok
78c0: 20 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 68 [http::geturl h
78d0: 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 ttps://www.tcl.t
78e0: 6b 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 k/].</code></pre
78f0: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 >..<h3><a name="
7900: 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 SPECIAL CONSIDER
7910: 41 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c 20 ATIONS">SPECIAL
7920: 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f CONSIDERATIONS</
7930: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 20 a></h3>..<p>The
7940: 63 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 capabilities of
7950: 74 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e this package can
7960: 20 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 vary enormously
7970: 20 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 based upon how
7980: 79 6f 75 72 0a 4f 70 65 6e 53 53 4c 20 6c 69 62 your.OpenSSL lib
7990: 72 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75 rary was configu
79a0: 72 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 4e red and built. N
79b0: 65 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79 20 ew versions may
79c0: 6f 62 73 6f 6c 65 74 65 20 6f 6c 64 65 72 0a 70 obsolete older.p
79d0: 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 rotocol versions
79e0: 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 20 , add or remove
79f0: 63 69 70 68 65 72 73 2c 20 63 68 61 6e 67 65 20 ciphers, change
7a00: 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2c 20 default values,
7a10: 65 74 63 2e 20 55 73 65 20 74 68 65 0a 3c 73 74 etc. Use the.<st
7a20: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 68 65 72 rong>tls::cipher
7a30: 73 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 20 3c s</strong> and <
7a40: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74 strong>tls::prot
7a50: 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 63 ocols</strong> c
7a60: 6f 6d 6d 61 6e 64 73 20 74 6f 0a 6f 62 74 61 69 ommands to.obtai
7a70: 6e 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20 n the supported
7a80: 76 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a 3c versions.</p>..<
7a90: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 20 h3><a name="SEE
7aa0: 41 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f ALSO">SEE ALSO</
7ab0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 a></h3>..<p><str
7ac0: 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f ong>socket</stro
7ad0: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 6c ng>, <strong>fil
7ae0: 65 65 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67 eevent, </strong
7af0: 3e 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f ><a.href="http:/
7b00: 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 /www.openssl.org
7b10: 2f 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 /"><strong>OpenS
7b20: 53 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c SL</strong></a><
7b30: 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e /p>..<hr>..<pre>
7b40: 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 .Copyright ©
7b50: 3b 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d ; 1999 Matt Newm
7b60: 61 6e 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 an..Copyright &c
7b70: 6f 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 69 opy; 2004 Starfi
7b80: 73 68 20 53 79 73 74 65 6d 73 2e 0a 3c 2f 70 72 sh Systems..</pr
7b90: 65 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d e>.</body>.</htm
7ba0: 6c 3e 0a l>.