Hex Artifact Content

Artifact 56442a399fc11028ec30fe04869c693f762e47f156fb09a0477e5a64eb19de69:


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>&nbsp;
0440: 3c 2f 64 74 3e 0a 09 20 20 20 20 3c 64 64 3e 3c  </dt>..    <dd><
0450: 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f  b>tls::ciphers</
0460: 62 3e 20 3c 65 6d 3e 3f 70 72 6f 74 6f 63 6f 6c  b> <em>?protocol
0470: 3f 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70  ? ?verbose? ?sup
0480: 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64 64  ported?</em></dd
0490: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c  >..    <dd><b>tl
04a0: 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62 3e  s::protocols</b>
04b0: 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c  </dd>..    <dd><
04c0: 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f  b>tls::version</
04d0: 62 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 74  b></dd>..    <dt
04e0: 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 20 20  >&nbsp;</dt>..  
04f0: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 64 69    <dd><b>tls::di
0500: 67 65 73 74 3c 2f 62 3e 20 3c 65 6d 3e 74 79 70  gest</b> <em>typ
0510: 65 20 3f 2d 62 69 6e 7c 2d 68 65 78 3f 20 5b 2d  e ?-bin|-hex? [-
0520: 66 69 6c 65 20 66 69 6c 65 6e 61 6d 65 20 7c 20  file filename | 
0530: 3f 2d 64 61 74 61 3f 20 64 61 74 61 5d 3c 2f 65  ?-data? data]</e
0540: 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64 64  m></dd>..    <dd
0550: 3e 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 73  ><b>tls::digests
0560: 3c 2f 62 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c  </b></dd>..    <
0570: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 34 3c 2f  dd><b>tls::md4</
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 6d 64 35 3c 2f 62 3e 20 3c  b>tls::md5</b> <
05b0: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64  em>data</em></dd
05c0: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c  >..    <dd><b>tl
05d0: 73 3a 3a 73 68 61 31 3c 2f 62 3e 20 3c 65 6d 3e  s::sha1</b> <em>
05e0: 64 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09  data</em></dd>..
05f0: 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a      <dd><b>tls::
0600: 73 68 61 32 35 36 3c 2f 62 3e 20 3c 65 6d 3e 64  sha256</b> <em>d
0610: 61 74 61 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c  ata</em></dd>..<
0620: 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20  /dl>.    </dd>. 
0630: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22     <dd><a href="
0640: 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41  #COMMANDS">COMMA
0650: 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20  NDS</a></dd>.   
0660: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43   <dd><a href="#C
0670: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22  ALLBACK OPTIONS"
0680: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e  >CALLBACK OPTION
0690: 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c  S</a></dd>.    <
06a0: 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 54  dd><a href="#HTT
06b0: 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50  PS EXAMPLE">HTTP
06c0: 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64  S EXAMPLE</a></d
06d0: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72  d>.    <dd><a hr
06e0: 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53  ef="#SEE ALSO">S
06f0: 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41  PECIAL CONSIDERA
0700: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20  TIONS</a></dd>. 
0710: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22     <dd><a href="
0720: 23 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41  #SEE ALSO">SEE A
0730: 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64  LSO</a></dd>.</d
0740: 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61  l>..<hr>..<h3><a
0750: 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d   name="NAME">NAM
0760: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c  E</a></h3>..<p><
0770: 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f  strong>tls</stro
0780: 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f  ng> - binding to
0790: 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c   <strong>OpenSSL
07a0: 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69  </strong>.toolki
07b0: 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e  t.</p>..<h3><a n
07c0: 61 6d 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53  ame="SYNOPSIS">S
07d0: 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e  YNOPSIS</a></h3>
07e0: 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20  ..<p><b>package 
07f0: 72 65 71 75 69 72 65 20 54 63 6c 20 38 2e 35 3c  require Tcl 8.5<
0800: 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61  /b><br>.<b>packa
0810: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f  ge require tls</
0820: 62 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68  b><br>.<br>.<a h
0830: 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6e 69 74 22  ref="#tls::init"
0840: 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62  ><b>tls::init</b
0850: 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f  > <i>?options?</
0860: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72  i></a><br>.<a hr
0870: 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74  ef="#tls::socket
0880: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74  "><b>tls::socket
0890: 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73  </b> <i>?options
08a0: 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f 69 3e 3c  ? host port</i><
08b0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
08c0: 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c  s::socket"><b>tl
08d0: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69  s::socket</b> <i
08e0: 3e 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e  >?-server comman
08f0: 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72  d? ?options? por
0900: 74 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61  t</i></a><br>.<a
0910: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61   href="#tls::sta
0920: 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61  tus"><b>tls::sta
0930: 74 75 73 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63  tus</b> <i>?-loc
0940: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c  al? channel</i><
0950: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
0960: 22 23 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f  "#tls::connectio
0970: 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65  n"><b>tls::conne
0980: 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61  ction</b> <i>cha
0990: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e  nnel</i></a><br>
09a0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
09b0: 68 61 6e 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c  handshake"><b>tl
09c0: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e  s::handshake</b>
09d0: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c   <i>channel</i><
09e0: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
09f0: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c  "#tls::import"><
0a00: 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62  b>tls::import</b
0a10: 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70  > <i>channel ?op
0a20: 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62  tions?</i></a><b
0a30: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73  r>.<a href="#tls
0a40: 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74  ::unimport"><b>t
0a50: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e  ls::unimport</b>
0a60: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c   <i>channel</i><
0a70: 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20  /a><br>.<br>.<a 
0a80: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68  href="#tls::ciph
0a90: 65 72 73 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70  ers"><b>tls::cip
0aa0: 68 65 72 73 3c 2f 62 3e 20 3c 69 3e 3f 70 72 6f  hers</b> <i>?pro
0ab0: 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f  tocol? ?verbose?
0ac0: 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f 69 3e   ?supported?</i>
0ad0: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66  </a><br>.<a href
0ae0: 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  ="#tls::protocol
0af0: 73 22 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f  s"><b>tls::proto
0b00: 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 72 3e  cols</b></a><br>
0b10: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
0b20: 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74 6c 73 3a  version"><b>tls:
0b30: 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61 3e  :version</b></a>
0b40: 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68 72 65  <br>.<br>.<a hre
0b50: 66 3d 22 23 74 6c 73 3a 3a 64 69 67 65 73 74 22  f="#tls::digest"
0b60: 3e 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 3c  ><b>tls::digest<
0b70: 2f 62 3e 20 3c 69 3e 74 79 70 65 20 3f 2d 62 69  /b> <i>type ?-bi
0b80: 6e 7c 2d 68 65 78 3f 20 5b 2d 66 69 6c 65 20 66  n|-hex? [-file f
0b90: 69 6c 65 6e 61 6d 65 20 7c 20 3f 2d 64 61 74 61  ilename | ?-data
0ba0: 3f 20 64 61 74 61 5d 3c 2f 69 3e 3c 2f 61 3e 3c  ? data]</i></a><
0bb0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
0bc0: 73 3a 3a 64 69 67 65 73 74 73 22 3e 3c 62 3e 74  s::digests"><b>t
0bd0: 6c 73 3a 3a 64 69 67 65 73 74 73 3c 2f 62 3e 3c  ls::digests</b><
0be0: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
0bf0: 22 23 74 6c 73 3a 3a 6d 64 34 22 3e 3c 62 3e 74  "#tls::md4"><b>t
0c00: 6c 73 3a 3a 6d 64 34 3c 2f 62 3e 20 3c 69 3e 64  ls::md4</b> <i>d
0c10: 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a  ata</i></a><br>.
0c20: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 6d  <a href="#tls::m
0c30: 64 35 22 3e 3c 62 3e 74 6c 73 3a 3a 6d 64 35 3c  d5"><b>tls::md5<
0c40: 2f 62 3e 20 3c 69 3e 64 61 74 61 3c 2f 69 3e 3c  /b> <i>data</i><
0c50: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
0c60: 22 23 74 6c 73 3a 3a 73 68 61 31 22 3e 3c 62 3e  "#tls::sha1"><b>
0c70: 74 6c 73 3a 3a 73 68 61 31 3c 2f 62 3e 20 3c 69  tls::sha1</b> <i
0c80: 3e 64 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72  >data</i></a><br
0c90: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a  >.<a href="#tls:
0ca0: 3a 73 68 61 32 35 36 22 3e 3c 62 3e 74 6c 73 3a  :sha256"><b>tls:
0cb0: 3a 73 68 61 32 35 36 3c 2f 62 3e 20 3c 69 3e 64  :sha256</b> <i>d
0cc0: 61 74 61 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a  ata</i></a><br>.
0cd0: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d  </p>..<h3><a nam
0ce0: 65 3d 22 44 45 53 43 52 49 50 54 49 4f 4e 22 3e  e="DESCRIPTION">
0cf0: 44 45 53 43 52 49 50 54 49 4f 4e 3c 2f 61 3e 3c  DESCRIPTION</a><
0d00: 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 65 78  /h3>..<p>This ex
0d10: 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64 65 73  tension provides
0d20: 20 61 20 67 65 6e 65 72 69 63 20 62 69 6e 64 69   a generic bindi
0d30: 6e 67 20 74 6f 20 3c 61 0a 68 72 65 66 3d 22 68  ng to <a.href="h
0d40: 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73  ttp://www.openss
0d50: 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53 53 4c 3c  l.org/">OpenSSL<
0d60: 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e 67 20 74  /a>, utilizing t
0d70: 68 65 0a 3c 73 74 72 6f 6e 67 3e 54 63 6c 5f 53  he.<strong>Tcl_S
0d80: 74 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f 73 74 72  tackChannel</str
0d90: 6f 6e 67 3e 0a 41 50 49 20 66 6f 72 20 54 63 6c  ong>.API for Tcl
0da0: 20 38 2e 34 20 61 6e 64 20 68 69 67 68 65 72 2e   8.4 and higher.
0db0: 20 54 68 65 20 73 6f 63 6b 65 74 73 20 62 65 68   The sockets beh
0dc0: 61 76 65 20 65 78 61 63 74 6c 79 20 74 68 65 20  ave exactly the 
0dd0: 73 61 6d 65 0a 61 73 20 63 68 61 6e 6e 65 6c 73  same.as channels
0de0: 20 63 72 65 61 74 65 64 20 75 73 69 6e 67 20 54   created using T
0df0: 63 6c 27 73 20 62 75 69 6c 74 2d 69 6e 20 3c 73  cl's built-in <s
0e00: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74  trong>socket</st
0e10: 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 20 77 69  rong>.command wi
0e20: 74 68 20 61 64 64 69 74 69 6f 6e 61 6c 20 6f 70  th additional op
0e30: 74 69 6f 6e 73 20 66 6f 72 20 63 6f 6e 74 72 6f  tions for contro
0e40: 6c 6c 69 6e 67 20 74 68 65 20 53 53 4c 20 73 65  lling the SSL se
0e50: 73 73 69 6f 6e 2e 0a 3c 2f 70 3e 0a 0a 3c 68 33  ssion..</p>..<h3
0e60: 3e 3c 61 20 6e 61 6d 65 3d 22 43 4f 4d 4d 41 4e  ><a name="COMMAN
0e70: 44 53 22 3e 43 4f 4d 4d 41 4e 44 53 3c 2f 61 3e  DS">COMMANDS</a>
0e80: 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 79 70 69 63 61  </h3>..<p>Typica
0e90: 6c 6c 79 20 6f 6e 65 20 77 6f 75 6c 64 20 75 73  lly one would us
0ea0: 65 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 74 6c  e the <strong>tl
0eb0: 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 73 74 72 6f  s::socket </stro
0ec0: 6e 67 3e 63 6f 6d 6d 61 6e 64 0a 77 68 69 63 68  ng>command.which
0ed0: 20 70 72 6f 76 69 64 65 73 20 63 6f 6d 70 61 74   provides compat
0ee0: 69 62 69 6c 69 74 79 20 77 69 74 68 20 74 68 65  ibility with the
0ef0: 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73 74 72   native Tcl <str
0f00: 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f  ong>socket</stro
0f10: 6e 67 3e 0a 63 6f 6d 6d 61 6e 64 2e 20 49 6e 20  ng>.command. In 
0f20: 73 75 63 68 20 63 61 73 65 73 20 3c 73 74 72 6f  such cases <stro
0f30: 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f  ng>tls::import</
0f40: 73 74 72 6f 6e 67 3e 20 73 68 6f 75 6c 64 20 6e  strong> should n
0f50: 6f 74 20 62 65 0a 75 73 65 64 20 64 69 72 65 63  ot be.used direc
0f60: 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c 64 6c 3e 0a 20  tly.</p>..<dl>. 
0f70: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22     <dt><a name="
0f80: 74 6c 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e 74 6c  tls::init"><b>tl
0f90: 73 3a 3a 69 6e 69 74 20 3c 2f 62 3e 3c 69 3e 3f  s::init </b><i>?
0fa0: 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e  options?</i></a>
0fb0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 4f 70  </dt>.    <dd>Op
0fc0: 74 69 6f 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 20  tional function 
0fd0: 74 6f 20 73 65 74 20 74 68 65 20 64 65 66 61 75  to set the defau
0fe0: 6c 74 20 6f 70 74 69 6f 6e 73 20 75 73 65 64 20  lt options used 
0ff0: 62 79 0a 09 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  by..<strong>tls:
1000: 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e  :socket</strong>
1010: 2e 20 49 66 20 79 6f 75 20 63 61 6c 6c 20 3c 73  . If you call <s
1020: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72  trong>tls::impor
1030: 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 64 69 72 65  t</strong>..dire
1040: 63 74 6c 79 20 74 68 69 73 20 72 6f 75 74 69 6e  ctly this routin
1050: 65 20 68 61 73 20 6e 6f 20 65 66 66 65 63 74 2e  e has no effect.
1060: 20 41 6e 79 20 6f 66 20 74 68 65 20 6f 70 74 69   Any of the opti
1070: 6f 6e 73 0a 09 74 68 61 74 20 3c 73 74 72 6f 6e  ons..that <stron
1080: 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73  g>tls::socket</s
1090: 74 72 6f 6e 67 3e 20 61 63 63 65 70 74 73 20 63  trong> accepts c
10a0: 61 6e 20 62 65 20 73 65 74 0a 09 75 73 69 6e 67  an be set..using
10b0: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 74   this command, t
10c0: 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c 64  hough you should
10d0: 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69   limit your opti
10e0: 6f 6e 73 0a 09 74 6f 20 6f 6e 6c 79 20 54 4c 53  ons..to only TLS
10f0: 20 72 65 6c 61 74 65 64 20 6f 6e 65 73 2e 3c 2f   related ones.</
1100: 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73  dd>.    <dt>&nbs
1110: 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e  p;</dt>.    <dt>
1120: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 6f  <a name="tls::so
1130: 63 6b 65 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f  cket"><b>tls::so
1140: 63 6b 65 74 20 3c 2f 62 3e 3c 65 6d 3e 3f 6f 70  cket </b><em>?op
1150: 74 69 6f 6e 73 3f 0a 09 68 6f 73 74 20 70 6f 72  tions?..host por
1160: 74 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  t</em></a></dt>.
1170: 20 20 20 20 3c 64 74 3e 3c 62 3e 74 6c 73 3a 3a      <dt><b>tls::
1180: 73 6f 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e 20 3f  socket</b><em> ?
1190: 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f  -server command?
11a0: 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c   ?options? port<
11b0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  /em></dt>.    <d
11c0: 64 3e 54 68 69 73 20 69 73 20 61 20 68 65 6c 70  d>This is a help
11d0: 65 72 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74  er function that
11e0: 20 75 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e   utilizes the un
11f0: 64 65 72 6c 79 69 6e 67 0a 09 63 6f 6d 6d 61 6e  derlying..comman
1200: 64 73 20 28 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  ds (<strong>tls:
1210: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e  :import</strong>
1220: 29 2e 20 49 74 20 62 65 68 61 76 65 73 0a 09 65  ). It behaves..e
1230: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20  xactly the same 
1240: 61 73 20 74 68 65 20 6e 61 74 69 76 65 20 54 63  as the native Tc
1250: 6c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74  l <strong>socket
1260: 3c 2f 73 74 72 6f 6e 67 3e 0a 09 63 6f 6d 6d 61  </strong>..comma
1270: 6e 64 20 65 78 63 65 70 74 20 74 68 61 74 20 74  nd except that t
1280: 68 65 20 6f 70 74 69 6f 6e 73 20 63 61 6e 20 69  he options can i
1290: 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66 20 74 68  nclude any of th
12a0: 65 0a 09 61 70 70 6c 69 63 61 62 6c 65 20 3c 61  e..applicable <a
12b0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70   href="#tls::imp
12c0: 6f 72 74 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  ort"><strong>tls
12d0: 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e  :import</strong>
12e0: 3c 2f 61 3e 0a 09 6f 70 74 69 6f 6e 73 20 77 69  </a>..options wi
12f0: 74 68 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e 61  th one additiona
1300: 6c 20 6f 70 74 69 6f 6e 3a 0a 3c 62 6c 6f 63 6b  l option:.<block
1310: 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a  quote>.    <dl>.
1320: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 75  .<dt><strong>-au
1330: 74 6f 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74  toservername</st
1340: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f  rong> <em>bool</
1350: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 75  em></dt>..<dd>Au
1360: 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 65 6e 64  tomatically send
1370: 20 74 68 65 20 2d 73 65 72 76 65 72 6e 61 6d 65   the -servername
1380: 20 61 73 20 74 68 65 20 3c 65 6d 3e 68 6f 73 74   as the <em>host
1390: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 0a 09  </em> argument..
13a0: 20 20 20 20 28 64 65 66 61 75 6c 74 20 69 73 20      (default is 
13b0: 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c  <em>false</em>)<
13c0: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c  /dd>.    </dl>.<
13d0: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20  /blockquote>..  
13e0: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
13f0: 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e 74  ls::import"><b>t
1400: 6c 73 3a 3a 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c  ls::import </b><
1410: 69 3e 63 68 61 6e 6e 65 6c 0a 09 3f 6f 70 74 69  i>channel..?opti
1420: 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74  ons?</i></a></dt
1430: 3e 0a 20 20 20 20 3c 64 64 3e 53 53 4c 2d 65 6e  >.    <dd>SSL-en
1440: 61 62 6c 65 20 61 20 72 65 67 75 6c 61 72 20 54  able a regular T
1450: 63 6c 20 63 68 61 6e 6e 65 6c 20 2d 20 69 74 20  cl channel - it 
1460: 6e 65 65 64 20 6e 6f 74 20 62 65 20 61 0a 09 73  need not be a..s
1470: 6f 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20  ocket, but must 
1480: 70 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63  provide bi-direc
1490: 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c 73  tional flow. Als
14a0: 6f 0a 09 73 65 74 74 69 6e 67 20 73 65 73 73 69  o..setting sessi
14b0: 6f 6e 20 70 61 72 61 6d 65 74 65 72 73 20 66 6f  on parameters fo
14c0: 72 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e  r SSL handshake.
14d0: 3c 2f 64 64 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f  </dd>..<blockquo
14e0: 74 65 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64  te>.    <dl>..<d
14f0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 6c 70 6e 3c  t><strong>-alpn<
1500: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73  /strong> <em>lis
1510: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  t</em></dt>..<dd
1520: 3e 4c 69 73 74 20 6f 66 20 70 72 6f 74 6f 63 6f  >List of protoco
1530: 6c 73 20 74 6f 20 6f 66 66 65 72 20 64 75 72 69  ls to offer duri
1540: 6e 67 20 41 70 70 6c 69 63 61 74 69 6f 6e 2d 4c  ng Application-L
1550: 61 79 65 72 0a 09 20 20 20 20 50 72 6f 74 6f 63  ayer..    Protoc
1560: 6f 6c 20 4e 65 67 6f 74 69 61 74 69 6f 6e 20 28  ol Negotiation (
1570: 41 4c 50 4e 29 2e 20 46 6f 72 20 65 78 61 6d 70  ALPN). For examp
1580: 6c 65 3a 20 3c 65 6d 3e 68 32 3c 2f 65 6d 3e 20  le: <em>h2</em> 
1590: 61 6e 64 0a 09 20 20 20 20 3c 65 6d 3e 68 74 74  and..    <em>htt
15a0: 70 2f 31 2e 31 3c 2f 65 6d 3e 2c 20 62 75 74 20  p/1.1</em>, but 
15b0: 6e 6f 74 20 3c 65 6d 3e 68 33 3c 2f 65 6d 3e 20  not <em>h3</em> 
15c0: 6f 72 20 3c 65 6d 3e 71 75 69 63 3c 2f 65 6d 3e  or <em>quic</em>
15d0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
15e0: 6f 6e 67 3e 2d 63 61 64 69 72 3c 2f 73 74 72 6f  ong>-cadir</stro
15f0: 6e 67 3e 20 3c 65 6d 3e 64 69 72 3c 2f 65 6d 3e  ng> <em>dir</em>
1600: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 20 74  </dt>..<dd>Set t
1610: 68 65 20 43 41 20 63 65 72 74 69 66 69 63 61 74  he CA certificat
1620: 65 73 20 70 61 74 68 2e 20 54 68 65 20 64 65 66  es path. The def
1630: 61 75 6c 74 20 64 69 72 65 63 74 6f 72 79 20 69  ault directory i
1640: 73 20 70 6c 61 74 66 6f 72 6d 0a 09 20 20 20 20  s platform..    
1650: 73 70 65 63 69 66 69 63 20 61 6e 64 20 63 61 6e  specific and can
1660: 20 62 65 20 73 65 74 20 61 74 20 63 6f 6d 70 69   be set at compi
1670: 6c 65 20 74 69 6d 65 2e 20 54 68 69 73 20 63 61  le time. This ca
1680: 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65 6e 0a  n be overridden.
1690: 09 20 20 20 20 76 69 61 20 74 68 65 20 3c 62 3e  .    via the <b>
16a0: 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e  SSL_CERT_DIR</b>
16b0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72   environment var
16c0: 69 61 62 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74  iable.</dd>..<dt
16d0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69 6c 65  ><strong>-cafile
16e0: 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69   </strong><em>fi
16f0: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  lename</em></dt>
1700: 0a 09 3c 64 64 3e 53 65 74 20 74 68 65 20 63 65  ..<dd>Set the ce
1710: 72 74 69 66 69 63 61 74 65 20 61 75 74 68 6f 72  rtificate author
1720: 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69  ity (CA) certifi
1730: 63 61 74 65 73 20 66 69 6c 65 2e 20 54 68 65 20  cates file. The 
1740: 64 65 66 61 75 6c 74 0a 09 20 20 20 20 69 73 20  default..    is 
1750: 74 68 65 20 63 65 72 74 2e 70 65 6d 20 66 69 6c  the cert.pem fil
1760: 65 20 69 6e 20 74 68 65 20 4f 70 73 6e 53 53 4c  e in the OpsnSSL
1770: 20 64 69 72 65 63 74 6f 72 79 2e 20 54 68 69 73   directory. This
1780: 20 63 61 6e 20 61 6c 73 6f 20 62 65 0a 09 20 20   can also be..  
1790: 20 20 6f 76 65 72 72 69 64 64 65 6e 20 76 69 61    overridden via
17a0: 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52 54   the <b>SSL_CERT
17b0: 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72 6f  _FILE</b> enviro
17c0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c  nment variable.<
17d0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
17e0: 67 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 73 74 72  g>-certfile</str
17f0: 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d  ong> <em>filenam
1800: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  e</em></dt>..<dd
1810: 3e 53 70 65 63 69 66 79 20 74 68 65 20 66 69 6c  >Specify the fil
1820: 65 6e 61 6d 65 20 77 69 74 68 20 74 68 65 20 63  ename with the c
1830: 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75 73  ertificate to us
1840: 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  e.</dd>..<dt><st
1850: 72 6f 6e 67 3e 2d 63 65 72 74 3c 2f 73 74 72 6f  rong>-cert</stro
1860: 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65  ng> <em>filename
1870: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
1880: 53 70 65 63 69 66 79 20 74 68 65 20 63 6f 6e 74  Specify the cont
1890: 65 6e 74 73 20 6f 66 20 61 20 63 65 72 74 69 66  ents of a certif
18a0: 69 63 61 74 65 20 74 6f 20 75 73 65 2c 20 61 73  icate to use, as
18b0: 20 61 20 44 45 52 0a 09 20 20 20 20 65 6e 63 6f   a DER..    enco
18c0: 64 65 64 20 62 69 6e 61 72 79 20 76 61 6c 75 65  ded binary value
18d0: 20 28 58 2e 35 30 39 20 44 45 52 29 2e 3c 2f 64   (X.509 DER).</d
18e0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
18f0: 2d 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e  -cipher</strong>
1900: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e   <em>string</em>
1910: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20  </dt>..<dd>List 
1920: 6f 66 20 63 69 70 68 65 72 73 20 74 6f 20 75 73  of ciphers to us
1930: 65 2e 20 53 74 72 69 6e 67 20 69 73 20 61 20 63  e. String is a c
1940: 6f 6c 6f 6e 20 28 22 3a 22 29 20 73 65 70 61 72  olon (":") separ
1950: 61 74 65 64 20 6c 69 73 74 0a 09 20 20 20 20 6f  ated list..    o
1960: 66 20 63 69 70 68 65 72 73 20 6f 72 20 63 69 70  f ciphers or cip
1970: 68 65 72 20 73 75 69 74 65 73 2e 20 43 69 70 68  her suites. Ciph
1980: 65 72 20 73 75 69 74 65 73 20 63 61 6e 20 62 65  er suites can be
1990: 20 63 6f 6d 62 69 6e 65 64 0a 09 20 20 20 20 75   combined..    u
19a0: 73 69 6e 67 20 74 68 65 20 3c 62 3e 2b 3c 2f 62  sing the <b>+</b
19b0: 3e 20 63 68 61 72 61 63 74 65 72 2e 20 50 72 65  > character. Pre
19c0: 66 69 78 65 73 20 63 61 6e 20 62 65 20 75 73 65  fixes can be use
19d0: 64 20 74 6f 20 70 65 72 6d 61 6e 65 6e 74 6c 79  d to permanently
19e0: 0a 09 20 20 20 20 72 65 6d 6f 76 65 20 28 22 21  ..    remove ("!
19f0: 22 29 2c 20 64 65 6c 65 74 65 20 28 22 2d 22 29  "), delete ("-")
1a00: 2c 20 6f 72 20 6d 6f 76 65 20 61 20 63 79 70 68  , or move a cyph
1a10: 65 72 20 74 6f 20 74 68 65 20 65 6e 64 20 6f 66  er to the end of
1a20: 0a 09 20 20 20 20 74 68 65 20 6c 69 73 74 20 28  ..    the list (
1a30: 22 2b 22 29 2e 20 4b 65 79 77 6f 72 64 73 20 3c  "+"). Keywords <
1a40: 62 3e 40 53 54 52 45 4e 47 54 48 3c 2f 62 3e 20  b>@STRENGTH</b> 
1a50: 28 73 6f 72 74 20 62 79 20 61 6c 67 6f 72 69 74  (sort by algorit
1a60: 68 6d 0a 09 20 20 20 20 6b 65 79 20 6c 65 6e 67  hm..    key leng
1a70: 74 68 29 2c 20 3c 62 3e 40 53 45 43 4c 45 56 45  th), <b>@SECLEVE
1a80: 4c 3d 3c 2f 62 3e 3c 69 3e 6e 3c 2f 69 3e 20 28  L=</b><i>n</i> (
1a90: 73 65 74 20 73 65 63 75 72 69 74 79 20 6c 65 76  set security lev
1aa0: 65 6c 20 74 6f 0a 09 20 20 20 20 6e 29 2c 20 61  el to..    n), a
1ab0: 6e 64 20 3c 62 3e 44 45 46 41 55 4c 54 3c 2f 62  nd <b>DEFAULT</b
1ac0: 3e 20 28 75 73 65 20 64 65 66 61 75 6c 74 20 63  > (use default c
1ad0: 69 70 68 65 72 20 6c 69 73 74 2c 20 61 74 20 73  ipher list, at s
1ae0: 74 61 72 74 20 6f 6e 6c 79 29 0a 09 20 20 20 20  tart only)..    
1af0: 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 70 65 63  can also be spec
1b00: 69 66 69 65 64 2e 20 53 65 65 20 4f 70 65 6e 53  ified. See OpenS
1b10: 53 4c 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e  SL documentation
1b20: 20 66 6f 72 20 74 68 65 20 66 75 6c 6c 0a 09 20   for the full.. 
1b30: 20 20 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64     list of valid
1b40: 20 76 61 6c 75 65 73 2e 20 28 54 4c 53 20 31 2e   values. (TLS 1.
1b50: 32 20 61 6e 64 20 65 61 72 6c 69 65 72 20 6f 6e  2 and earlier on
1b60: 6c 79 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ly)</dd>..<dt><s
1b70: 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 73 75 69  trong>-ciphersui
1b80: 74 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  tes</strong> <em
1b90: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
1ba0: 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63  >..<dd>List of c
1bb0: 69 70 68 65 72 20 73 75 69 74 65 73 20 74 6f 20  ipher suites to 
1bc0: 75 73 65 2e 20 53 74 72 69 6e 67 20 69 73 20 61  use. String is a
1bd0: 20 63 6f 6c 6f 6e 20 28 22 3a 22 29 0a 09 20 20   colon (":")..  
1be0: 20 20 73 65 70 61 72 61 74 65 64 20 6c 69 73 74    separated list
1bf0: 20 6f 66 20 63 69 70 68 65 72 20 73 75 69 74 65   of cipher suite
1c00: 20 6e 61 6d 65 73 2e 20 28 54 4c 53 20 31 2e 33   names. (TLS 1.3
1c10: 20 6f 6e 6c 79 29 3c 2f 64 64 3e 0a 09 3c 64 74   only)</dd>..<dt
1c20: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e  ><strong>-comman
1c30: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  d</strong> <em>c
1c40: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74  allback</em></dt
1c50: 3e 0a 09 3c 64 64 3e 43 61 6c 6c 62 61 63 6b 20  >..<dd>Callback 
1c60: 74 6f 20 69 6e 76 6f 6b 65 20 61 74 20 73 65 76  to invoke at sev
1c70: 65 72 61 6c 20 70 6f 69 6e 74 73 20 64 75 72 69  eral points duri
1c80: 6e 67 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65  ng the handshake
1c90: 2e 0a 09 20 20 20 20 54 68 69 73 20 69 73 20 75  ...    This is u
1ca0: 73 65 64 20 74 6f 20 70 61 73 73 20 65 72 72 6f  sed to pass erro
1cb0: 72 73 20 61 6e 64 20 74 72 61 63 69 6e 67 20 69  rs and tracing i
1cc0: 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 61 6e 64 0a  nformation, and.
1cd0: 09 20 20 20 20 69 74 20 63 61 6e 20 61 6c 6c 6f  .    it can allo
1ce0: 77 20 54 63 6c 20 73 63 72 69 70 74 73 20 74 6f  w Tcl scripts to
1cf0: 20 70 65 72 66 6f 72 6d 20 74 68 65 69 72 20 6f   perform their o
1d00: 77 6e 20 63 65 72 74 69 66 69 63 61 74 65 0a 09  wn certificate..
1d10: 20 20 20 20 76 61 6c 69 64 61 74 69 6f 6e 20 69      validation i
1d20: 6e 20 70 6c 61 63 65 20 6f 66 20 74 68 65 20 64  n place of the d
1d30: 65 66 61 75 6c 74 20 76 61 6c 69 64 61 74 69 6f  efault validatio
1d40: 6e 20 70 72 6f 76 69 64 65 64 20 62 79 0a 09 20  n provided by.. 
1d50: 20 20 20 4f 70 65 6e 53 53 4c 2e 20 53 65 65 20     OpenSSL. See 
1d60: 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41  <a href="#CALLBA
1d70: 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c  CK OPTIONS">CALL
1d80: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e  BACK OPTIONS</a>
1d90: 0a 09 20 20 20 20 66 6f 72 20 66 75 72 74 68 65  ..    for furthe
1da0: 72 20 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64  r discussion.</d
1db0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
1dc0: 2d 64 68 70 61 72 61 6d 73 20 3c 2f 73 74 72 6f  -dhparams </stro
1dd0: 6e 67 3e 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c  ng><em>filename<
1de0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53  /em></dt>..<dd>S
1df0: 70 65 63 69 66 79 20 74 68 65 20 44 69 66 66 69  pecify the Diffi
1e00: 65 2d 48 65 6c 6c 6d 61 6e 20 70 61 72 61 6d 65  e-Hellman parame
1e10: 74 65 72 73 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a  ters file.</dd>.
1e20: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65  .<dt><strong>-ke
1e30: 79 66 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  yfile</strong> <
1e40: 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e  em>filename</em>
1e50: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69  </dt>..<dd>Speci
1e60: 66 79 20 74 68 65 20 70 72 69 76 61 74 65 20 6b  fy the private k
1e70: 65 79 20 66 69 6c 65 2e 20 28 64 65 66 61 75 6c  ey file. (defaul
1e80: 74 20 69 73 0a 09 20 20 20 20 76 61 6c 75 65 20  t is..    value 
1e90: 6f 66 20 2d 63 65 72 74 66 69 6c 65 29 3c 2f 64  of -certfile)</d
1ea0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
1eb0: 2d 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  -key</strong> <e
1ec0: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c  m>filename</em><
1ed0: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66  /dt>..<dd>Specif
1ee0: 79 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65  y the private ke
1ef0: 79 20 74 6f 20 75 73 65 20 61 73 20 61 20 44 45  y to use as a DE
1f00: 52 20 65 6e 63 6f 64 65 64 20 76 61 6c 75 65 20  R encoded value 
1f10: 28 50 4b 43 53 23 31 20 44 45 52 29 3c 2f 64 64  (PKCS#1 DER)</dd
1f20: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
1f30: 6d 6f 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c  model</strong> <
1f40: 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c  em>channel</em><
1f50: 2f 64 74 3e 0a 09 3c 64 64 3e 46 6f 72 63 65 20  /dt>..<dd>Force 
1f60: 74 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20  this channel to 
1f70: 73 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 3c  share the same <
1f80: 65 6d 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c 5f 43  em><strong>SSL_C
1f90: 54 58 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65 6d 3e  TX</strong></em>
1fa0: 0a 09 20 20 20 20 73 74 72 75 63 74 75 72 65 20  ..    structure 
1fb0: 61 73 20 74 68 65 20 73 70 65 63 69 66 69 65 64  as the specified
1fc0: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d   <em>channel</em
1fd0: 3e 2c 20 61 6e 64 0a 09 20 20 20 20 74 68 65 72  >, and..    ther
1fe0: 65 66 6f 72 65 20 73 68 61 72 65 20 63 61 6c 6c  efore share call
1ff0: 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 3e 0a  backs etc.</dd>.
2000: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61  .<dt><strong>-pa
2010: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20  ssword</strong> 
2020: 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d  <em>callback</em
2030: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6c 6c  ></dt>..<dd>Call
2040: 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 77  back to invoke w
2050: 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65 64  hen OpenSSL need
2060: 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 20 70 61  s to obtain a pa
2070: 73 73 77 6f 72 64 2c 0a 09 20 20 20 20 74 79 70  ssword,..    typ
2080: 69 63 61 6c 6c 79 20 74 6f 20 75 6e 6c 6f 63 6b  ically to unlock
2090: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79   the private key
20a0: 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61 74   of a certificat
20b0: 65 2e 20 54 68 65 0a 09 20 20 20 20 63 61 6c 6c  e. The..    call
20c0: 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75  back should retu
20d0: 72 6e 20 61 20 73 74 72 69 6e 67 20 77 68 69 63  rn a string whic
20e0: 68 20 72 65 70 72 65 73 65 6e 74 73 20 74 68 65  h represents the
20f0: 20 70 61 73 73 77 6f 72 64 0a 09 20 20 20 20 74   password..    t
2100: 6f 20 62 65 20 75 73 65 64 2e 20 53 65 65 20 3c  o be used. See <
2110: 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43  a href="#CALLBAC
2120: 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42  K OPTIONS">CALLB
2130: 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a  ACK OPTIONS</a>.
2140: 09 20 20 20 20 66 6f 72 20 66 75 72 74 68 65 72  .    for further
2150: 20 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64   discussion.</dd
2160: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
2170: 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c 2f  post_handshake</
2180: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
2190: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
21a0: 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 61 6e 64 73  Allow post-hands
21b0: 68 61 6b 65 20 74 69 63 6b 65 74 20 75 70 64 61  hake ticket upda
21c0: 74 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  tes.</dd>..<dt><
21d0: 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73 74 20  strong>-request 
21e0: 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f  </strong><em>boo
21f0: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  l</em></dt>..<dd
2200: 3e 52 65 71 75 65 73 74 20 61 20 63 65 72 74 69  >Request a certi
2210: 66 69 63 61 74 65 20 66 72 6f 6d 20 70 65 65 72  ficate from peer
2220: 20 64 75 72 69 6e 67 20 53 53 4c 20 68 61 6e 64   during SSL hand
2230: 73 68 61 6b 65 2e 0a 09 20 20 20 20 28 64 65 66  shake...    (def
2240: 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65  ault is <em>true
2250: 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74  </em>)</dd>..<dt
2260: 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 69 72  ><strong>-requir
2270: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  e</strong> <em>b
2280: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ool</em></dt>..<
2290: 64 64 3e 52 65 71 75 69 72 65 20 61 20 76 61 6c  dd>Require a val
22a0: 69 64 20 63 65 72 74 69 66 69 63 61 74 65 20 66  id certificate f
22b0: 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e 67 20  rom peer during 
22c0: 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09  SSL handshake...
22d0: 20 20 20 20 49 66 20 74 68 69 73 20 69 73 20 73      If this is s
22e0: 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68 65 6e  et to true, then
22f0: 20 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65 73   <strong>-reques
2300: 74 3c 2f 73 74 72 6f 6e 67 3e 20 6d 75 73 74 0a  t</strong> must.
2310: 09 20 20 20 20 61 6c 73 6f 20 62 65 20 73 65 74  .    also be set
2320: 20 74 6f 20 74 72 75 65 2e 20 28 64 65 66 61 75   to true. (defau
2330: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c  lt is <em>false<
2340: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e  /em>)</dd>..<dt>
2350: 3c 73 74 72 6f 6e 67 3e 2d 73 65 63 75 72 69 74  <strong>-securit
2360: 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20  ylevel</strong> 
2370: 3c 65 6d 3e 69 6e 74 65 67 65 72 3c 2f 65 6d 3e  <em>integer</em>
2380: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 74 20 73  </dt>..<dd>Set s
2390: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 2e 20 4d  ecurity level. M
23a0: 75 73 74 20 62 65 20 30 20 74 6f 20 35 2e 20 54  ust be 0 to 5. T
23b0: 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76 65  he security leve
23c0: 6c 20 61 66 66 65 63 74 73 0a 09 20 20 20 20 63  l affects..    c
23d0: 69 70 68 65 72 20 73 75 69 74 65 20 65 6e 63 72  ipher suite encr
23e0: 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d  yption algorithm
23f0: 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 43 43  s, supported ECC
2400: 20 63 75 72 76 65 73 2c 0a 09 20 20 20 20 73 75   curves,..    su
2410: 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74 75 72  pported signatur
2420: 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 44 48  e algorithms, DH
2430: 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a 65 73   parameter sizes
2440: 2c 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20  , certificate.. 
2450: 20 20 20 6b 65 79 20 73 69 7a 65 73 20 61 6e 64     key sizes and
2460: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72   signature algor
2470: 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66 61 75  ithms. The defau
2480: 6c 74 20 69 73 20 31 2e 0a 09 20 20 20 20 4c 65  lt is 1...    Le
2490: 76 65 6c 20 33 20 61 6e 64 20 68 69 67 68 65 72  vel 3 and higher
24a0: 20 64 69 73 61 62 6c 65 20 73 75 70 70 6f 72 74   disable support
24b0: 20 66 6f 72 20 73 65 73 73 69 6f 6e 20 74 69 63   for session tic
24c0: 6b 65 74 73 20 61 6e 64 20 6f 6e 6c 79 0a 09 20  kets and only.. 
24d0: 20 20 20 61 63 63 65 70 74 20 63 69 70 68 65 72     accept cipher
24e0: 20 73 75 69 74 65 73 20 74 68 61 74 20 70 72 6f   suites that pro
24f0: 76 69 64 65 20 66 6f 72 77 61 72 64 20 73 65 63  vide forward sec
2500: 72 65 63 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  recy.</dd>..<dt>
2510: 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76 65 72 3c  <strong>-server<
2520: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f  /strong> <em>boo
2530: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  l</em></dt>..<dd
2540: 3e 48 61 6e 64 73 68 61 6b 65 20 61 73 20 73 65  >Handshake as se
2550: 72 76 65 72 20 69 66 20 74 72 75 65 2c 20 65 6c  rver if true, el
2560: 73 65 20 68 61 6e 64 73 68 61 6b 65 20 61 73 0a  se handshake as.
2570: 09 20 20 20 20 63 6c 69 65 6e 74 2e 20 28 64 65  .    client. (de
2580: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c  fault is <em>fal
2590: 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c  se</em>)</dd>..<
25a0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72 76  dt><strong>-serv
25b0: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20  ername</strong> 
25c0: 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 3c 2f 64  <em>host</em></d
25d0: 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 79 20  t>..<dd>Specify 
25e0: 73 65 72 76 65 72 20 68 6f 73 74 6e 61 6d 65 2e  server hostname.
25f0: 20 4f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20   Only available 
2600: 69 66 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c  if the OpenSSL l
2610: 69 62 72 61 72 79 0a 09 20 20 20 20 74 68 65 20  ibrary..    the 
2620: 70 61 63 6b 61 67 65 20 69 73 20 6c 69 6e 6b 65  package is linke
2630: 64 20 61 67 61 69 6e 73 74 20 73 75 70 70 6f 72  d against suppor
2640: 74 73 20 74 68 65 20 54 4c 53 20 68 6f 73 74 6e  ts the TLS hostn
2650: 61 6d 65 20 65 78 74 65 6e 73 69 6f 6e 0a 09 20  ame extension.. 
2660: 20 20 20 66 6f 72 20 27 53 65 72 76 65 72 20 4e     for 'Server N
2670: 61 6d 65 20 49 6e 64 69 63 61 74 69 6f 6e 27 20  ame Indication' 
2680: 28 53 4e 49 29 2e 20 55 73 65 20 74 6f 20 6e 61  (SNI). Use to na
2690: 6d 65 20 74 68 65 20 6c 6f 67 69 63 61 6c 20 68  me the logical h
26a0: 6f 73 74 0a 09 20 20 20 20 77 65 20 61 72 65 20  ost..    we are 
26b0: 74 61 6c 6b 69 6e 67 20 74 6f 20 61 6e 64 20 65  talking to and e
26c0: 78 70 65 63 74 69 6e 67 20 61 20 63 65 72 74 69  xpecting a certi
26d0: 66 69 63 61 74 65 20 66 6f 72 2e 3c 2f 64 64 3e  ficate for.</dd>
26e0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73  ..<dt><strong>-s
26f0: 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f 6e  ession_id</stron
2700: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65  g> <em>string</e
2710: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 73  m></dt>..<dd>Ses
2720: 73 69 6f 6e 20 69 64 20 74 6f 20 72 65 73 75 6d  sion id to resum
2730: 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a  e session.</dd>.
2740: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73  .<dt><strong>-ss
2750: 6c 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  l2</strong> <em>
2760: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  bool</em></dt>..
2770: 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f  <dd>Enable use o
2780: 66 20 53 53 4c 20 76 32 2e 20 28 64 65 66 61 75  f SSL v2. (defau
2790: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c  lt is <em>false<
27a0: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e  /em>)</dd>..<dt>
27b0: 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c 33 20 3c 2f  <strong>-ssl3 </
27c0: 73 74 72 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c  strong><em>bool<
27d0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45  /em></dt>..<dd>E
27e0: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c  nable use of SSL
27f0: 20 76 33 2e 20 28 64 65 66 61 75 6c 74 20 69 73   v3. (default is
2800: 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29   <em>false</em>)
2810: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72  </dd>..<dt>-<str
2820: 6f 6e 67 3e 74 6c 73 31 3c 2f 73 74 72 6f 6e 67  ong>tls1</strong
2830: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  > <em>bool</em><
2840: 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65  /dt>..<dd>Enable
2850: 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 20   use of TLS v1. 
2860: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
2870: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  true</em>)</dd>.
2880: 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c  .<dt>-<strong>tl
2890: 73 31 2e 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  s1.1</strong> <e
28a0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>bool</em></dt>
28b0: 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65  ..<dd>Enable use
28c0: 20 6f 66 20 54 4c 53 20 76 31 2e 31 20 28 64 65   of TLS v1.1 (de
28d0: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75  fault is <em>tru
28e0: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64  e</em>)</dd>..<d
28f0: 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e  t>-<strong>tls1.
2900: 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  2</strong> <em>b
2910: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ool</em></dt>..<
2920: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66  dd>Enable use of
2930: 20 54 4c 53 20 76 31 2e 32 20 28 64 65 66 61 75   TLS v1.2 (defau
2940: 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f  lt is <em>true</
2950: 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d  em>)</dd>..<dt>-
2960: 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 33 3c 2f  <strong>tls1.3</
2970: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
2980: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
2990: 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c  Enable use of TL
29a0: 53 20 76 31 2e 33 20 28 64 65 66 61 75 6c 74 20  S v1.3 (default 
29b0: 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e  is <em>true</em>
29c0: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  )</dd>..<dt><str
29d0: 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d  ong>-validatecom
29e0: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  mand</strong> <e
29f0: 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c  m>callback</em><
2a00: 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6c 6c 62 61  /dt>..<dd>Callba
2a10: 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20 74 6f 20  ck to invoke to 
2a20: 76 65 72 69 66 79 20 6f 72 20 76 61 6c 69 64 61  verify or valida
2a30: 74 65 20 70 72 6f 74 6f 63 6f 6c 20 63 6f 6e 66  te protocol conf
2a40: 69 67 0a 09 20 20 20 20 70 61 72 61 6d 65 74 65  ig..    paramete
2a50: 72 73 20 64 75 72 69 6e 67 20 74 68 65 20 70 72  rs during the pr
2a60: 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61 74 69  otocol negotiati
2a70: 6f 6e 20 70 68 61 73 65 2e 20 53 65 65 0a 09 20  on phase. See.. 
2a80: 20 20 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c     <a href="#CAL
2a90: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43  LBACK OPTIONS">C
2aa0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c  ALLBACK OPTIONS<
2ab0: 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20 66 75 72  /a>..    for fur
2ac0: 74 68 65 72 20 64 69 73 63 75 73 73 69 6f 6e 2e  ther discussion.
2ad0: 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a  </dd>.    </dl>.
2ae0: 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20  </blockquote>.. 
2af0: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22     <dt><a name="
2b00: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c  tls::unimport"><
2b10: 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20  b>tls::unimport 
2b20: 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f  </b><i>channel</
2b30: 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  i></a></dt>.    
2b40: 3c 64 64 3e 50 72 6f 76 69 64 65 64 20 66 6f 72  <dd>Provided for
2b50: 20 73 79 6d 6d 65 74 72 79 20 74 6f 20 3c 73 74   symmetry to <st
2b60: 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74  rong>tls::import
2b70: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 74 68 69 73 0a  </strong>, this.
2b80: 20 20 20 20 20 20 75 6e 73 74 61 63 6b 73 20 74        unstacks t
2b90: 68 65 20 53 53 4c 2d 65 6e 61 62 6c 69 6e 67 20  he SSL-enabling 
2ba0: 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 63 6c  of a regular Tcl
2bb0: 20 63 68 61 6e 6e 65 6c 2e 20 20 41 6e 20 65 72   channel.  An er
2bc0: 72 6f 72 0a 20 20 20 20 20 20 69 73 20 74 68 72  ror.      is thr
2bd0: 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e 6f  own if TLS is no
2be0: 74 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b 65  t the top stacke
2bf0: 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c  d channel type.<
2c00: 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62  /dd>.    <dt>&nb
2c10: 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74  sp;</dt>.    <dt
2c20: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68  ><a name="tls::h
2c30: 61 6e 64 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e  andshake"><stron
2c40: 67 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65  g>tls::handshake
2c50: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68  </strong> <em>ch
2c60: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f  annel</em></a></
2c70: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63  dt>.    <dd>Forc
2c80: 65 73 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20  es handshake to 
2c90: 74 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 20  take place, and 
2ca0: 72 65 74 75 72 6e 73 20 30 20 69 66 0a 09 68 61  returns 0 if..ha
2cb0: 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c 6c  ndshake is still
2cc0: 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e 6f   in progress (no
2cd0: 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20  n-blocking), or 
2ce0: 31 20 69 66 0a 09 74 68 65 20 68 61 6e 64 73 68  1 if..the handsh
2cf0: 61 6b 65 20 77 61 73 20 73 75 63 63 65 73 73 66  ake was successf
2d00: 75 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73  ul. If the hands
2d10: 68 61 6b 65 20 66 61 69 6c 65 64 0a 09 74 68 69  hake failed..thi
2d20: 73 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 74  s routine will t
2d30: 68 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e 3c 2f  hrow an error.</
2d40: 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73  dd>.    <dt>&nbs
2d50: 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e  p;</dt>.    <dt>
2d60: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 74  <a name="tls::st
2d70: 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c  atus"><strong>tl
2d80: 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e  s::status</stron
2d90: 67 3e 0a 20 20 20 20 3c 65 6d 3e 3f 2d 6c 6f 63  g>.    <em>?-loc
2da0: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  al? channel</em>
2db0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
2dc0: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75  d>Returns the cu
2dd0: 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f 66 20  rrent status of 
2de0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
2df0: 66 6f 72 20 61 6e 20 53 53 4c 0a 09 63 68 61 6e  for an SSL..chan
2e00: 6e 65 6c 2e 20 54 68 65 20 72 65 73 75 6c 74 20  nel. The result 
2e10: 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b 65 79  is a list of key
2e20: 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64 65 73  -value pairs des
2e30: 63 72 69 62 69 6e 67 0a 09 74 68 65 20 63 65 72  cribing..the cer
2e40: 74 69 66 69 63 61 74 65 2e 20 49 66 20 74 68 65  tificate. If the
2e50: 20 72 65 73 75 6c 74 20 69 73 20 61 6e 20 65 6d   result is an em
2e60: 70 74 79 20 6c 69 73 74 20 74 68 65 6e 20 74 68  pty list then th
2e70: 65 0a 09 53 53 4c 20 68 61 6e 64 73 68 61 6b 65  e..SSL handshake
2e80: 20 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d   has not yet com
2e90: 70 6c 65 74 65 64 2e 20 49 66 20 3c 65 6d 3e 2d  pleted. If <em>-
2ea0: 6c 6f 63 61 6c 3c 2f 65 6d 3e 20 69 73 0a 09 73  local</em> is..s
2eb0: 70 65 63 69 66 69 65 64 2c 20 74 68 65 6e 20 74  pecified, then t
2ec0: 68 65 20 6c 6f 63 61 6c 20 63 65 72 74 69 66 69  he local certifi
2ed0: 63 61 74 65 20 69 73 20 75 73 65 64 2e 3c 2f 64  cate is used.</d
2ee0: 64 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  d>.<blockquote>.
2ef0: 09 3c 62 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f  .<b>SSL Status</
2f00: 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74  b>.    <dl>..<dt
2f10: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73  ><strong>alpn</s
2f20: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f  trong> <em>proto
2f30: 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  col</em></dt>..<
2f40: 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20  dd>The protocol 
2f50: 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41  selected after A
2f60: 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72  pplication-Layer
2f70: 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 4e   Protocol..    N
2f80: 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e  egotiation (ALPN
2f90: 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  ).</dd>..<dt><st
2fa0: 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72  rong>cipher</str
2fb0: 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c  ong> <em>cipher<
2fc0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54  /em></dt>..<dd>T
2fd0: 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 65  he current ciphe
2fe0: 72 20 69 6e 20 75 73 65 20 62 65 74 77 65 65 6e  r in use between
2ff0: 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e 64 0a   the client and.
3000: 09 20 20 20 20 73 65 72 76 65 72 20 63 68 61 6e  .    server chan
3010: 6e 65 6c 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  nels.</dd>..<dt>
3020: 3c 73 74 72 6f 6e 67 3e 70 65 65 72 6e 61 6d 65  <strong>peername
3030: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61  </strong> <em>na
3040: 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  me</em></dt>..<d
3050: 64 3e 54 68 65 20 70 65 65 72 6e 61 6d 65 20 66  d>The peername f
3060: 72 6f 6d 20 74 68 65 20 63 65 72 74 69 66 69 63  rom the certific
3070: 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ate.</dd>..<dt><
3080: 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c  strong>protocol<
3090: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72  /strong> <em>ver
30a0: 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  sion</em></dt>..
30b0: 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c  <dd>The protocol
30c0: 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f   version used fo
30d0: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  r the connection
30e0: 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c  :..    SSL2, SSL
30f0: 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c  3, TLS1, TLS1.1,
3100: 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c   TLS1.2, TLS1.3,
3110: 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64   or unknown.</dd
3120: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
3130: 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  bits</strong> <e
3140: 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  m>n</em></dt>..<
3150: 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66  dd>The number of
3160: 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20 74   bits used for t
3170: 68 65 20 73 65 73 73 69 6f 6e 20 6b 65 79 2e 3c  he session key.<
3180: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
3190: 67 3e 73 69 67 6e 61 74 75 72 65 48 61 73 68 41  g>signatureHashA
31a0: 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67  lgorithm</strong
31b0: 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c  > <em>algorithm<
31c0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54  /em></dt>..<dd>T
31d0: 68 65 20 73 69 67 6e 61 74 75 72 65 20 68 61 73  he signature has
31e0: 68 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64 64  h algorithm.</dd
31f0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
3200: 69 67 6e 61 74 75 72 65 54 79 70 65 3c 2f 73 74  ignatureType</st
3210: 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79 70 65 3c 2f  rong> <em>type</
3220: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
3230: 65 20 73 69 67 6e 61 74 75 72 65 20 74 79 70 65  e signature type
3240: 20 76 61 6c 75 65 2e 3c 2f 64 64 3e 0a 09 3c 64   value.</dd>..<d
3250: 74 3e 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79  t><strong>verify
3260: 44 65 70 74 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c  Depth</strong> <
3270: 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  em>n</em></dt>..
3280: 3c 64 64 3e 4d 61 78 69 6d 75 6d 20 64 65 70 74  <dd>Maximum dept
3290: 68 20 66 6f 72 20 74 68 65 20 63 65 72 74 69 66  h for the certif
32a0: 69 63 61 74 65 20 63 68 61 69 6e 20 76 65 72 69  icate chain veri
32b0: 66 69 63 61 74 69 6f 6e 2e 0a 09 20 20 20 20 44  fication...    D
32c0: 65 66 61 75 6c 74 20 69 73 20 2d 31 2c 20 74 6f  efault is -1, to
32d0: 20 63 68 65 63 6b 20 61 6c 6c 2e 3c 2f 64 64 3e   check all.</dd>
32e0: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65  ..<dt><strong>ve
32f0: 72 69 66 79 4d 6f 64 65 3c 2f 73 74 72 6f 6e 67  rifyMode</strong
3300: 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c  > <em>list</em><
3310: 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f  /dt>..<dd>List o
3320: 66 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65  f certificate ve
3330: 72 69 66 69 63 61 74 69 6f 6e 20 6d 6f 64 65 73  rification modes
3340: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
3350: 6f 6e 67 3e 76 65 72 69 66 79 52 65 73 75 6c 74  ong>verifyResult
3360: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 72 65  </strong> <em>re
3370: 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  sult</em></dt>..
3380: 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20  <dd>Certificate 
3390: 76 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73  verification res
33a0: 75 6c 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ult.</dd>..<dt><
33b0: 73 74 72 6f 6e 67 3e 63 61 5f 6e 61 6d 65 73 3c  strong>ca_names<
33c0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73  /strong> <em>lis
33d0: 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  t</em></dt>..<dd
33e0: 3e 4c 69 73 74 20 6f 66 20 74 68 65 20 43 65 72  >List of the Cer
33f0: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69  tificate Authori
3400: 74 69 65 73 20 75 73 65 64 20 74 6f 20 63 72 65  ties used to cre
3410: 61 74 65 20 74 68 65 20 63 65 72 74 69 66 69 63  ate the certific
3420: 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f  ate.</dd>.    </
3430: 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65  dl>.</blockquote
3440: 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 09  >.<blockquote>..
3450: 3c 62 3e 43 65 72 74 69 66 69 63 61 74 65 20 53  <b>Certificate S
3460: 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64  tatus</b>.    <d
3470: 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  l>..<dt><strong>
3480: 61 6c 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  all</strong> <em
3490: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
34a0: 3e 0a 09 3c 64 64 3e 44 75 6d 70 20 6f 66 20 61  >..<dd>Dump of a
34b0: 6c 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69  ll certificate i
34c0: 6e 66 6f 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e  nfo.</dd>...<dt>
34d0: 3c 73 74 72 6f 6e 67 3e 76 65 72 73 69 6f 6e 3c  <strong>version<
34e0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 61 6c  /strong> <em>val
34f0: 75 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ue</em></dt>..<d
3500: 64 3e 54 68 65 20 63 65 72 74 69 66 69 63 61 74  d>The certificat
3510: 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 64 64 3e 0a  e version.</dd>.
3520: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72  .<dt><strong>ser
3530: 69 61 6c 4e 75 6d 62 65 72 3c 2f 73 74 72 6f 6e  ialNumber</stron
3540: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64  g> <em>n</em></d
3550: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 65 72 69  t>..<dd>The seri
3560: 61 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65  al number of the
3570: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20   certificate as 
3580: 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e  hex string.</dd>
3590: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69  ..<dt><strong>si
35a0: 67 6e 61 74 75 72 65 3c 2f 73 74 72 6f 6e 67 3e  gnature</strong>
35b0: 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f   <em>algorithm</
35c0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69  em></dt>..<dd>Ci
35d0: 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20 75  pher algorithm u
35e0: 73 65 64 20 66 6f 72 20 63 65 72 74 69 66 69 63  sed for certific
35f0: 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f  ate signature.</
3600: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
3610: 3e 69 73 73 75 65 72 3c 2f 73 74 72 6f 6e 67 3e  >issuer</strong>
3620: 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74   <em>dn</em></dt
3630: 3e 0a 09 3c 64 64 3e 54 68 65 20 64 69 73 74 69  >..<dd>The disti
3640: 6e 67 75 69 73 68 65 64 20 6e 61 6d 65 20 28 44  nguished name (D
3650: 4e 29 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  N) of the certif
3660: 69 63 61 74 65 20 69 73 73 75 65 72 2e 3c 2f 64  icate issuer.</d
3670: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3680: 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72 6f 6e  notBefore</stron
3690: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e  g> <em>date</em>
36a0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 62  </dt>..<dd>The b
36b0: 65 67 69 6e 20 64 61 74 65 20 66 6f 72 20 74 68  egin date for th
36c0: 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68  e validity of th
36d0: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f  e certificate.</
36e0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
36f0: 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72 6f 6e  >notAfter</stron
3700: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e  g> <em>date</em>
3710: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 65  </dt>..<dd>The e
3720: 78 70 69 72 61 74 69 6f 6e 20 64 61 74 65 20 66  xpiration date f
3730: 6f 72 20 74 68 65 20 63 65 72 74 69 66 69 63 61  or the certifica
3740: 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  te.</dd>..<dt><s
3750: 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 3c 2f 73  trong>subject</s
3760: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65  trong> <em>dn</e
3770: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
3780: 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20 6e   distinguished n
3790: 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65 20  ame (DN) of the 
37a0: 63 65 72 74 69 66 69 63 61 74 65 20 73 75 62 6a  certificate subj
37b0: 65 63 74 2e 0a 09 20 20 20 20 46 69 65 6c 64 73  ect...    Fields
37c0: 20 69 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d 6f 6e   include: Common
37d0: 20 4e 61 6d 65 20 28 43 4e 29 2c 20 4f 72 67 61   Name (CN), Orga
37e0: 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c 20 4c 6f  nization (O), Lo
37f0: 63 61 6c 69 74 79 0a 09 20 20 20 20 6f 72 20 43  cality..    or C
3800: 69 74 79 20 28 4c 29 2c 20 53 74 61 74 65 20 6f  ity (L), State o
3810: 72 20 50 72 6f 76 69 6e 63 65 20 28 53 29 2c 20  r Province (S), 
3820: 61 6e 64 20 43 6f 75 6e 74 72 79 20 4e 61 6d 65  and Country Name
3830: 20 28 43 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   (C).</dd>..<dt>
3840: 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 55 6e  <strong>issuerUn
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 69 73  /dt>..<dd>The is
3880: 73 75 65 72 20 75 6e 69 71 75 65 20 69 64 2e 3c  suer unique id.<
3890: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
38a0: 67 3e 73 75 62 6a 65 63 74 55 6e 69 71 75 65 49  g>subjectUniqueI
38b0: 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73  D</strong> <em>s
38c0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
38d0: 09 3c 64 64 3e 54 68 65 20 73 75 62 6a 65 63 74  .<dd>The subject
38e0: 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 64 64 3e   unique id.</dd>
38f0: 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e  ...<dt><strong>n
3900: 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73  um_extensions</s
3910: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d  trong> <em>n</em
3920: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 6d 62  ></dt>..<dd>Numb
3930: 65 72 20 6f 66 20 63 65 72 74 69 66 69 63 61 74  er of certificat
3940: 65 20 65 78 74 65 6e 73 69 6f 6e 73 2e 3c 2f 64  e extensions.</d
3950: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3960: 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 74 72 6f  extensions</stro
3970: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d  ng> <em>list</em
3980: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74  ></dt>..<dd>List
3990: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20   of certificate 
39a0: 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e  extension names.
39b0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
39c0: 6e 67 3e 61 75 74 68 6f 72 69 74 79 4b 65 79 49  ng>authorityKeyI
39d0: 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e  dentifier</stron
39e0: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65  g> <em>string</e
39f0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 41 4b  m></dt>..<dd>(AK
3a00: 49 29 20 4b 65 79 20 69 64 65 6e 74 69 66 69 65  I) Key identifie
3a10: 72 20 6f 66 20 74 68 65 20 49 73 73 75 69 6e 67  r of the Issuing
3a20: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 20   CA certificate 
3a30: 74 68 61 74 20 73 69 67 6e 65 64 0a 09 20 20 20  that signed..   
3a40: 20 74 68 65 20 53 53 4c 20 63 65 72 74 69 66 69   the SSL certifi
3a50: 63 61 74 65 20 61 73 20 68 65 78 20 73 74 72 69  cate as hex stri
3a60: 6e 67 2e 20 54 68 69 73 20 76 61 6c 75 65 20 6d  ng. This value m
3a70: 61 74 63 68 65 73 20 74 68 65 20 53 4b 49 0a 09  atches the SKI..
3a80: 20 20 20 20 76 61 6c 75 65 20 6f 66 20 74 68 65      value of the
3a90: 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20 43 41   Intermediate CA
3aa0: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
3ab0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3ac0: 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e 74 69  subjectKeyIdenti
3ad0: 66 69 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  fier</strong> <e
3ae0: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64  m>string</em></d
3af0: 74 3e 0a 09 3c 64 64 3e 28 53 4b 49 29 20 48 61  t>..<dd>(SKI) Ha
3b00: 73 68 20 6f 66 20 74 68 65 20 70 75 62 6c 69 63  sh of the public
3b10: 20 6b 65 79 20 69 6e 73 69 64 65 20 74 68 65 20   key inside the 
3b20: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68  certificate as h
3b30: 65 78 0a 09 20 20 20 73 74 72 69 6e 67 2e 20 55  ex..   string. U
3b40: 73 65 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20  sed to identify 
3b50: 63 65 72 74 69 66 69 63 61 74 65 73 20 74 68 61  certificates tha
3b60: 74 20 63 6f 6e 74 61 69 6e 20 61 20 70 61 72 74  t contain a part
3b70: 69 63 75 6c 61 72 0a 09 20 20 20 70 75 62 6c 69  icular..   publi
3b80: 63 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74  c key.</dd>..<dt
3b90: 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74  ><strong>subject
3ba0: 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e  AltName</strong>
3bb0: 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f   <em>list</em></
3bc0: 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66  dt>..<dd>List of
3bd0: 20 61 6c 6c 20 6f 66 20 74 68 65 20 61 6c 74 65   all of the alte
3be0: 72 6e 61 74 69 76 65 20 64 6f 6d 61 69 6e 20 6e  rnative domain n
3bf0: 61 6d 65 73 2c 20 73 75 62 20 64 6f 6d 61 69 6e  ames, sub domain
3c00: 73 2c 0a 09 20 20 20 20 61 6e 64 20 49 50 20 61  s,..    and IP a
3c10: 64 64 72 65 73 73 65 73 20 74 68 61 74 20 61 72  ddresses that ar
3c20: 65 20 73 65 63 75 72 65 64 20 62 79 20 74 68 65  e secured by the
3c30: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
3c40: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3c50: 6f 63 73 70 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  ocsp</strong> <e
3c60: 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>list</em></dt>
3c70: 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 61 6c  ..<dd>List of al
3c80: 6c 20 4f 6e 6c 69 6e 65 20 43 65 72 74 69 66 69  l Online Certifi
3c90: 63 61 74 65 20 53 74 61 74 75 73 20 50 72 6f 74  cate Status Prot
3ca0: 6f 63 6f 6c 20 28 4f 43 53 50 29 20 55 52 4c 73  ocol (OCSP) URLs
3cb0: 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74  .</dd>...<dt><st
3cc0: 72 6f 6e 67 3e 63 65 72 74 69 66 69 63 61 74 65  rong>certificate
3cd0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 65  </strong> <em>ce
3ce0: 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  rt</em></dt>..<d
3cf0: 64 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65  d>The PEM encode
3d00: 64 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f  d certificate.</
3d10: 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  dd>...<dt><stron
3d20: 67 3e 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72  g>signatureAlgor
3d30: 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  ithm</strong> <e
3d40: 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e  m>algorithm</em>
3d50: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 70 68 65  </dt>..<dd>Ciphe
3d60: 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64  r algorithm used
3d70: 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65   for certificate
3d80: 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e   signature.</dd>
3d90: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69  ..<dt><strong>si
3da0: 67 6e 61 74 75 72 65 56 61 6c 75 65 3c 2f 73 74  gnatureValue</st
3db0: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67  rong> <em>string
3dc0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
3dd0: 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e  Certificate sign
3de0: 61 74 75 72 65 20 61 73 20 68 65 78 20 73 74 72  ature as hex str
3df0: 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ing.</dd>..<dt><
3e00: 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65  strong>signature
3e10: 44 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20  Digest</strong> 
3e20: 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e  <em>version</em>
3e30: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69  </dt>..<dd>Certi
3e40: 66 69 63 61 74 65 20 73 69 67 6e 69 6e 67 20 64  ficate signing d
3e50: 69 67 65 73 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74  igest.</dd>..<dt
3e60: 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 63 4b  ><strong>publicK
3e70: 65 79 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72  eyAlgorithm</str
3e80: 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74  ong> <em>algorit
3e90: 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  hm</em></dt>..<d
3ea0: 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69  d>Certificate si
3eb0: 67 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b  gnature public k
3ec0: 65 79 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64  ey algorithm.</d
3ed0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3ee0: 70 75 62 6c 69 63 4b 65 79 3c 2f 73 74 72 6f 6e  publicKey</stron
3ef0: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65  g> <em>string</e
3f00: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72  m></dt>..<dd>Cer
3f10: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
3f20: 72 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 73  re public key as
3f30: 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64   hex string.</dd
3f40: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62  >..<dt><strong>b
3f50: 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  its</strong> <em
3f60: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  >n</em></dt>..<d
3f70: 64 3e 4e 75 6d 62 65 72 20 6f 66 20 62 69 74 73  d>Number of bits
3f80: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66   used for certif
3f90: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20  icate signature 
3fa0: 6b 65 79 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  key</dd>..<dt><s
3fb0: 74 72 6f 6e 67 3e 73 65 6c 66 5f 73 69 67 6e 65  trong>self_signe
3fc0: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  d</strong> <em>b
3fd0: 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e  oolean</em></dt>
3fe0: 0a 09 3c 64 64 3e 49 73 20 63 65 72 74 69 66 69  ..<dd>Is certifi
3ff0: 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 73  cate signature s
4000: 65 6c 66 20 73 69 67 6e 65 64 2e 3c 2f 64 64 3e  elf signed.</dd>
4010: 0a 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  ...<dt><strong>s
4020: 68 61 31 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67  ha1_hash</strong
4030: 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c  > <em>hash</em><
4040: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 48  /dt>..<dd>The SH
4050: 41 31 20 68 61 73 68 20 6f 66 20 74 68 65 20 63  A1 hash of the c
4060: 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68 65  ertificate as he
4070: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09  x string.</dd>..
4080: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 68 61 32  <dt><strong>sha2
4090: 35 36 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67 3e  56_hash</strong>
40a0: 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c 2f   <em>hash</em></
40b0: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 53 48 41  dt>..<dd>The SHA
40c0: 32 35 36 20 68 61 73 68 20 6f 66 20 74 68 65 20  256 hash of the 
40d0: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68  certificate as h
40e0: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a  ex string.</dd>.
40f0: 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63      </dl>.</bloc
4100: 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74  kquote>..    <dt
4110: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63  ><a name="tls::c
4120: 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 73 74 72 6f  onnection"><stro
4130: 6e 67 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69  ng>tls::connecti
4140: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20  on</strong>.    
4150: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  <em>channel</em>
4160: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
4170: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75  d>Returns the cu
4180: 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e  rrent connection
4190: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53   status of an SS
41a0: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 0a 09  L channel. The..
41b0: 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74  result is a list
41c0: 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61   of key-value pa
41d0: 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74  irs describing t
41e0: 68 65 0a 09 63 6f 6e 6e 65 63 74 65 64 20 70 65  he..connected pe
41f0: 65 72 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f 63 6b 71  er.</dd>.<blockq
4200: 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c 20 53 74  uote>..<b>SSL St
4210: 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c  atus</b>.    <dl
4220: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
4230: 74 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  tate</strong> <e
4240: 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74  m>state</em></dt
4250: 3e 0a 09 3c 64 64 3e 53 74 61 74 65 20 6f 66 20  >..<dd>State of 
4260: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c  the connection.<
4270: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4280: 67 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74  g>servername</st
4290: 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f  rong> <em>name</
42a0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
42b0: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f  e name of the co
42c0: 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65  nnected to serve
42d0: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  r.</dd>..<dt><st
42e0: 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 73  rong>protocol</s
42f0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69  trong> <em>versi
4300: 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  on</em></dt>..<d
4310: 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76  d>The protocol v
4320: 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f 72 20  ersion used for 
4330: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 0a  the connection:.
4340: 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c 33 2c  .    SSL2, SSL3,
4350: 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54   TLS1, TLS1.1, T
4360: 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f  LS1.2, TLS1.3, o
4370: 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a  r unknown.</dd>.
4380: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 65 6e  .<dt><strong>ren
4390: 65 67 6f 74 69 61 74 69 6f 6e 3c 2f 73 74 72 6f  egotiation</stro
43a0: 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c  ng> <em>boolean<
43b0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57  /em></dt>..<dd>W
43c0: 68 65 74 68 65 72 20 70 72 6f 74 6f 63 6f 6c 20  hether protocol 
43d0: 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 20 69 73  renegotiation is
43e0: 20 73 75 70 70 6f 72 74 65 64 20 6f 72 20 6e 6f   supported or no
43f0: 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  t.</dd>..<dt><st
4400: 72 6f 6e 67 3e 73 65 63 75 72 69 74 79 6c 65 76  rong>securitylev
4410: 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  el</strong> <em>
4420: 6c 65 76 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  level</em></dt>.
4430: 09 3c 64 64 3e 54 68 65 20 73 65 63 75 72 69 74  .<dd>The securit
4440: 79 20 6c 65 76 65 6c 20 75 73 65 64 20 66 6f 72  y level used for
4450: 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 63 69   selection of ci
4460: 70 68 65 72 73 2c 20 6b 65 79 20 73 69 7a 65 2c  phers, key size,
4470: 20 65 74 63 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   etc.</dd>..<dt>
4480: 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f  <strong>session_
4490: 72 65 75 73 65 64 3c 2f 73 74 72 6f 6e 67 3e 20  reused</strong> 
44a0: 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e  <em>boolean</em>
44b0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68  </dt>..<dd>Wheth
44c0: 65 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 68  er the session h
44d0: 61 73 20 62 65 65 6e 20 72 65 75 73 65 64 20 6f  as been reused o
44e0: 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74  r not.</dd>..<dt
44f0: 3e 3c 73 74 72 6f 6e 67 3e 69 73 5f 73 65 72 76  ><strong>is_serv
4500: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  er</strong> <em>
4510: 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74  boolean</em></dt
4520: 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20 74  >..<dd>Whether t
4530: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73  he connection is
4540: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61   configured as a
4550: 20 73 65 72 76 65 72 20 28 31 29 20 6f 72 20 63   server (1) or c
4560: 6c 69 65 6e 74 20 28 30 29 2e 3c 2f 64 64 3e 0a  lient (0).</dd>.
4570: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 6f 6d  .<dt><strong>com
4580: 70 72 65 73 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67  pression</strong
4590: 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c  > <em>mode</em><
45a0: 2f 64 74 3e 0a 09 3c 64 64 3e 43 6f 6d 70 72 65  /dt>..<dd>Compre
45b0: 73 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64  ssion method.</d
45c0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
45d0: 65 78 70 61 6e 73 69 6f 6e 3c 2f 73 74 72 6f 6e  expansion</stron
45e0: 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e  g> <em>mode</em>
45f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 78 70 61 6e  </dt>..<dd>Expan
4600: 73 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 64  sion method.</dd
4610: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c  >.    </dl>.</bl
4620: 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b  ockquote>.<block
4630: 71 75 6f 74 65 3e 0a 09 3c 62 3e 43 69 70 68 65  quote>..<b>Ciphe
4640: 72 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c  r Info</b>.    <
4650: 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dl>..<dt><strong
4660: 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e  >cipher</strong>
4670: 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e   <em>cipher</em>
4680: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63  </dt>..<dd>The c
4690: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e  urrent cipher in
46a0: 20 75 73 65 20 66 6f 72 20 74 68 65 20 63 6f 6e   use for the con
46b0: 6e 65 63 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c  nection.</dd>..<
46c0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 6e 64  dt><strong>stand
46d0: 61 72 64 5f 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67  ard_name</strong
46e0: 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c  > <em>name</em><
46f0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 74  /dt>..<dd>The st
4700: 61 6e 64 61 72 64 20 52 46 43 20 6e 61 6d 65 20  andard RFC name 
4710: 6f 66 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a  of cipher.</dd>.
4720: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74  .<dt><strong>bit
4730: 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e  s</strong> <em>n
4740: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4750: 54 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 72  The number of pr
4760: 6f 63 65 73 73 65 64 20 62 69 74 73 20 75 73 65  ocessed bits use
4770: 64 20 66 6f 72 20 63 69 70 68 65 72 2e 3c 2f 64  d for cipher.</d
4780: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
4790: 73 65 63 72 65 74 5f 62 69 74 73 3c 2f 73 74 72  secret_bits</str
47a0: 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c  ong> <em>n</em><
47b0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75  /dt>..<dd>The nu
47c0: 6d 62 65 72 20 6f 66 20 73 65 63 72 65 74 20 62  mber of secret b
47d0: 69 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70  its used for cip
47e0: 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  her.</dd>..<dt><
47f0: 73 74 72 6f 6e 67 3e 6d 69 6e 5f 76 65 72 73 69  strong>min_versi
4800: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  on</strong> <em>
4810: 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74  version</em></dt
4820: 3e 0a 09 3c 64 64 3e 54 68 65 20 6d 69 6e 69 6d  >..<dd>The minim
4830: 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  um protocol vers
4840: 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 72 2e 3c  ion for cipher.<
4850: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4860: 67 3e 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  g>id</strong> <e
4870: 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  m>id</em></dt>..
4880: 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20  <dd>The OpenSSL 
4890: 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 3e 0a  cipher id.</dd>.
48a0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 64 65 73  .<dt><strong>des
48b0: 63 72 69 70 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67  cription</strong
48c0: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d  > <em>string</em
48d0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 20 74 65  ></dt>..<dd>A te
48e0: 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f  xt description o
48f0: 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c 2f 64  f the cipher.</d
4900: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62  d>.    </dl>.</b
4910: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63  lockquote>.<bloc
4920: 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 65 73 73  kquote>..<b>Sess
4930: 69 6f 6e 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20  ion Info</b>.   
4940: 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f   <dl>..<dt><stro
4950: 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e  ng>alpn</strong>
4960: 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65   <em>protocol</e
4970: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
4980: 20 70 72 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74   protocol select
4990: 65 64 20 61 66 74 65 72 20 41 70 70 6c 69 63 61  ed after Applica
49a0: 74 69 6f 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f  tion-Layer Proto
49b0: 63 6f 6c 0a 09 20 20 20 20 4e 65 67 6f 74 69 61  col..    Negotia
49c0: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64  tion (ALPN).</dd
49d0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72  >..<dt><strong>r
49e0: 65 73 75 6d 61 62 6c 65 3c 2f 73 74 72 6f 6e 67  esumable</strong
49f0: 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65  > <em>boolean</e
4a00: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 61 6e  m></dt>..<dd>Can
4a10: 20 74 68 65 20 73 65 73 73 69 6f 6e 20 62 65 20   the session be 
4a20: 72 65 73 75 6d 65 64 20 6f 72 20 6e 6f 74 2e 3c  resumed or not.<
4a30: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4a40: 67 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f 73 74  g>start_time</st
4a50: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64  rong> <em>second
4a60: 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  s</em></dt>..<dd
4a70: 3e 54 69 6d 65 20 73 69 6e 63 65 20 73 65 73 73  >Time since sess
4a80: 69 6f 6e 20 73 74 61 72 74 65 64 20 69 6e 20 73  ion started in s
4a90: 65 63 6f 6e 64 73 20 73 69 6e 63 65 20 65 70 6f  econds since epo
4aa0: 63 68 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ch.</dd>..<dt><s
4ab0: 74 72 6f 6e 67 3e 74 69 6d 65 6f 75 74 3c 2f 73  trong>timeout</s
4ac0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e  trong> <em>secon
4ad0: 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ds</em></dt>..<d
4ae0: 64 3e 4d 61 78 20 64 75 72 61 74 69 6f 6e 20 6f  d>Max duration o
4af0: 66 20 73 65 73 73 69 6f 6e 20 69 6e 20 73 65 63  f session in sec
4b00: 6f 6e 64 73 20 62 65 66 6f 72 65 20 74 69 6d 65  onds before time
4b10: 2d 6f 75 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  -out.</dd>..<dt>
4b20: 3c 73 74 72 6f 6e 67 3e 6c 69 66 65 74 69 6d 65  <strong>lifetime
4b30: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65  </strong> <em>se
4b40: 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  conds</em></dt>.
4b50: 09 3c 64 64 3e 53 65 73 73 69 6f 6e 20 74 69 63  .<dd>Session tic
4b60: 6b 65 74 20 6c 69 66 65 74 69 6d 65 20 68 69 6e  ket lifetime hin
4b70: 74 20 69 6e 20 73 65 63 6f 6e 64 73 2e 3c 2f 64  t in seconds.</d
4b80: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
4b90: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f  session_id</stro
4ba0: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73  ng> <em>binary_s
4bb0: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
4bc0: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73  .<dd>Unique sess
4bd0: 69 6f 6e 20 69 64 20 66 6f 72 20 75 73 65 20 69  ion id for use i
4be0: 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65 20 73  n resuming the s
4bf0: 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64  ession.</dd>..<d
4c00: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f  t><strong>sessio
4c10: 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f 6e 67  n_ticket</strong
4c20: 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73 74 72  > <em>binary_str
4c30: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ing</em></dt>..<
4c40: 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73 69 6f  dd>Unique sessio
4c50: 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75 73 65  n ticket for use
4c60: 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74 68 65   in resuming the
4c70: 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09   session.</dd>..
4c80: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 63 6b  <dt><strong>tick
4c90: 65 74 5f 61 70 70 5f 64 61 74 61 3c 2f 73 74 72  et_app_data</str
4ca0: 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f  ong> <em>binary_
4cb0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
4cc0: 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73  ..<dd>Unique ses
4cd0: 73 69 6f 6e 20 74 69 63 6b 65 74 20 61 70 70 6c  sion ticket appl
4ce0: 69 63 61 74 69 6f 6e 20 64 61 74 61 2e 3c 2f 64  ication data.</d
4cf0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
4d00: 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 72 6f  master_key</stro
4d10: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73  ng> <em>binary_s
4d20: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
4d30: 09 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73  .<dd>Unique sess
4d40: 69 6f 6e 20 6d 61 73 74 65 72 20 6b 65 79 2e 3c  ion master key.<
4d50: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
4d60: 67 3e 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f  g>session_cache_
4d70: 6d 6f 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  mode</strong> <e
4d80: 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>mode</em></dt>
4d90: 0a 09 3c 64 64 3e 53 65 72 76 65 72 20 63 61 63  ..<dd>Server cac
4da0: 68 65 20 6d 6f 64 65 20 28 63 6c 69 65 6e 74 2c  he mode (client,
4db0: 20 73 65 72 76 65 72 2c 20 6f 72 20 62 6f 74 68   server, or both
4dc0: 29 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c  ).</dd>.    </dl
4dd0: 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a  >.</blockquote>.
4de0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
4df0: 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 22 3e  ="tls::ciphers">
4e00: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70  <strong>tls::cip
4e10: 68 65 72 73 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20  hers</strong>.  
4e20: 20 20 3c 65 6d 3e 3f 70 72 6f 74 6f 63 6f 6c 3f    <em>?protocol?
4e30: 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75 70 70   ?verbose? ?supp
4e40: 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 61 3e 3c  orted?</em></a><
4e50: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 57 69 74  /dt>.    <dd>Wit
4e60: 68 6f 75 74 20 61 6e 79 20 61 72 67 73 2c 20 72  hout any args, r
4e70: 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66  eturns a list of
4e80: 20 61 6c 6c 20 63 69 70 68 65 72 73 2e 20 57 69   all ciphers. Wi
4e90: 74 68 0a 09 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c  th..<em>protocol
4ea0: 3c 2f 65 6d 3e 2c 20 6f 6e 6c 79 20 74 68 65 20  </em>, only the 
4eb0: 63 69 70 68 65 72 73 20 73 75 70 70 6f 72 74 65  ciphers supporte
4ec0: 64 20 66 6f 72 20 74 68 61 74 20 70 72 6f 74 6f  d for that proto
4ed0: 63 6f 6c 0a 09 61 72 65 20 72 65 74 75 72 6e 65  col..are returne
4ee0: 64 20 77 68 65 72 65 20 3c 65 6d 3e 70 72 6f 74  d where <em>prot
4ef0: 6f 63 6f 6c 3c 2f 65 6d 3e 20 6d 75 73 74 20 62  ocol</em> must b
4f00: 65 20 6f 6e 65 20 6f 66 20 3c 62 3e 73 73 6c 32  e one of <b>ssl2
4f10: 2c 20 73 73 6c 33 2c 0a 09 74 6c 73 31 2c 20 74  , ssl3,..tls1, t
4f20: 6c 73 31 2e 31 2c 20 74 6c 73 31 2e 32 2c 3c 2f  ls1.1, tls1.2,</
4f30: 62 3e 20 6f 72 20 3c 62 3e 74 6c 73 31 2e 33 3c  b> or <b>tls1.3<
4f40: 2f 62 3e 2e 20 49 66 20 3c 65 6d 3e 76 65 72 62  /b>. If <em>verb
4f50: 6f 73 65 3c 2f 65 6d 3e 20 69 73 0a 09 73 70 65  ose</em> is..spe
4f60: 63 69 66 69 65 64 20 61 73 20 74 72 75 65 20 74  cified as true t
4f70: 68 65 6e 20 61 20 76 65 72 62 6f 73 65 2c 20 68  hen a verbose, h
4f80: 75 6d 61 6e 20 72 65 61 64 61 62 6c 65 20 6c 69  uman readable li
4f90: 73 74 20 69 73 20 72 65 74 75 72 6e 65 64 0a 09  st is returned..
4fa0: 77 69 74 68 20 61 64 64 69 74 69 6f 6e 61 6c 20  with additional 
4fb0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74  information on t
4fc0: 68 65 20 63 69 70 68 65 72 2e 20 49 66 20 3c 65  he cipher. If <e
4fd0: 6d 3e 73 75 70 70 6f 72 74 65 64 3c 2f 65 6d 3e  m>supported</em>
4fe0: 0a 09 69 73 20 73 70 65 63 69 66 69 65 64 20 61  ..is specified a
4ff0: 73 20 74 72 75 65 2c 20 74 68 65 6e 20 6f 6e 6c  s true, then onl
5000: 79 20 74 68 65 20 63 69 70 68 65 72 73 20 73 75  y the ciphers su
5010: 70 70 6f 72 74 65 64 20 66 6f 72 20 70 72 6f 74  pported for prot
5020: 6f 63 6f 6c 0a 09 77 69 6c 6c 20 62 65 20 6c 69  ocol..will be li
5030: 73 74 65 64 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20  sted.</dd>..    
5040: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73  <dt><a name="tls
5050: 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e 3c 73 74  ::protocols"><st
5060: 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63  rong>tls::protoc
5070: 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e  ols</strong></a>
5080: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65  </dt>.    <dd>Re
5090: 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20  turns a list of 
50a0: 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74 6f 63  supported protoc
50b0: 6f 6c 73 2e 20 56 61 6c 69 64 20 76 61 6c 75 65  ols. Valid value
50c0: 73 20 61 72 65 3a 0a 09 3c 62 3e 73 73 6c 32 3c  s are:..<b>ssl2<
50d0: 2f 62 3e 2c 20 3c 62 3e 73 73 6c 33 3c 2f 62 3e  /b>, <b>ssl3</b>
50e0: 2c 20 3c 62 3e 74 6c 73 31 3c 2f 62 3e 2c 20 3c  , <b>tls1</b>, <
50f0: 62 3e 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20 3c 62  b>tls1.1</b>, <b
5100: 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 0a 09 61 6e  >tls1.2</b>,..an
5110: 64 20 3c 62 3e 74 6c 73 31 2e 33 3c 2f 62 3e 2e  d <b>tls1.3</b>.
5120: 20 45 78 61 63 74 20 6c 69 73 74 20 64 65 70 65   Exact list depe
5130: 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c 20 76  nds on OpenSSL v
5140: 65 72 73 69 6f 6e 20 61 6e 64 0a 09 63 6f 6d 70  ersion and..comp
5150: 69 6c 65 20 74 69 6d 65 20 66 6c 61 67 73 2e 3c  ile time flags.<
5160: 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61  /dd>..    <dt><a
5170: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 76 65 72 73   name="tls::vers
5180: 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  ion"><strong>tls
5190: 3a 3a 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e  ::version</stron
51a0: 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  g></a></dt>.    
51b0: 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20  <dd>Returns the 
51c0: 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20  OpenSSL version 
51d0: 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20  string.</dd>..  
51e0: 20 20 3c 62 72 3e 0a 20 20 20 20 3c 64 74 3e 3c    <br>.    <dt><
51f0: 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 64 69 67  a name="tls::dig
5200: 65 73 74 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  est"><strong>tls
5210: 3a 3a 64 69 67 65 73 74 3c 2f 73 74 72 6f 6e 67  ::digest</strong
5220: 3e 20 3c 65 6d 3e 74 79 70 65 20 3f 2d 62 69 6e  > <em>type ?-bin
5230: 7c 2d 68 65 78 3f 0a 09 5b 2d 66 69 6c 65 20 66  |-hex?..[-file f
5240: 69 6c 65 6e 61 6d 65 20 7c 20 3f 2d 64 61 74 61  ilename | ?-data
5250: 3f 20 64 61 74 61 5d 3c 2f 65 6d 3e 3c 2f 61 3e  ? data]</em></a>
5260: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 43 61  </dt>.    <dd>Ca
5270: 6c 63 75 6c 61 74 65 20 74 68 65 20 6d 65 73 73  lculate the mess
5280: 61 67 65 20 64 69 67 65 73 74 20 66 6f 72 20 3c  age digest for <
5290: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 6f 72 20  em>data</em> or 
52a0: 66 69 6c 65 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d  file <em>filenam
52b0: 65 3c 2f 65 6d 3e 0a 09 75 73 69 6e 67 20 3c 65  e</em>..using <e
52c0: 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 68 61 73 68  m>type</em> hash
52d0: 20 61 6c 67 6f 72 69 74 68 6d 2e 20 52 65 74 75   algorithm. Retu
52e0: 72 6e 73 20 76 61 6c 75 65 20 61 73 20 61 20 68  rns value as a h
52f0: 65 78 20 73 74 72 69 6e 67 0a 09 28 64 65 66 61  ex string..(defa
5300: 75 6c 74 29 20 6f 72 20 61 73 20 61 20 62 69 6e  ult) or as a bin
5310: 61 72 79 20 76 61 6c 75 65 20 77 69 74 68 20 3c  ary value with <
5320: 65 6d 3e 2d 62 69 6e 3c 2f 65 6d 3e 20 6f 70 74  em>-bin</em> opt
5330: 69 6f 6e 2e 20 54 79 70 65 20 63 61 6e 20 62 65  ion. Type can be
5340: 0a 09 61 6e 79 20 4f 70 65 6e 53 53 4c 20 73 75  ..any OpenSSL su
5350: 70 70 6f 72 74 65 64 20 68 61 73 68 20 61 6c 67  pported hash alg
5360: 6f 72 69 74 68 6d 20 69 6e 63 6c 75 64 69 6e 67  orithm including
5370: 3a 20 3c 62 3e 6d 64 34 3c 2f 62 3e 2c 20 3c 62  : <b>md4</b>, <b
5380: 3e 6d 64 35 3c 2f 62 3e 2c 0a 09 3c 62 3e 73 68  >md5</b>,..<b>sh
5390: 61 31 3c 2f 62 3e 2c 20 3c 62 3e 73 68 61 32 35  a1</b>, <b>sha25
53a0: 36 3c 2f 62 3e 2c 20 3c 62 3e 73 68 61 35 31 32  6</b>, <b>sha512
53b0: 3c 2f 62 3e 2c 20 3c 62 3e 73 68 61 33 2d 32 35  </b>, <b>sha3-25
53c0: 36 3c 2f 62 3e 2c 20 65 74 63 2e 0a 09 53 65 65  6</b>, etc...See
53d0: 20 3c 62 3e 74 6c 73 3a 3a 64 69 67 65 73 74 73   <b>tls::digests
53e0: 3c 2f 62 3e 20 63 6f 6d 6d 61 6e 64 20 66 6f 72  </b> command for
53f0: 20 61 20 66 75 6c 6c 20 6c 69 73 74 2e 3c 2f 64   a full list.</d
5400: 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e  d>..    <dt><a n
5410: 61 6d 65 3d 22 74 6c 73 3a 3a 64 69 67 65 73 74  ame="tls::digest
5420: 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  s"><strong>tls::
5430: 64 69 67 65 73 74 73 3c 2f 73 74 72 6f 6e 67 3e  digests</strong>
5440: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
5450: 64 3e 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74  d>Returns a list
5460: 20 6f 66 20 74 68 65 20 68 61 73 68 20 61 6c 67   of the hash alg
5470: 6f 72 69 74 68 6d 73 20 66 6f 72 20 3c 62 3e 74  orithms for <b>t
5480: 6c 73 3a 3a 64 69 67 65 73 74 3c 2f 62 3e 20 63  ls::digest</b> c
5490: 6f 6d 6d 61 6e 64 2e 3c 2f 64 64 3e 0a 0a 20 20  ommand.</dd>..  
54a0: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
54b0: 6c 73 3a 3a 6d 64 34 22 3e 3c 73 74 72 6f 6e 67  ls::md4"><strong
54c0: 3e 74 6c 73 3a 3a 6d 64 34 3c 2f 73 74 72 6f 6e  >tls::md4</stron
54d0: 67 3e 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e  g> <em>data</em>
54e0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
54f0: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 4d 44  d>Returns the MD
5500: 34 20 6d 65 73 73 61 67 65 2d 64 69 67 65 73 74  4 message-digest
5510: 20 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c 2f 65   for <em>data</e
5520: 6d 3e 20 61 73 20 61 20 68 65 78 20 73 74 72 69  m> as a hex stri
5530: 6e 67 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64  ng.</dd>..    <d
5540: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a  t><a name="tls::
5550: 6d 64 35 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  md5"><strong>tls
5560: 3a 3a 6d 64 35 3c 2f 73 74 72 6f 6e 67 3e 20 3c  ::md5</strong> <
5570: 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e  em>data</em></a>
5580: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65  </dt>.    <dd>Re
5590: 74 75 72 6e 73 20 74 68 65 20 4d 44 35 20 6d 65  turns the MD5 me
55a0: 73 73 61 67 65 2d 64 69 67 65 73 74 20 66 6f 72  ssage-digest for
55b0: 20 3c 65 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 61   <em>data</em> a
55c0: 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c  s a hex string.<
55d0: 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61  /dd>..    <dt><a
55e0: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 68 61 31   name="tls::sha1
55f0: 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73  "><strong>tls::s
5600: 68 61 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ha1</strong> <em
5610: 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f  >data</em></a></
5620: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74 75  dt>.    <dd>Retu
5630: 72 6e 73 20 74 68 65 20 53 48 41 31 20 73 65 63  rns the SHA1 sec
5640: 75 72 65 20 68 61 73 68 20 61 6c 67 6f 72 69 74  ure hash algorit
5650: 68 6d 20 64 69 67 65 73 74 20 66 6f 72 20 3c 65  hm digest for <e
5660: 6d 3e 64 61 74 61 3c 2f 65 6d 3e 20 61 73 20 61  m>data</em> as a
5670: 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64   hex string.</dd
5680: 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61  >..    <dt><a na
5690: 6d 65 3d 22 74 6c 73 3a 3a 73 68 61 32 35 36 22  me="tls::sha256"
56a0: 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 68  ><strong>tls::sh
56b0: 61 32 35 36 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  a256</strong> <e
56c0: 6d 3e 64 61 74 61 3c 2f 65 6d 3e 3c 2f 61 3e 3c  m>data</em></a><
56d0: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74  /dt>.    <dd>Ret
56e0: 75 72 6e 73 20 74 68 65 20 53 48 41 2d 32 20 53  urns the SHA-2 S
56f0: 48 41 32 35 36 20 73 65 63 75 72 65 20 68 61 73  HA256 secure has
5700: 68 20 61 6c 67 6f 72 69 74 68 6d 20 64 69 67 65  h algorithm dige
5710: 73 74 20 66 6f 72 20 3c 65 6d 3e 64 61 74 61 3c  st for <em>data<
5720: 2f 65 6d 3e 20 61 73 20 61 20 68 65 78 20 73 74  /em> as a hex st
5730: 72 69 6e 67 2e 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e  ring.</dd>.</dl>
5740: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43  ..<h3><a name="C
5750: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22  ALLBACK OPTIONS"
5760: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e  >CALLBACK OPTION
5770: 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 0a  S</a></h3>..<p>.
5780: 41 73 20 69 6e 64 69 63 61 74 65 64 20 61 62 6f  As indicated abo
5790: 76 65 2c 20 69 6e 64 69 76 69 64 75 61 6c 20 63  ve, individual c
57a0: 68 61 6e 6e 65 6c 73 20 63 61 6e 20 62 65 20 67  hannels can be g
57b0: 69 76 65 6e 20 74 68 65 69 72 20 6f 77 6e 20 63  iven their own c
57c0: 61 6c 6c 62 61 63 6b 73 0a 74 6f 20 68 61 6e 64  allbacks.to hand
57d0: 6c 65 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20  le intermediate 
57e0: 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 74 68  processing by th
57f0: 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72  e OpenSSL librar
5800: 79 2c 20 75 73 69 6e 67 20 74 68 65 0a 3c 73 74  y, using the.<st
5810: 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73  rong>-command</s
5820: 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e  trong>, <strong>
5830: 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e  -password</stron
5840: 67 3e 2c 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e  g>, and.<strong>
5850: 2d 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e  -validate_comman
5860: 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f  d</strong> optio
5870: 6e 73 20 70 61 73 73 65 64 20 74 6f 20 65 69 74  ns passed to eit
5880: 68 65 72 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74  her of.<strong>t
5890: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f  ls::socket</stro
58a0: 6e 67 3e 20 6f 72 20 3c 73 74 72 6f 6e 67 3e 74  ng> or <strong>t
58b0: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f  ls::import</stro
58c0: 6e 67 3e 2e 0a 49 66 20 74 68 65 20 63 61 6c 6c  ng>..If the call
58d0: 62 61 63 6b 20 67 65 6e 65 72 61 74 65 73 20 61  back generates a
58e0: 6e 20 65 72 72 6f 72 2c 20 74 68 65 20 3c 62 3e  n error, the <b>
58f0: 62 67 65 72 72 6f 72 3c 2f 62 3e 20 63 6f 6d 6d  bgerror</b> comm
5900: 61 6e 64 20 77 69 74 68 20 62 65 0a 69 6e 76 6f  and with be.invo
5910: 6b 65 64 20 77 69 74 68 20 74 68 65 20 65 72 72  ked with the err
5920: 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 0a  or information..
5930: 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74  </p>..<blockquot
5940: 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20 20 3c 64 74  e>.<dl>..    <dt
5950: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e  ><strong>-comman
5960: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  d</strong> <em>c
5970: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74  allback</em></dt
5980: 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f  >.    <dd>..Invo
5990: 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 69 65  kes the specifie
59a0: 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f  d <em>callback</
59b0: 65 6d 3e 20 73 63 72 69 70 74 20 61 74 20 73 65  em> script at se
59c0: 76 65 72 61 6c 20 70 6f 69 6e 74 73 0a 09 64 75  veral points..du
59d0: 72 69 6e 67 20 74 68 65 20 4f 70 65 6e 53 53 4c  ring the OpenSSL
59e0: 20 68 61 6e 64 73 68 61 6b 65 20 61 6e 64 20 75   handshake and u
59f0: 73 65 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f  se. See below fo
5a00: 72 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 09  r the possible..
5a10: 61 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64  arguments passed
5a20: 20 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b   to the callback
5a30: 20 73 63 72 69 70 74 2e 20 56 61 6c 75 65 73 20   script. Values 
5a40: 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68  returned from th
5a50: 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61 72 65 20  e..callback are 
5a60: 69 67 6e 6f 72 65 64 2e 0a 0a 09 3c 62 72 3e 0a  ignored....<br>.
5a70: 09 3c 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c  .<br>...<dl>...<
5a80: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 65  dt>..  <strong>e
5a90: 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  rror</strong> <e
5aa0: 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65 73 73 61 67  m>channel messag
5ab0: 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c  e</em>..</dt>..<
5ac0: 64 64 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 6d  dd>..  The <em>m
5ad0: 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75  essage</em> argu
5ae0: 6d 65 6e 74 20 63 6f 6e 74 61 69 6e 73 20 61 6e  ment contains an
5af0: 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 67   error message g
5b00: 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79 20 74  enerated..  by t
5b10: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74  he OpenSSL funct
5b20: 69 6f 6e 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65  ion <code>ERR_re
5b30: 61 73 6f 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e  ason_error_strin
5b40: 67 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 3c 2f 64  g()</code>...</d
5b50: 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e  d>...<br>...<dt>
5b60: 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 69 6e 66 6f  ..  <strong>info
5b70: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68  </strong> <em>ch
5b80: 61 6e 6e 65 6c 20 6d 61 6a 6f 72 20 6d 69 6e 6f  annel major mino
5b90: 72 20 6d 65 73 73 61 67 65 20 74 79 70 65 3c 2f  r message type</
5ba0: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e  em>..</dt>..<dd>
5bb0: 0a 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66  ..  This form of
5bc0: 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76   callback is inv
5bd0: 6f 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e  oked by the Open
5be0: 53 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20  SSL function..  
5bf0: 3c 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65  <code>SSL_CTX_se
5c00: 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62 61 63 6b 28  t_info_callback(
5c10: 29 3c 2f 63 6f 64 65 3e 20 64 75 72 69 6e 67 20  )</code> during 
5c20: 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 65 74 75 70  connection setup
5c30: 0a 09 20 20 61 6e 64 20 75 73 65 2e 0a 09 20 20  ..  and use...  
5c40: 3c 62 72 3e 0a 09 20 20 3c 75 6c 3e 0a 09 20 20  <br>..  <ul>..  
5c50: 3c 6c 69 3e 50 6f 73 73 69 62 6c 65 20 76 61 6c  <li>Possible val
5c60: 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 6a 6f  ues for <em>majo
5c70: 72 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 20 3c  r</em> are:..  <
5c80: 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c 20  code>handshake, 
5c90: 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c 20  alert, connect, 
5ca0: 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c 2f  accept</code>.</
5cb0: 6c 69 3e 0a 09 20 20 3c 6c 69 3e 50 6f 73 73 69  li>..  <li>Possi
5cc0: 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c  ble values for <
5cd0: 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72  em>minor</em> ar
5ce0: 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 73 74 61 72  e:..  <code>star
5cf0: 74 2c 20 64 6f 6e 65 2c 20 72 65 61 64 2c 20 77  t, done, read, w
5d00: 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 69 74  rite, loop, exit
5d10: 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20  </code>.</li>.. 
5d20: 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 6d 65 73   <li>The <em>mes
5d30: 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  sage</em> argume
5d40: 6e 74 20 69 73 20 61 20 64 65 73 63 72 69 70 74  nt is a descript
5d50: 69 76 65 20 73 74 72 69 6e 67 20 77 68 69 63 68  ive string which
5d60: 20 6d 61 79 0a 09 20 20 62 65 20 67 65 6e 65 72   may..  be gener
5d70: 61 74 65 64 20 65 69 74 68 65 72 20 62 79 20 3c  ated either by <
5d80: 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f 73  code>SSL_state_s
5d90: 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f  tring_long()</co
5da0: 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 3c 63 6f  de> or by..  <co
5db0: 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f 64 65 73  de>SSL_alert_des
5dc0: 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c  c_string_long()<
5dd0: 2f 63 6f 64 65 3e 2c 20 64 65 70 65 6e 64 69 6e  /code>, dependin
5de0: 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74 65 78 74  g on the context
5df0: 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 6c 69 3e 46 6f  .</li>..  <li>Fo
5e00: 72 20 61 6c 65 72 74 73 2c 20 74 68 65 20 70 6f  r alerts, the po
5e10: 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66 6f  ssible values fo
5e20: 72 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20  r <em>type</em> 
5e30: 61 72 65 3a 0a 09 20 20 3c 63 6f 64 65 3e 77 61  are:..  <code>wa
5e40: 72 6e 69 6e 67 2c 20 66 61 74 61 6c 2c 20 61 6e  rning, fatal, an
5e50: 64 20 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f 64 65 3e  d unknown</code>
5e60: 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c 0a 09 20  . For others,.. 
5e70: 20 3c 63 6f 64 65 3e 69 6e 66 6f 3c 2f 63 6f 64   <code>info</cod
5e80: 65 3e 20 69 73 20 75 73 65 64 2e 3c 2f 6c 69 3e  e> is used.</li>
5e90: 0a 09 20 20 3c 2f 75 6c 3e 0a 09 3c 2f 64 64 3e  ..  </ul>..</dd>
5ea0: 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f  ...<dt>..  <stro
5eb0: 6e 67 3e 6d 65 73 73 61 67 65 3c 2f 73 74 72 6f  ng>message</stro
5ec0: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20  ng> <em>channel 
5ed0: 64 69 72 65 63 74 69 6f 6e 20 76 65 72 73 69 6f  direction versio
5ee0: 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65 20 64  n content_type d
5ef0: 61 74 61 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a  ata</em>..</dt>.
5f00: 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f  .<dd>..  This fo
5f10: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
5f20: 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65  s invoked by the
5f30: 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f   OpenSSL functio
5f40: 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 73  n..  <code>SSL_s
5f50: 65 74 5f 6d 73 67 5f 63 61 6c 6c 62 61 63 6b 28  et_msg_callback(
5f60: 29 3c 2f 63 6f 64 65 3e 20 77 68 65 6e 65 76 65  )</code> wheneve
5f70: 72 20 61 20 6d 65 73 73 61 67 65 20 69 73 20 73  r a message is s
5f80: 65 6e 74 20 6f 72 0a 09 20 20 72 65 63 65 69 76  ent or..  receiv
5f90: 65 64 2e 20 49 74 20 69 73 20 6f 6e 6c 79 20 61  ed. It is only a
5fa0: 76 61 69 6c 61 62 6c 65 20 77 68 65 6e 0a 09 20  vailable when.. 
5fb0: 20 4f 70 65 6e 53 53 4c 20 69 73 20 63 6f 6d 70   OpenSSL is comp
5fc0: 6c 69 65 64 20 77 69 74 68 20 74 68 65 20 3c 65  lied with the <e
5fd0: 6d 3e 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61  m>enable-ssl-tra
5fe0: 63 65 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e 0a  ce</em> option..
5ff0: 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 64 69 72  .  Where <em>dir
6000: 65 63 74 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20 53  ection</em> is S
6010: 65 6e 74 20 6f 72 20 52 65 63 65 69 76 65 64 2c  ent or Received,
6020: 20 3c 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d   <em>version</em
6030: 3e 20 69 73 20 74 68 65 0a 09 20 20 70 72 6f 74  > is the..  prot
6040: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 2c 20 3c 65  ocol version, <e
6050: 6d 3e 63 6f 6e 74 65 6e 74 5f 74 79 70 65 3c 2f  m>content_type</
6060: 65 6d 3e 20 69 73 20 74 68 65 20 6d 65 73 73 61  em> is the messa
6070: 67 65 20 63 6f 6e 74 65 6e 74 20 74 79 70 65 2c  ge content type,
6080: 0a 09 20 20 61 6e 64 20 3c 65 6d 3e 64 61 74 61  ..  and <em>data
6090: 3c 2f 65 6d 3e 20 69 73 20 6d 6f 72 65 20 69 6e  </em> is more in
60a0: 66 6f 20 6f 6e 20 74 68 65 20 6d 65 73 73 61 67  fo on the messag
60b0: 65 20 66 72 6f 6d 20 74 68 65 20 3c 63 6f 64 65  e from the <code
60c0: 3e 53 53 4c 5f 74 72 61 63 65 3c 2f 63 6f 64 65  >SSL_trace</code
60d0: 3e 20 41 50 49 2e 0a 09 3c 2f 64 64 3e 0a 09 3c  > API...</dd>..<
60e0: 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73  br>...<dt>..  <s
60f0: 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 3c 2f 73  trong>session</s
6100: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e  trong> <em>chann
6110: 65 6c 20 73 65 73 73 69 6f 6e 5f 69 64 20 74 69  el session_id ti
6120: 63 6b 65 74 20 6c 69 66 65 74 69 6d 65 3c 2f 65  cket lifetime</e
6130: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a  m>..</dt>..<dd>.
6140: 09 20 20 54 68 69 73 20 66 6f 72 6d 20 6f 66 20  .  This form of 
6150: 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f  callback is invo
6160: 6b 65 64 20 62 79 20 74 68 65 20 4f 70 65 6e 53  ked by the OpenS
6170: 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c  SL function..  <
6180: 63 6f 64 65 3e 53 53 4c 5f 43 54 58 5f 73 65 73  code>SSL_CTX_ses
6190: 73 5f 73 65 74 5f 6e 65 77 5f 63 62 28 29 3c 2f  s_set_new_cb()</
61a0: 63 6f 64 65 3e 2e 0a 09 20 20 57 68 65 72 65 20  code>...  Where 
61b0: 3c 65 6d 3e 73 65 73 73 69 6f 6e 5f 69 64 3c 2f  <em>session_id</
61c0: 65 6d 3e 20 69 73 20 74 68 65 20 63 75 72 72 65  em> is the curre
61d0: 6e 74 20 73 65 73 73 69 6f 6e 20 69 64 65 6e 74  nt session ident
61e0: 69 66 69 65 72 2c 0a 09 20 20 3c 65 6d 3e 74 69  ifier,..  <em>ti
61f0: 63 6b 65 74 3c 2f 65 6d 3e 20 69 73 20 74 68 65  cket</em> is the
6200: 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20   session ticket 
6210: 69 6e 66 6f 2c 20 61 6e 64 20 3c 65 6d 3e 6c 69  info, and <em>li
6220: 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 20 20 69  fetime</em>..  i
6230: 73 20 74 68 65 20 74 68 65 20 74 69 63 6b 65 74  s the the ticket
6240: 20 6c 69 66 65 74 69 6d 65 20 69 6e 20 73 65 63   lifetime in sec
6250: 6f 6e 64 73 2e 0a 09 3c 2f 64 64 3e 0a 09 3c 62  onds...</dd>..<b
6260: 72 3e 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f  r>..</dl>.    </
6270: 64 64 3e 0a 0a 20 20 20 20 3c 62 72 3e 0a 0a 20  dd>..    <br>.. 
6280: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d     <dt><strong>-
6290: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67  password</strong
62a0: 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f  > <em>callback</
62b0: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64  em></dt>.    <dd
62c0: 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20 73  >..Invokes the s
62d0: 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c  pecified <em>cal
62e0: 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70  lback</em> scrip
62f0: 74 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e  t when OpenSSL n
6300: 65 65 64 73 20 74 6f 0a 09 6f 62 74 61 69 6e 20  eeds to..obtain 
6310: 61 20 70 61 73 73 77 6f 72 64 2e 20 53 65 65 20  a password. See 
6320: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f  below for the po
6330: 73 73 69 62 6c 65 20 61 72 67 75 6d 65 6e 74 73  ssible arguments
6340: 20 70 61 73 73 65 64 20 74 6f 0a 09 74 68 65 20   passed to..the 
6350: 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e  callback script.
6360: 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 76   See below for v
6370: 61 6c 69 64 20 72 65 74 75 72 6e 20 76 61 6c 75  alid return valu
6380: 65 73 2e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e  es....<br>..<br>
6390: 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74 3e 0a 09  ...<dl>...<dt>..
63a0: 20 20 3c 73 74 72 6f 6e 67 3e 70 61 73 73 77 6f    <strong>passwo
63b0: 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  rd</strong> <em>
63c0: 72 77 66 6c 61 67 20 73 69 7a 65 3c 2f 65 6d 3e  rwflag size</em>
63d0: 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20  ..</dt>..<dd>.. 
63e0: 20 49 6e 76 6f 6b 65 64 20 77 68 65 6e 20 6c 6f   Invoked when lo
63f0: 61 64 69 6e 67 20 6f 72 20 73 74 6f 72 69 6e 67  ading or storing
6400: 20 61 20 50 45 4d 20 63 65 72 74 69 66 69 63 61   a PEM certifica
6410: 74 65 20 77 69 74 68 20 65 6e 63 72 79 70 74 69  te with encrypti
6420: 6f 6e 2e 0a 09 20 20 57 68 65 72 65 20 3c 65 6d  on...  Where <em
6430: 3e 72 77 66 6c 61 67 3c 2f 65 6d 3e 20 69 73 20  >rwflag</em> is 
6440: 30 20 66 6f 72 20 72 65 61 64 69 6e 67 2f 64 65  0 for reading/de
6450: 63 72 79 70 74 69 6f 6e 20 6f 72 20 31 20 66 6f  cryption or 1 fo
6460: 72 0a 09 20 20 77 72 69 74 69 6e 67 2f 65 6e 63  r..  writing/enc
6470: 72 79 70 74 69 6f 6e 20 28 63 61 6e 20 70 72 6f  ryption (can pro
6480: 6d 70 74 20 75 73 65 72 20 74 6f 20 63 6f 6e 66  mpt user to conf
6490: 69 72 6d 29 20 61 6e 64 0a 09 20 20 3c 65 6d 3e  irm) and..  <em>
64a0: 73 69 7a 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65  size</em> is the
64b0: 20 6d 61 78 20 70 61 73 73 77 6f 72 64 20 6c 65   max password le
64c0: 6e 67 74 68 20 69 6e 20 62 79 74 65 73 2e 0a 09  ngth in bytes...
64d0: 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73    The callback s
64e0: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 74 68 65  hould return the
64f0: 20 70 61 73 73 77 6f 72 64 20 61 73 20 61 20 73   password as a s
6500: 74 72 69 6e 67 2e 0a 09 3c 2f 64 64 3e 0a 20 20  tring...</dd>.  
6510: 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62 72    </dd>..    <br
6520: 3e 0a 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72  >...    <dt><str
6530: 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 63 6f 6d  ong>-validatecom
6540: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  mand</strong> <e
6550: 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c  m>callback</em><
6560: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49  /dt>.    <dd>..I
6570: 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63 69  nvokes the speci
6580: 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63  fied <em>callbac
6590: 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 64 75  k</em> script du
65a0: 72 69 6e 67 20 68 61 6e 64 73 68 61 6b 65 20 69  ring handshake i
65b0: 6e 0a 09 6f 72 64 65 72 20 74 6f 20 76 61 6c 69  n..order to vali
65c0: 64 61 74 65 20 74 68 65 20 70 72 6f 76 69 64 65  date the provide
65d0: 64 20 76 61 6c 75 65 28 73 29 2e 20 53 65 65 20  d value(s). See 
65e0: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f  below for the po
65f0: 73 73 69 62 6c 65 0a 09 61 72 67 75 6d 65 6e 74  ssible..argument
6600: 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 20  s passed to the 
6610: 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e  callback script.
6620: 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20  ..To reject the 
6630: 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74 20  value and abort 
6640: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 74 68 65 20  connection, the 
6650: 63 61 6c 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20  callback should 
6660: 72 65 74 75 72 6e 20 30 2e 0a 09 54 6f 20 61 63  return 0...To ac
6670: 63 65 70 74 20 74 68 65 20 76 61 6c 75 65 20 61  cept the value a
6680: 6e 64 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20  nd continue the 
6690: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 69 74 20 73  connection, it s
66a0: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 31 2e 0a  hould return 1..
66b0: 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65 20 76  .To reject the v
66c0: 61 6c 75 65 2c 20 62 75 74 20 63 6f 6e 74 69 6e  alue, but contin
66d0: 75 65 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f  ue the connectio
66e0: 6e 2c 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74  n, it should ret
66f0: 75 72 6e 20 32 2e 0a 0a 09 3c 62 72 3e 0a 09 3c  urn 2....<br>..<
6700: 62 72 3e 0a 0a 09 3c 64 6c 3e 0a 0a 09 3c 64 74  br>...<dl>...<dt
6710: 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 61 6c 70  >..  <strong>alp
6720: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  n</strong> <em>c
6730: 68 61 6e 6e 65 6c 20 70 72 6f 74 6f 63 6f 6c 20  hannel protocol 
6740: 6d 61 74 63 68 3c 2f 65 6d 3e 0a 09 3c 2f 64 74  match</em>..</dt
6750: 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20 73  >..<dd>..  For s
6760: 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72  ervers, this for
6770: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
6780: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68   invoked when th
6790: 65 20 63 6c 69 65 6e 74 20 41 4c 50 4e 0a 09 20  e client ALPN.. 
67a0: 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65   extension is re
67b0: 63 65 69 76 65 64 2e 20 49 66 20 3c 65 6d 3e 6d  ceived. If <em>m
67c0: 61 74 63 68 3c 2f 65 6d 3e 20 69 73 20 74 72 75  atch</em> is tru
67d0: 65 2c 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c  e, <em>protocol<
67e0: 2f 65 6d 3e 0a 09 20 20 69 73 20 74 68 65 20 66  /em>..  is the f
67f0: 69 72 73 74 20 3c 62 3e 2d 61 6c 70 6e 3c 2f 62  irst <b>-alpn</b
6800: 3e 20 73 70 65 63 69 66 69 65 64 20 70 72 6f 74  > specified prot
6810: 6f 63 6f 6c 20 63 6f 6d 6d 6f 6e 20 74 6f 20 74  ocol common to t
6820: 68 65 20 62 6f 74 68 20 74 68 65 0a 09 20 20 63  he both the..  c
6830: 6c 69 65 6e 74 20 61 6e 64 20 73 65 72 76 65 72  lient and server
6840: 2e 20 49 66 20 6e 6f 74 2c 20 74 68 65 20 66 69  . If not, the fi
6850: 72 73 74 20 63 6c 69 65 6e 74 20 73 70 65 63 69  rst client speci
6860: 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 69 73  fied protocol is
6870: 0a 09 20 20 75 73 65 64 2e 20 43 61 6c 6c 65 64  ..  used. Called
6880: 20 61 66 74 65 72 20 68 65 6c 6c 6f 20 61 6e 64   after hello and
6890: 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73 2e   ALPN callbacks.
68a0: 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a  ..</dd>...<br>..
68b0: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67  .<dt>..  <strong
68c0: 3e 68 65 6c 6c 6f 3c 2f 73 74 72 6f 6e 67 3e 20  >hello</strong> 
68d0: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 73 65 72 76  <em>channel serv
68e0: 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64  ername</em>..</d
68f0: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72 20  t>..<dd>..  For 
6900: 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f  servers, this fo
6910: 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69  rm of callback i
6920: 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e 67  s invoked during
6930: 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 0a 09 20   client hello.. 
6940: 20 6d 65 73 73 61 67 65 20 70 72 6f 63 65 73 73   message process
6950: 69 6e 67 2e 20 49 74 20 69 73 20 75 73 65 64 20  ing. It is used 
6960: 74 6f 20 73 65 6c 65 63 74 20 61 6e 20 61 70 70  to select an app
6970: 72 6f 70 72 69 61 74 65 20 63 65 72 74 69 66 69  ropriate certifi
6980: 63 61 74 65 20 74 6f 0a 09 20 20 70 72 65 73 65  cate to..  prese
6990: 6e 74 2c 20 61 6e 64 20 6d 61 6b 65 20 6f 74 68  nt, and make oth
69a0: 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  er configuration
69b0: 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 72 65 6c   adjustments rel
69c0: 65 76 61 6e 74 20 74 6f 20 74 68 61 74 0a 09 20  evant to that.. 
69d0: 20 73 65 72 76 65 72 20 6e 61 6d 65 20 61 6e 64   server name and
69e0: 20 69 74 73 20 63 6f 6e 66 69 67 75 72 61 74 69   its configurati
69f0: 6f 6e 2e 20 43 61 6c 6c 65 64 20 62 65 66 6f 72  on. Called befor
6a00: 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e 20 63  e SNI and ALPN c
6a10: 61 6c 6c 62 61 63 6b 73 2e 0a 09 3c 2f 64 64 3e  allbacks...</dd>
6a20: 0a 0a 09 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09  ...<br>...<dt>..
6a30: 20 20 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73    <strong>sni</s
6a40: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e  trong> <em>chann
6a50: 65 6c 20 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65  el servername</e
6a60: 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a  m>..</dt>..<dd>.
6a70: 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c 20  .  For servers, 
6a80: 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c  this form of cal
6a90: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64  lback is invoked
6aa0: 20 77 68 65 6e 20 74 68 65 20 53 4e 49 20 65 78   when the SNI ex
6ab0: 74 65 6e 73 69 6f 6e 0a 09 20 20 66 72 6f 6d 20  tension..  from 
6ac0: 74 68 65 20 63 6c 69 65 6e 74 20 69 73 20 72 65  the client is re
6ad0: 63 65 69 76 65 64 2e 20 57 68 65 72 65 20 3c 65  ceived. Where <e
6ae0: 6d 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d  m>servername</em
6af0: 3e 20 69 73 20 74 68 65 20 63 6c 69 65 6e 74 0a  > is the client.
6b00: 09 20 20 70 72 6f 76 69 64 65 64 20 73 65 72 76  .  provided serv
6b10: 65 72 20 6e 61 6d 65 20 66 72 6f 6d 20 74 68 65  er name from the
6b20: 20 3c 62 3e 2d 73 65 72 76 65 72 6e 61 6d 65 3c   <b>-servername<
6b30: 2f 62 3e 20 6f 70 74 69 6f 6e 2e 20 54 68 69 73  /b> option. This
6b40: 20 69 73 0a 09 20 20 75 73 65 64 20 77 68 65 6e   is..  used when
6b50: 20 61 20 73 65 72 76 65 72 20 73 75 70 70 6f 72   a server suppor
6b60: 74 73 20 6d 75 6c 74 69 70 6c 65 20 6e 61 6d 65  ts multiple name
6b70: 73 2c 20 73 6f 20 74 68 65 20 72 69 67 68 74 20  s, so the right 
6b80: 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 20 63  certificate..  c
6b90: 61 6e 20 62 65 20 75 73 65 64 2e 20 43 61 6c 6c  an be used. Call
6ba0: 65 64 20 61 66 74 65 72 20 68 65 6c 6c 6f 20 63  ed after hello c
6bb0: 61 6c 6c 62 61 63 6b 20 62 75 74 20 62 65 66 6f  allback but befo
6bc0: 72 65 20 41 4c 50 4e 20 63 61 6c 6c 62 61 63 6b  re ALPN callback
6bd0: 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a  ...</dd>...<br>.
6be0: 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e  ..<dt>..  <stron
6bf0: 67 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e 67  g>verify</strong
6c00: 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 64 65  > <em>channel de
6c10: 70 74 68 20 63 65 72 74 20 73 74 61 74 75 73 20  pth cert status 
6c20: 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f 64 74  error</em>..</dt
6c30: 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73 20  >..<dd>..  This 
6c40: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b  form of callback
6c50: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 4f   is invoked by O
6c60: 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20 6e 65  penSSL when a ne
6c70: 77 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20  w certificate.. 
6c80: 20 69 73 20 72 65 63 65 69 76 65 64 20 66 72 6f   is received fro
6c90: 6d 20 74 68 65 20 70 65 65 72 2e 20 49 74 20 61  m the peer. It a
6ca0: 6c 6c 6f 77 73 20 74 68 65 20 63 6c 69 65 6e 74  llows the client
6cb0: 20 74 6f 20 63 68 65 63 6b 20 74 68 65 0a 09 20   to check the.. 
6cc0: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72   certificate ver
6cd0: 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75 6c 74  ification result
6ce0: 73 20 61 6e 64 20 63 68 6f 6f 73 65 20 77 68 65  s and choose whe
6cf0: 74 68 65 72 20 74 6f 20 63 6f 6e 74 69 6e 75 65  ther to continue
6d00: 0a 09 20 20 6f 72 20 6e 6f 74 2e 20 49 74 20 69  ..  or not. It i
6d10: 73 20 63 61 6c 6c 65 64 20 66 6f 72 20 65 61 63  s called for eac
6d20: 68 20 63 65 72 74 69 66 69 63 61 74 65 20 69 6e  h certificate in
6d30: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
6d40: 20 63 68 61 69 6e 2e 0a 09 20 20 3c 75 6c 3e 0a   chain...  <ul>.
6d50: 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 64  .  <li>The <em>d
6d60: 65 70 74 68 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  epth</em> argume
6d70: 6e 74 20 69 73 20 61 6e 20 69 6e 74 65 67 65 72  nt is an integer
6d80: 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68   representing th
6d90: 65 0a 09 20 20 63 75 72 72 65 6e 74 20 64 65 70  e..  current dep
6da0: 74 68 20 6f 6e 20 74 68 65 20 63 65 72 74 69 66  th on the certif
6db0: 69 63 61 74 65 20 63 68 61 69 6e 2c 20 77 69 74  icate chain, wit
6dc0: 68 0a 09 20 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f  h..  <code>0</co
6dd0: 64 65 3e 20 61 73 20 74 68 65 20 70 65 65 72 20  de> as the peer 
6de0: 63 65 72 74 69 66 69 63 61 74 65 20 61 6e 64 20  certificate and 
6df0: 68 69 67 68 65 72 20 76 61 6c 75 65 73 20 67 6f  higher values go
6e00: 69 6e 67 0a 09 20 20 75 70 20 74 6f 20 74 68 65  ing..  up to the
6e10: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74   Certificate Aut
6e20: 68 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f 6c 69  hority (CA).</li
6e30: 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d  >..  <li>The <em
6e40: 3e 63 65 72 74 3c 2f 65 6d 3e 20 61 72 67 75 6d  >cert</em> argum
6e50: 65 6e 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66  ent is a list of
6e60: 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73   key-value pairs
6e70: 20 73 69 6d 69 6c 61 72 0a 09 20 20 74 6f 20 74   similar..  to t
6e80: 68 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 79  hose returned by
6e90: 0a 09 20 20 3c 61 20 68 72 65 66 3d 22 23 74 6c  ..  <a href="#tl
6ea0: 73 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f  s::status"><stro
6eb0: 6e 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f  ng>tls::status</
6ec0: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 2e 3c 2f 6c 69  strong></a>.</li
6ed0: 3e 0a 09 20 20 3c 6c 69 3e 54 68 65 20 3c 65 6d  >..  <li>The <em
6ee0: 3e 73 74 61 74 75 73 3c 2f 65 6d 3e 20 61 72 67  >status</em> arg
6ef0: 75 6d 65 6e 74 20 69 73 20 61 6e 20 62 6f 6f 6c  ument is an bool
6f00: 65 61 6e 20 72 65 70 72 65 73 65 6e 74 69 6e 67  ean representing
6f10: 20 74 68 65 0a 09 20 20 76 61 6c 69 64 69 74 79   the..  validity
6f20: 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20   of the current 
6f30: 63 65 72 74 69 66 69 63 61 74 65 2e 0a 09 20 20  certificate...  
6f40: 41 20 76 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65  A value of <code
6f50: 3e 30 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20  >0</code> means 
6f60: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
6f70: 69 73 20 64 65 65 6d 65 64 20 69 6e 76 61 6c 69  is deemed invali
6f80: 64 2e 0a 09 20 20 41 20 76 61 6c 75 65 20 6f 66  d...  A value of
6f90: 20 3c 63 6f 64 65 3e 31 3c 2f 63 6f 64 65 3e 20   <code>1</code> 
6fa0: 6d 65 61 6e 73 20 74 68 65 20 63 65 72 74 69 66  means the certif
6fb0: 69 63 61 74 65 20 69 73 20 64 65 65 6d 65 64 20  icate is deemed 
6fc0: 76 61 6c 69 64 2e 3c 2f 6c 69 3e 0a 09 20 20 3c  valid.</li>..  <
6fd0: 6c 69 3e 54 68 65 20 3c 65 6d 3e 65 72 72 6f 72  li>The <em>error
6fe0: 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20 73  </em> argument s
6ff0: 75 70 70 6c 69 65 73 20 74 68 65 20 6d 65 73 73  upplies the mess
7000: 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e  age, if any, gen
7010: 65 72 61 74 65 64 0a 09 20 20 62 79 20 3c 63 6f  erated..  by <co
7020: 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 54  de>X509_STORE_CT
7030: 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f 63  X_get_error()</c
7040: 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 20 20 3c 2f  ode>.</li>..  </
7050: 75 6c 3e 0a 09 3c 2f 64 64 3e 0a 09 3c 62 72 3e  ul>..</dd>..<br>
7060: 0a 09 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64  ..</dl>.    </dd
7070: 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71  >.</dl>.</blockq
7080: 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65 72  uote>..<p>.Refer
7090: 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74  ence implementat
70a0: 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63 61  ions of these ca
70b0: 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f 76  llbacks are prov
70c0: 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69 73 74  ided in the.dist
70d0: 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 74 72  ribution as <str
70e0: 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63  ong>tls::callbac
70f0: 6b 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72  k</strong>, <str
7100: 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72  ong>tls::passwor
7110: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 61 6e 64 20  d</strong>,.and 
7120: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c  <strong>tls::val
7130: 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73  idate_command</s
7140: 74 72 6f 6e 67 3e 20 72 65 73 70 65 63 74 69 76  trong> respectiv
7150: 65 6c 79 2e 20 20 4e 6f 74 65 20 74 68 61 74 20  ely.  Note that 
7160: 74 68 65 73 65 20 61 72 65 0a 3c 65 6d 3e 73 61  these are.<em>sa
7170: 6d 70 6c 65 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d  mple</em> implem
7180: 65 6e 74 61 74 69 6f 6e 73 20 6f 6e 6c 79 2e 20  entations only. 
7190: 20 49 6e 20 61 20 6d 6f 72 65 20 72 65 61 6c 69   In a more reali
71a0: 73 74 69 63 20 64 65 70 6c 6f 79 6d 65 6e 74 0a  stic deployment.
71b0: 79 6f 75 20 77 6f 75 6c 64 20 73 70 65 63 69 66  you would specif
71c0: 79 20 79 6f 75 72 20 6f 77 6e 20 63 61 6c 6c 62  y your own callb
71d0: 61 63 6b 20 73 63 72 69 70 74 73 20 6f 6e 20 65  ack scripts on e
71e0: 61 63 68 20 54 4c 53 20 63 68 61 6e 6e 65 6c 20  ach TLS channel 
71f0: 75 73 69 6e 67 20 74 68 65 0a 3c 73 74 72 6f 6e  using the.<stron
7200: 67 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  g>-command</stro
7210: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 2d 70 61  ng>, <strong>-pa
7220: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2c  ssword</strong>,
7230: 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d 76 61   and <strong>-va
7240: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f  lidate_command</
7250: 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 73 2e  strong> options.
7260: 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68 65 20 64  .</p>..<p>.The d
7270: 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20  efault behavior 
7280: 77 68 65 6e 20 74 68 65 20 3c 73 74 72 6f 6e 67  when the <strong
7290: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e  >-command</stron
72a0: 67 3e 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 2d  g> and <strong>-
72b0: 76 61 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64  validate_command
72c0: 3c 2f 73 74 72 6f 6e 67 3e 0a 6f 70 74 69 6f 6e  </strong>.option
72d0: 73 20 61 72 65 20 6e 6f 74 20 73 70 65 63 69 66  s are not specif
72e0: 69 65 64 20 69 73 20 66 6f 72 20 54 4c 53 20 74  ied is for TLS t
72f0: 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20 61 73  o process the as
7300: 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61 72 79  sociated library
7310: 20 63 61 6c 6c 62 61 63 6b 73 0a 69 6e 74 65 72   callbacks.inter
7320: 6e 61 6c 6c 79 2e 20 54 68 65 20 64 65 66 61 75  nally. The defau
7330: 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e  lt behavior when
7340: 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 2d 70 61   the <strong>-pa
7350: 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20  ssword</strong> 
7360: 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 0a 73 70  option is not.sp
7370: 65 63 69 66 69 65 64 20 69 73 20 66 6f 72 20 54  ecified is for T
7380: 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68  LS to process th
7390: 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62  e associated lib
73a0: 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62  rary callbacks b
73b0: 79 20 61 74 74 65 6d 70 74 69 6e 67 0a 74 6f 20  y attempting.to 
73c0: 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  call <strong>tls
73d0: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f  ::password</stro
73e0: 6e 67 3e 2e 0a 54 68 65 20 64 69 66 66 65 72 65  ng>..The differe
73f0: 6e 63 65 20 62 65 74 77 65 65 6e 20 74 68 65 73  nce between thes
7400: 65 20 74 77 6f 20 62 65 68 61 76 69 6f 72 73 20  e two behaviors 
7410: 69 73 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65  is a consequence
7420: 20 6f 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 0a   of maintaining.
7430: 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69  compatibility wi
7440: 74 68 20 65 61 72 6c 69 65 72 20 69 6d 70 6c 65  th earlier imple
7450: 6d 65 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70 3e  mentations..</p>
7460: 0a 0a 3c 70 3e 0a 54 68 65 20 3c 73 74 72 6f 6e  ..<p>.The <stron
7470: 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74  g>tls::debug</st
7480: 72 6f 6e 67 3e 20 76 61 72 69 61 62 6c 65 20 70  rong> variable p
7490: 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64  rovides some add
74a0: 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c 20  itional.control 
74b0: 6f 76 65 72 20 74 68 65 73 65 20 72 65 66 65 72  over these refer
74c0: 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73 2e 20  ence callbacks. 
74d0: 20 49 74 73 20 76 61 6c 75 65 20 69 73 20 7a 65   Its value is ze
74e0: 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e 0a 48  ro by default..H
74f0: 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f  igher values pro
7500: 64 75 63 65 20 6d 6f 72 65 20 64 69 61 67 6e 6f  duce more diagno
7510: 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61 6e 64  stic output, and
7520: 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65   will also force
7530: 20 74 68 65 0a 76 65 72 69 66 79 20 6d 65 74 68   the.verify meth
7540: 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67 3e 74 6c  od in <strong>tl
7550: 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72  s::callback</str
7560: 6f 6e 67 3e 20 74 6f 20 61 63 63 65 70 74 20 74  ong> to accept t
7570: 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20  he.certificate, 
7580: 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 73 20  even when it is 
7590: 69 6e 76 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a 3c  invalid..</p>..<
75a0: 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20  p>.<em>.The use 
75b0: 6f 66 20 74 68 65 20 72 65 66 65 72 65 6e 63 65  of the reference
75c0: 20 63 61 6c 6c 62 61 63 6b 73 20 3c 73 74 72 6f   callbacks <stro
75d0: 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b  ng>tls::callback
75e0: 3c 2f 73 74 72 6f 6e 67 3e 2c 0a 3c 73 74 72 6f  </strong>,.<stro
75f0: 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64  ng>tls::password
7600: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 20 3c  </strong>, and <
7610: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 61 6c 69  strong>tls::vali
7620: 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74  date_command</st
7630: 72 6f 6e 67 3e 0a 69 73 20 6e 6f 74 20 72 65 63  rong>.is not rec
7640: 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 79 20  ommended.  They 
7650: 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 20 66  may be removed f
7660: 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65 61  rom future relea
7670: 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e 0a  ses..</em>.</p>.
7680: 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75 73  .<p>.<em>.The us
7690: 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c  e of the variabl
76a0: 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 64  e <strong>tls::d
76b0: 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69 73  ebug</strong> is
76c0: 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64   not recommended
76d0: 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d 6f  ..It may be remo
76e0: 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65 20  ved from future 
76f0: 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a  releases..</em>.
7700: 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d  </p>..<h3><a nam
7710: 65 3d 22 44 45 42 55 47 22 3e 44 45 42 55 47 3c  e="DEBUG">DEBUG<
7720: 2f 61 3e 3c 2f 68 33 3e 0a 0a 54 4c 53 20 6b 65  /a></h3>..TLS ke
7730: 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62 65  y logging can be
7740: 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74 74   enabled by sett
7750: 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e 6d  ing the environm
7760: 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62 3e  ent variable.<b>
7770: 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f 62  SSLKEYLOGFILE</b
7780: 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66  > to the name of
7790: 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f 67   the file to log
77a0: 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e 65 76   to. Then whenev
77b0: 65 72 20 54 4c 53 0a 6b 65 79 20 6d 61 74 65 72  er TLS.key mater
77c0: 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74 65 64  ial is generated
77d0: 20 6f 72 20 72 65 63 65 69 76 65 64 20 69 74 20   or received it 
77e0: 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20 74  will be logged t
77f0: 6f 20 74 68 65 20 66 69 6c 65 2e 20 54 68 69 73  o the file. This
7800: 0a 69 73 20 75 73 65 66 75 6c 20 66 6f 72 20 6c  .is useful for l
7810: 6f 67 67 69 6e 67 20 6b 65 79 20 64 61 74 61 20  ogging key data 
7820: 66 6f 72 20 6e 65 74 77 6f 72 6b 20 6c 6f 67 67  for network logg
7830: 69 6e 67 20 74 6f 6f 6c 73 20 74 6f 20 75 73 65  ing tools to use
7840: 20 74 6f 0a 64 65 63 72 79 70 74 20 74 68 65 20   to.decrypt the 
7850: 64 61 74 61 2e 0a 0a 3c 68 33 3e 3c 61 20 6e 61  data...<h3><a na
7860: 6d 65 3d 22 48 54 54 50 53 20 45 58 41 4d 50 4c  me="HTTPS EXAMPL
7870: 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c 45  E">HTTPS EXAMPLE
7880: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68  </a></h3>..<p>Th
7890: 69 73 20 65 78 61 6d 70 6c 65 20 75 73 65 73 20  is example uses 
78a0: 61 20 73 61 6d 70 6c 65 20 73 65 72 76 65 72 2e  a sample server.
78b0: 70 65 6d 20 70 72 6f 76 69 64 65 64 20 77 69 74  pem provided wit
78c0: 68 20 74 68 65 20 54 4c 53 20 72 65 6c 65 61 73  h the TLS releas
78d0: 65 2c 0a 63 6f 75 72 74 65 73 79 20 6f 66 20 74  e,.courtesy of t
78e0: 68 65 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53  he <strong>OpenS
78f0: 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20 70 72 6f 6a  SL</strong> proj
7900: 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70 72 65 3e 3c  ect.</p>..<pre><
7910: 63 6f 64 65 3e 0a 70 61 63 6b 61 67 65 20 72 65  code>.package re
7920: 71 75 69 72 65 20 68 74 74 70 0a 70 61 63 6b 61  quire http.packa
7930: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 0a 0a  ge require tls..
7940: 68 74 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68  http::register h
7950: 74 74 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a  ttps 443 [list :
7960: 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75  :tls::socket -au
7970: 74 6f 73 65 72 76 65 72 6e 61 6d 65 20 74 72 75  toservername tru
7980: 65 20 2d 72 65 71 75 69 72 65 20 74 72 75 65 20  e -require true 
7990: 2d 63 61 64 69 72 20 2f 65 74 63 2f 73 73 6c 2f  -cadir /etc/ssl/
79a0: 63 65 72 74 73 5d 0a 0a 73 65 74 20 74 6f 6b 20  certs]..set tok 
79b0: 5b 68 74 74 70 3a 3a 67 65 74 75 72 6c 20 68 74  [http::geturl ht
79c0: 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74 6b  tps://www.tcl.tk
79d0: 2f 5d 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e  /].</code></pre>
79e0: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53  ..<h3><a name="S
79f0: 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41  PECIAL CONSIDERA
7a00: 54 49 4f 4e 53 22 3e 53 50 45 43 49 41 4c 20 43  TIONS">SPECIAL C
7a10: 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61  ONSIDERATIONS</a
7a20: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 65 20 63  ></h3>..<p>The c
7a30: 61 70 61 62 69 6c 69 74 69 65 73 20 6f 66 20 74  apabilities of t
7a40: 68 69 73 20 70 61 63 6b 61 67 65 20 63 61 6e 20  his package can 
7a50: 76 61 72 79 20 65 6e 6f 72 6d 6f 75 73 6c 79 20  vary enormously 
7a60: 62 61 73 65 64 20 75 70 6f 6e 20 68 6f 77 20 79  based upon how y
7a70: 6f 75 72 0a 4f 70 65 6e 53 53 4c 20 6c 69 62 72  our.OpenSSL libr
7a80: 61 72 79 20 77 61 73 20 63 6f 6e 66 69 67 75 72  ary was configur
7a90: 65 64 20 61 6e 64 20 62 75 69 6c 74 2e 20 4e 65  ed and built. Ne
7aa0: 77 20 76 65 72 73 69 6f 6e 73 20 6d 61 79 20 6f  w versions may o
7ab0: 62 73 6f 6c 65 74 65 20 6f 6c 64 65 72 0a 70 72  bsolete older.pr
7ac0: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 73 2c  otocol versions,
7ad0: 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 20 63   add or remove c
7ae0: 69 70 68 65 72 73 2c 20 63 68 61 6e 67 65 20 64  iphers, change d
7af0: 65 66 61 75 6c 74 20 76 61 6c 75 65 73 2c 20 65  efault values, e
7b00: 74 63 2e 20 55 73 65 20 74 68 65 0a 3c 73 74 72  tc. Use the.<str
7b10: 6f 6e 67 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73  ong>tls::ciphers
7b20: 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 20 3c 73  </strong> and <s
7b30: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74 6f  trong>tls::proto
7b40: 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 63 6f  cols</strong> co
7b50: 6d 6d 61 6e 64 73 20 74 6f 0a 6f 62 74 61 69 6e  mmands to.obtain
7b60: 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 20 76   the supported v
7b70: 65 72 73 69 6f 6e 73 2e 3c 2f 70 3e 0a 0a 3c 68  ersions.</p>..<h
7b80: 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 45 45 20 41  3><a name="SEE A
7b90: 4c 53 4f 22 3e 53 45 45 20 41 4c 53 4f 3c 2f 61  LSO">SEE ALSO</a
7ba0: 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f  ></h3>..<p><stro
7bb0: 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e  ng>socket</stron
7bc0: 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 6c 65  g>, <strong>file
7bd0: 65 76 65 6e 74 2c 20 3c 2f 73 74 72 6f 6e 67 3e  event, </strong>
7be0: 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a.href="http://
7bf0: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f  www.openssl.org/
7c00: 22 3e 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53  "><strong>OpenSS
7c10: 4c 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f  L</strong></a></
7c20: 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c 70 72 65 3e 0a  p>..<hr>..<pre>.
7c30: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b  Copyright &copy;
7c40: 20 31 39 39 39 20 4d 61 74 74 20 4e 65 77 6d 61   1999 Matt Newma
7c50: 6e 2e 0a 43 6f 70 79 72 69 67 68 74 20 26 63 6f  n..Copyright &co
7c60: 70 79 3b 20 32 30 30 34 20 53 74 61 72 66 69 73  py; 2004 Starfis
7c70: 68 20 53 79 73 74 65 6d 73 2e 0a 3c 2f 70 72 65  h Systems..</pre
7c80: 3e 0a 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c  >.</body>.</html
7c90: 3e 0a                                            >.