0000: 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 0a  <!DOCTYPE html>.
0010: 3c 68 74 6d 6c 20 6c 61 6e 67 3d 22 65 6e 22 3e  <html lang="en">
0020: 0a 3c 68 65 61 64 3e 0a 3c 6d 65 74 61 20 68 74  .<head>.<meta ht
0030: 74 70 2d 65 71 75 69 76 3d 22 43 6f 6e 74 65 6e  tp-equiv="Conten
0040: 74 2d 54 79 70 65 22 20 63 6f 6e 74 65 6e 74 3d  t-Type" content=
0050: 22 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72  "text/html; char
0060: 73 65 74 3d 75 74 66 2d 38 22 3e 0a 3c 6d 65 74  set=utf-8">.<met
0070: 61 20 6e 61 6d 65 3d 22 43 6f 70 79 72 69 67 68  a name="Copyrigh
0080: 74 22 20 63 6f 6e 74 65 6e 74 3d 22 31 39 39 39  t" content="1999
0090: 20 4d 61 74 74 20 4e 65 77 6d 61 6e 20 2f 20 32   Matt Newman / 2
00a0: 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73  004 Starfish Sys
00b0: 74 65 6d 73 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c  tems">.<title>TL
00c0: 53 20 28 53 53 4c 29 20 54 43 4c 20 43 6f 6d 6d  S (SSL) TCL Comm
00d0: 61 6e 64 73 3c 2f 74 69 74 6c 65 3e 0a 3c 6c 69  ands</title>.<li
00e0: 6e 6b 20 72 65 6c 3d 22 73 74 79 6c 65 73 68 65  nk rel="styleshe
00f0: 65 74 22 20 68 72 65 66 3d 22 64 6f 63 73 2e 63  et" href="docs.c
0100: 73 73 22 20 74 79 70 65 3d 22 74 65 78 74 2f 63  ss" type="text/c
0110: 73 73 22 20 6d 65 64 69 61 3d 22 61 6c 6c 22 3e  ss" media="all">
0120: 0a 3c 2f 68 65 61 64 3e 0a 0a 3c 62 6f 64 79 20  .</head>..<body 
0130: 63 6c 61 73 73 3d 22 76 73 63 2d 69 6e 69 74 69  class="vsc-initi
0140: 61 6c 69 7a 65 64 22 3e 0a 0a 3c 68 32 3e 54 43  alized">..<h2>TC
0150: 4c 20 54 6c 73 20 45 78 74 65 6e 73 69 6f 6e 20  L Tls Extension 
0160: 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 3c 2f 68  Documentation</h
0170: 32 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 64  2>..<dl>.    <dd
0180: 3e 3c 61 20 68 72 65 66 3d 22 23 4e 41 4d 45 22  ><a href="#NAME"
0190: 3e 4e 41 4d 45 3c 2f 61 3e 0a 20 20 20 20 3c 64  >NAME</a>.    <d
01a0: 6c 3e 0a 09 3c 64 64 3e 3c 62 3e 74 6c 73 3c 2f  l>..<dd><b>tls</
01b0: 62 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20  b> - binding to 
01c0: 3c 62 3e 4f 70 65 6e 53 53 4c 3c 2f 62 3e 20 6c  <b>OpenSSL</b> l
01d0: 69 62 72 61 72 79 0a 09 66 6f 72 20 65 6e 63 72  ibrary..for encr
01e0: 79 70 74 65 64 20 73 6f 63 6b 65 74 20 61 6e 64  ypted socket and
01f0: 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20 63 6f 6d   I/O channel com
0200: 6d 75 6e 69 63 61 74 69 6f 6e 73 2e 3c 2f 64 64  munications.</dd
0210: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 20 20 20 20  >.    </dl>.    
0220: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61  </dd>.    <dd><a
0230: 20 68 72 65 66 3d 22 23 53 59 4e 4f 50 53 49 53   href="#SYNOPSIS
0240: 22 3e 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 20 3c  ">SYNOPSIS</a> <
0250: 2f 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 64 6c  /dd>.    <dd><dl
0260: 3e 0a 09 3c 64 64 3e 3c 62 3e 70 61 63 6b 61 67  >..<dd><b>packag
0270: 65 20 72 65 71 75 69 72 65 20 54 63 6c 3c 2f 62  e require Tcl</b
0280: 3e 20 3c 65 6d 3e 3f 3c 62 3e 38 2e 35 2d 3c 2f  > <em>?<b>8.5-</
0290: 62 3e 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c  b>?</em></dd>..<
02a0: 64 64 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72 65  dd><b>package re
02b0: 71 75 69 72 65 20 74 6c 73 3c 2f 62 3e 20 3c 65  quire tls</b> <e
02c0: 6d 3e 3f 3c 62 3e 31 2e 38 2d 3c 2f 62 3e 3f 3c  m>?<b>1.8-</b>?<
02d0: 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 26  /em></dd>..<dt>&
02e0: 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09 3c 64 64 3e  nbsp;</dt>..<dd>
02f0: 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e  <b>tls::init</b>
0300: 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f   <em>?options?</
0310: 65 6d 3e 20 3c 2f 64 64 3e 0a 09 3c 64 64 3e 3c  em> </dd>..<dd><
0320: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62  b>tls::socket</b
0330: 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 20  > <em>?options? 
0340: 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f  host port</em></
0350: 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74 6c 73 3a  dd>..<dd><b>tls:
0360: 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e  :socket</b> <em>
0370: 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64  ?-server command
0380: 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74  ? ?options? port
0390: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c 64 64 3e  </em></dd>..<dd>
03a0: 3c 62 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b  <b>tls::handshak
03b0: 65 3c 2f 62 3e 20 3c 65 6d 3e 20 63 68 61 6e 6e  e</b> <em> chann
03c0: 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c 64  el</em></dd>..<d
03d0: 64 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61 74 75 73  d><b>tls::status
03e0: 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d 6c 6f 63 61 6c  </b> <em>?-local
03f0: 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f  ? channel</em></
0400: 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74 6c 73 3a  dd>..<dd><b>tls:
0410: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 62 3e 20  :connection</b> 
0420: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  <em>channel</em>
0430: 3c 2f 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74 6c  </dd>..<dd><b>tl
0440: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65  s::import</b> <e
0450: 6d 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f  m>channel ?optio
0460: 6e 73 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c  ns?</em></dd>..<
0470: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70  dd><b>tls::unimp
0480: 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e  ort</b> <em>chan
0490: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 3c  nel</em></dd>..<
04a0: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 09  dt> </dt>..
04b0: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68  <dd><b>tls::ciph
04c0: 65 72 73 3c 2f 62 3e 20 3c 65 6d 3e 3f 70 72 6f  ers</b> <em>?pro
04d0: 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f  tocol? ?verbose?
04e0: 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f 65 6d   ?supported?</em
04f0: 3e 3c 2f 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74  ></dd>..<dd><b>t
0500: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 62  ls::protocols</b
0510: 3e 3c 2f 64 64 3e 0a 09 3c 64 64 3e 3c 62 3e 74  ></dd>..<dd><b>t
0520: 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c  ls::version</b><
0530: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 3c 2f  /dd>.    </dl></
0540: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68  dd>.    <dd><a h
0550: 72 65 66 3d 22 23 43 4f 4d 4d 41 4e 44 53 22 3e  ref="#COMMANDS">
0560: 43 4f 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 64 64  COMMANDS</a></dd
0570: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65  >.    <dd><a hre
0580: 66 3d 22 23 43 45 52 54 49 46 49 43 41 54 45 20  f="#CERTIFICATE 
0590: 56 41 4c 49 44 41 54 49 4f 4e 22 3e 43 45 52 54  VALIDATION">CERT
05a0: 49 46 49 43 41 54 45 20 56 41 4c 49 44 41 54 49  IFICATE VALIDATI
05b0: 4f 4e 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20  ON</a></dd>.    
05c0: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 41  <dd><a href="#CA
05d0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e  LLBACK OPTIONS">
05e0: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53  CALLBACK OPTIONS
05f0: 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64  </a></dd>.    <d
0600: 64 3e 3c 61 20 68 72 65 66 3d 22 23 44 45 42 55  d><a href="#DEBU
0610: 47 22 3e 44 45 42 55 47 3c 2f 61 3e 3c 2f 64 64  G">DEBUG</a></dd
0620: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65  >.    <dd><a hre
0630: 66 3d 22 23 48 54 54 50 53 20 45 58 41 4d 50 4c  f="#HTTPS EXAMPL
0640: 45 22 3e 48 54 54 50 53 20 45 58 41 4d 50 4c 45  E">HTTPS EXAMPLE
0650: 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64  </a></dd>.    <d
0660: 64 3e 3c 61 20 68 72 65 66 3d 22 23 53 50 45 43  d><a href="#SPEC
0670: 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f  IAL CONSIDERATIO
0680: 4e 53 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53  NS">SPECIAL CONS
0690: 49 44 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f  IDERATIONS</a></
06a0: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68  dd>.    <dd><a h
06b0: 72 65 66 3d 22 23 53 65 65 20 41 6c 73 6f 22 3e  ref="#See Also">
06c0: 53 65 65 20 41 6c 73 6f 3c 2f 61 3e 3c 2f 64 64  See Also</a></dd
06d0: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65  >.    <dd><a hre
06e0: 66 3d 22 23 4b 45 59 57 4f 52 44 53 22 3e 4b 45  f="#KEYWORDS">KE
06f0: 59 57 4f 52 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a  YWORDS</a></dd>.
0700: 3c 2f 64 6c 3e 0a 3c 62 72 3e 0a 0a 3c 68 72 3e  </dl>.<br>..<hr>
0710: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 4e  ..<h3><a name="N
0720: 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61 3e 3c 2f 68  AME">NAME</a></h
0730: 33 3e 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 3e 74  3>..<p><strong>t
0740: 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20 2d 20 62 69  ls</strong> - bi
0750: 6e 64 69 6e 67 20 74 6f 20 3c 73 74 72 6f 6e 67  nding to <strong
0760: 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67  >OpenSSL</strong
0770: 3e 20 6c 69 62 72 61 72 79 0a 66 6f 72 20 65 6e  > library.for en
0780: 63 72 79 70 74 65 64 20 73 6f 63 6b 65 74 20 61  crypted socket a
0790: 6e 64 20 49 2f 4f 20 63 68 61 6e 6e 65 6c 20 63  nd I/O channel c
07a0: 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 2e 3c 2f  ommunications.</
07b0: 70 3e 0a 3c 62 72 3e 0a 0a 3c 68 72 3e 0a 0a 3c  p>.<br>..<hr>..<
07c0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 59 4e 4f  h3><a name="SYNO
07d0: 50 53 49 53 22 3e 53 59 4e 4f 50 53 49 53 3c 2f  PSIS">SYNOPSIS</
07e0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 62 3e 70  a></h3>..<p><b>p
07f0: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 54  ackage require T
0800: 63 6c 3c 2f 62 3e 20 3c 65 6d 3e 3f 3c 62 3e 38  cl</b> <em>?<b>8
0810: 2e 35 2d 3c 2f 62 3e 3f 3c 2f 65 6d 3e 3c 62 72  .5-</b>?</em><br
0820: 3e 0a 3c 62 3e 70 61 63 6b 61 67 65 20 72 65 71  >.<b>package req
0830: 75 69 72 65 20 74 6c 73 3c 2f 62 3e 20 3c 65 6d  uire tls</b> <em
0840: 3e 3f 3c 62 3e 31 2e 38 2d 3c 2f 62 3e 3f 3c 2f  >?<b>1.8-</b>?</
0850: 65 6d 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20  em><br>.<br>.<a 
0860: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6e 69 74  href="#tls::init
0870: 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f  "><b>tls::init</
0880: 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c  b> <i>?options?<
0890: 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68  /i></a><br>.<a h
08a0: 72 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b 65  ref="#tls::socke
08b0: 74 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65  t"><b>tls::socke
08c0: 74 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e  t</b> <i>?option
08d0: 73 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f 69 3e  s? host port</i>
08e0: 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74  <br>.<a href="#t
08f0: 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74  ls::socket"><b>t
0900: 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c  ls::socket</b> <
0910: 69 3e 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61  i>?-server comma
0920: 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f  nd? ?options? po
0930: 72 74 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c  rt</i></a><br>.<
0940: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74  a href="#tls::st
0950: 61 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74  atus"><b>tls::st
0960: 61 74 75 73 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f  atus</b> <i>?-lo
0970: 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e  cal? channel</i>
0980: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66  </a><br>.<a href
0990: 3d 22 23 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69  ="#tls::connecti
09a0: 6f 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e  on"><b>tls::conn
09b0: 65 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68  ection</b> <i>ch
09c0: 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72  annel</i></a><br
09d0: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a  >.<a href="#tls:
09e0: 3a 68 61 6e 64 73 68 61 6b 65 22 3e 3c 62 3e 74  :handshake"><b>t
09f0: 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62  ls::handshake</b
0a00: 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e  > <i>channel</i>
0a10: 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66  </a><br>.<a href
0a20: 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e  ="#tls::import">
0a30: 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f  <b>tls::import</
0a40: 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f  b> <i>channel ?o
0a50: 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c  ptions?</i></a><
0a60: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
0a70: 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e  s::unimport"><b>
0a80: 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62  tls::unimport</b
0a90: 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e  > <i>channel</i>
0aa0: 3c 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61  </a><br>.<br>.<a
0ab0: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 69 70   href="#tls::cip
0ac0: 68 65 72 73 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69  hers"><b>tls::ci
0ad0: 70 68 65 72 73 3c 2f 62 3e 20 3c 69 3e 3f 70 72  phers</b> <i>?pr
0ae0: 6f 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65  otocol? ?verbose
0af0: 3f 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f 69  ? ?supported?</i
0b00: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65  ></a><br>.<a hre
0b10: 66 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f  f="#tls::protoco
0b20: 6c 73 22 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74  ls"><b>tls::prot
0b30: 6f 63 6f 6c 73 3c 2f 62 3e 3c 2f 61 3e 3c 62 72  ocols</b></a><br
0b40: 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a  >.<a href="#tls:
0b50: 3a 76 65 72 73 69 6f 6e 22 3e 3c 62 3e 74 6c 73  :version"><b>tls
0b60: 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62 3e 3c 2f 61  ::version</b></a
0b70: 3e 3c 62 72 3e 0a 3c 2f 70 3e 0a 3c 62 72 3e 0a  ><br>.</p>.<br>.
0b80: 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61  .<hr>..<h3><a na
0b90: 6d 65 3d 22 44 45 53 43 52 49 50 54 49 4f 4e 22  me="DESCRIPTION"
0ba0: 3e 44 45 53 43 52 49 50 54 49 4f 4e 3c 2f 61 3e  >DESCRIPTION</a>
0bb0: 3c 2f 68 33 3e 0a 0a 3c 70 3e 54 68 69 73 20 65  </h3>..<p>This e
0bc0: 78 74 65 6e 73 69 6f 6e 20 70 72 6f 76 69 64 65  xtension provide
0bd0: 73 20 54 43 4c 20 73 63 72 69 70 74 20 61 63 63  s TCL script acc
0be0: 65 73 73 20 74 6f 20 73 65 63 75 72 65 20 73 6f  ess to secure so
0bf0: 63 6b 65 74 20 63 6f 6d 6d 75 6e 69 63 61 74 69  cket communicati
0c00: 6f 6e 73 0a 75 73 69 6e 67 20 74 68 65 20 54 72  ons.using the Tr
0c10: 61 6e 73 70 6f 72 74 20 4c 61 79 65 72 20 53 65  ansport Layer Se
0c20: 63 75 72 69 74 79 20 28 54 4c 53 29 20 70 72 6f  curity (TLS) pro
0c30: 74 6f 63 6f 6c 2e 20 49 74 20 70 72 6f 76 69 64  tocol. It provid
0c40: 65 73 20 61 20 67 65 6e 65 72 69 63 0a 62 69 6e  es a generic.bin
0c50: 64 69 6e 67 20 74 6f 20 3c 61 20 68 72 65 66 3d  ding to <a href=
0c60: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65  "https://www.ope
0c70: 6e 73 73 6c 2e 6f 72 67 2f 22 3e 4f 70 65 6e 53  nssl.org/">OpenS
0c80: 53 4c 3c 2f 61 3e 2c 20 75 74 69 6c 69 7a 69 6e  SL</a>, utilizin
0c90: 67 20 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 54 63  g the.<strong>Tc
0ca0: 6c 5f 53 74 61 63 6b 43 68 61 6e 6e 65 6c 3c 2f  l_StackChannel</
0cb0: 73 74 72 6f 6e 67 3e 20 41 50 49 20 69 6e 20 54  strong> API in T
0cc0: 43 4c 20 38 2e 34 20 61 6e 64 20 68 69 67 68 65  CL 8.4 and highe
0cd0: 72 2e 0a 54 68 65 73 65 20 73 6f 63 6b 65 74 73  r..These sockets
0ce0: 20 62 65 68 61 76 65 20 65 78 61 63 74 6c 79 20   behave exactly 
0cf0: 74 68 65 20 73 61 6d 65 20 61 73 20 63 68 61 6e  the same as chan
0d00: 6e 65 6c 73 20 63 72 65 61 74 65 64 20 75 73 69  nels created usi
0d10: 6e 67 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 0a  ng the built-in.
0d20: 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f  <strong>socket</
0d30: 73 74 72 6f 6e 67 3e 20 63 6f 6d 6d 61 6e 64 2c  strong> command,
0d40: 20 61 6c 6f 6e 67 20 77 69 74 68 20 61 64 64 69   along with addi
0d50: 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20 66  tional options f
0d60: 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 0a 74  or controlling.t
0d70: 68 65 20 53 53 4c 2f 54 4c 53 20 73 65 73 73 69  he SSL/TLS sessi
0d80: 6f 6e 2e 0a 3c 2f 70 3e 0a 3c 62 72 3e 0a 0a 3c  on..</p>.<br>..<
0d90: 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65  hr>..<h3><a name
0da0: 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d  ="COMMANDS">COMM
0db0: 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c  ANDS</a></h3>..<
0dc0: 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f 6e 65 20  p>Typically one 
0dd0: 77 6f 75 6c 64 20 75 73 65 20 74 68 65 20 3c 73  would use the <s
0de0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65  trong>tls::socke
0df0: 74 20 3c 2f 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61  t </strong>comma
0e00: 6e 64 0a 77 68 69 63 68 20 70 72 6f 76 69 64 65  nd.which provide
0e10: 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20  s compatibility 
0e20: 77 69 74 68 20 74 68 65 20 6e 61 74 69 76 65 20  with the native 
0e30: 54 43 4c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b  TCL <strong>sock
0e40: 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d  et</strong>.comm
0e50: 61 6e 64 2e 20 49 6e 20 73 75 63 68 20 63 61 73  and. In such cas
0e60: 65 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  es <strong>tls::
0e70: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 20  import</strong> 
0e80: 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 0a 75 73  should not be.us
0e90: 65 64 20 64 69 72 65 63 74 6c 79 2e 3c 2f 70 3e  ed directly.</p>
0ea0: 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61  .<dl>.    <dt><a
0eb0: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69 74   name="tls::init
0ec0: 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 20 3c  "><b>tls::init <
0ed0: 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c  /b><i>?options?<
0ee0: 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20  /i></a></dt>.   
0ef0: 20 3c 64 64 3e 4f 70 74 69 6f 6e 61 6c 20 66 75   <dd>Optional fu
0f00: 6e 63 74 69 6f 6e 20 74 6f 20 73 65 74 20 74 68  nction to set th
0f10: 65 20 64 65 66 61 75 6c 74 20 6f 70 74 69 6f 6e  e default option
0f20: 73 20 75 73 65 64 20 62 79 0a 09 3c 73 74 72 6f  s used by..<stro
0f30: 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f  ng>tls::socket</
0f40: 73 74 72 6f 6e 67 3e 2e 20 49 66 20 79 6f 75 20  strong>. If you 
0f50: 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  call <strong>tls
0f60: 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67  ::import</strong
0f70: 3e 0a 09 64 69 72 65 63 74 6c 79 2c 20 74 68 69  >..directly, thi
0f80: 73 20 63 6f 6d 6d 61 6e 64 20 68 61 73 20 6e 6f  s command has no
0f90: 20 65 66 66 65 63 74 2e 20 54 68 69 73 20 63 6f   effect. This co
0fa0: 6d 6d 61 6e 64 20 73 75 70 70 6f 72 74 73 20 61  mmand supports a
0fb0: 6c 6c 20 6f 66 20 74 68 65 0a 09 73 61 6d 65 20  ll of the..same 
0fc0: 6f 70 74 69 6f 6e 73 20 61 73 20 74 68 65 20 3c  options as the <
0fd0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b  strong>tls::sock
0fe0: 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 63 6f 6d 6d  et</strong> comm
0ff0: 61 6e 64 2c 20 74 68 6f 75 67 68 20 79 6f 75 0a  and, though you.
1000: 09 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20 79 6f  .should limit yo
1010: 75 72 20 6f 70 74 69 6f 6e 73 20 74 6f 20 6f 6e  ur options to on
1020: 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20 6f  ly TLS related o
1030: 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64  nes.</dd>.    <d
1040: 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20 20  t> </dt>.  
1050: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
1060: 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74  ls::socket"><b>t
1070: 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e 3c  ls::socket </b><
1080: 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 09 68 6f  em>?options?..ho
1090: 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 61 3e  st port</em></a>
10a0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 62  </dt>.    <dt><b
10b0: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
10c0: 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f  <em> ?-server co
10d0: 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f  mmand? ?options?
10e0: 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a   port</em></dt>.
10f0: 20 20 20 20 3c 64 64 3e 54 68 69 73 20 69 73 20      <dd>This is 
1100: 61 20 68 65 6c 70 65 72 20 66 75 6e 63 74 69 6f  a helper functio
1110: 6e 20 74 68 61 74 20 75 74 69 6c 69 7a 65 73 20  n that utilizes 
1120: 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 63  the underlying c
1130: 6f 6d 6d 61 6e 64 73 0a 09 28 3c 73 74 72 6f 6e  ommands..(<stron
1140: 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67  g>socket</strong
1150: 3e 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74 6c  > and <strong>tl
1160: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e  s::import</stron
1170: 67 3e 29 20 74 6f 20 63 72 65 61 74 65 0a 09 74  g>) to create..t
1180: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 20 49  he connection. I
1190: 74 20 62 65 68 61 76 65 73 20 74 68 65 20 73 61  t behaves the sa
11a0: 6d 65 20 61 73 20 74 68 65 20 6e 61 74 69 76 65  me as the native
11b0: 20 54 43 4c 20 3c 73 74 72 6f 6e 67 3e 73 6f 63   TCL <strong>soc
11c0: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 63 6f  ket</strong>..co
11d0: 6d 6d 61 6e 64 2c 20 62 75 74 20 61 6c 73 6f 20  mmand, but also 
11e0: 73 75 70 70 6f 72 74 73 20 74 68 65 20 3c 61 20  supports the <a 
11f0: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f  href="#tls::impo
1200: 72 74 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  rt"><strong>tls:
1210: 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 3c  import</strong><
1220: 2f 61 3e 0a 09 63 6f 6d 6d 61 6e 64 20 6f 70 74  /a>..command opt
1230: 69 6f 6e 73 20 61 6e 64 20 6f 6e 65 20 61 64 64  ions and one add
1240: 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 3a 3c  itional option:<
1250: 2f 64 64 3e 0a 20 20 20 20 3c 64 6c 3e 3c 62 6c  /dd>.    <dl><bl
1260: 6f 63 6b 71 75 6f 74 65 3e 0a 09 3c 64 74 3e 3c  ockquote>..<dt><
1270: 73 74 72 6f 6e 67 3e 2d 61 75 74 6f 73 65 72 76  strong>-autoserv
1280: 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20  ername</strong> 
1290: 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64  <em>bool</em></d
12a0: 74 3e 0a 09 3c 64 64 3e 41 75 74 6f 6d 61 74 69  t>..<dd>Automati
12b0: 63 61 6c 6c 79 20 73 65 74 20 74 68 65 20 2d 73  cally set the -s
12c0: 65 72 76 65 72 6e 61 6d 65 20 61 72 67 75 6d 65  ervername argume
12d0: 6e 74 20 74 6f 20 74 68 65 20 3c 65 6d 3e 68 6f  nt to the <em>ho
12e0: 73 74 3c 2f 65 6d 3e 0a 09 61 72 67 75 6d 65 6e  st</em>..argumen
12f0: 74 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65  t (default is <e
1300: 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 2e 3c 2f  m>false</em>).</
1310: 64 64 3e 0a 20 20 20 20 3c 2f 62 6c 6f 63 6b 71  dd>.    </blockq
1320: 75 6f 74 65 3e 3c 2f 64 6c 3e 0a 0a 20 20 20 20  uote></dl>..    
1330: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73  <dt><a name="tls
1340: 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73  ::import"><b>tls
1350: 3a 3a 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69 3e  ::import </b><i>
1360: 63 68 61 6e 6e 65 6c 0a 09 3f 6f 70 74 69 6f 6e  channel..?option
1370: 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  s?</i></a></dt>.
1380: 20 20 20 20 3c 64 64 3e 41 64 64 20 53 53 4c 2f      <dd>Add SSL/
1390: 54 4c 53 20 65 6e 63 72 79 70 74 69 6f 6e 20 74  TLS encryption t
13a0: 6f 20 61 20 72 65 67 75 6c 61 72 20 54 43 4c 20  o a regular TCL 
13b0: 63 68 61 6e 6e 65 6c 2e 20 49 74 20 6e 65 65 64  channel. It need
13c0: 0a 09 6e 6f 74 20 62 65 20 61 20 73 6f 63 6b 65  ..not be a socke
13d0: 74 2c 20 62 75 74 20 6d 75 73 74 20 70 72 6f 76  t, but must prov
13e0: 69 64 65 20 62 69 2d 64 69 72 65 63 74 69 6f 6e  ide bi-direction
13f0: 61 6c 20 66 6c 6f 77 2e 20 41 6c 73 6f 0a 09 73  al flow. Also..s
1400: 65 74 20 73 65 73 73 69 6f 6e 20 70 61 72 61 6d  et session param
1410: 65 74 65 72 73 20 66 6f 72 20 53 53 4c 20 68 61  eters for SSL ha
1420: 6e 64 73 68 61 6b 65 2e 3c 2f 64 64 3e 0a 20 20  ndshake.</dd>.  
1430: 20 20 3c 64 6c 3e 3c 62 6c 6f 63 6b 71 75 6f 74    <dl><blockquot
1440: 65 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  e>..<dt><strong>
1450: 2d 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c  -alpn</strong> <
1460: 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74  em>list</em></dt
1470: 3e 0a 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 70  >..<dd>List of p
1480: 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f 66 66 65  rotocols to offe
1490: 72 20 64 75 72 69 6e 67 20 41 70 70 6c 69 63 61  r during Applica
14a0: 74 69 6f 6e 2d 4c 61 79 65 72 0a 09 20 20 20 20  tion-Layer..    
14b0: 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f 74 69 61  Protocol Negotia
14c0: 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 20 46 6f 72  tion (ALPN). For
14d0: 20 65 78 61 6d 70 6c 65 3a 20 3c 65 6d 3e 68 32   example: <em>h2
14e0: 3c 2f 65 6d 3e 20 61 6e 64 0a 09 20 20 20 20 3c  </em> and..    <
14f0: 65 6d 3e 68 74 74 70 2f 31 2e 31 3c 2f 65 6d 3e  em>http/1.1</em>
1500: 2c 20 62 75 74 20 6e 6f 74 20 3c 65 6d 3e 68 33  , but not <em>h3
1510: 3c 2f 65 6d 3e 20 6f 72 20 3c 65 6d 3e 71 75 69  </em> or <em>qui
1520: 63 3c 2f 65 6d 3e 2e 3c 2f 64 64 3e 0a 09 3c 64  c</em>.</dd>..<d
1530: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 64 69 72  t><strong>-cadir
1540: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69  </strong> <em>di
1550: 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  r</em></dt>..<dd
1560: 3e 53 70 65 63 69 66 69 65 73 20 74 68 65 20 64  >Specifies the d
1570: 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 74  irectory where t
1580: 68 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41  he Certificate A
1590: 75 74 68 6f 72 69 74 79 20 28 43 41 29 0a 09 20  uthority (CA).. 
15a0: 20 20 20 63 65 72 74 69 66 69 63 61 74 65 73 20     certificates 
15b0: 61 72 65 20 73 74 6f 72 65 64 2e 20 54 68 65 20  are stored. The 
15c0: 64 65 66 61 75 6c 74 20 69 73 20 70 6c 61 74 66  default is platf
15d0: 6f 72 6d 20 73 70 65 63 69 66 69 63 20 61 6e 64  orm specific and
15e0: 20 63 61 6e 20 62 65 0a 09 20 20 20 20 73 65 74   can be..    set
15f0: 20 61 74 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65   at compile time
1600: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 6c 6f  . The default lo
1610: 63 61 74 69 6f 6e 20 63 61 6e 20 62 65 20 6f 76  cation can be ov
1620: 65 72 72 69 64 64 65 6e 20 76 69 61 20 74 68 65  erridden via the
1630: 0a 09 20 20 20 20 3c 62 3e 53 53 4c 5f 43 45 52  ..    <b>SSL_CER
1640: 54 5f 44 49 52 3c 2f 62 3e 20 65 6e 76 69 72 6f  T_DIR</b> enviro
1650: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 0a  nment variable..
1660: 09 20 20 20 20 53 65 65 20 3c 61 20 68 72 65 66  .    See <a href
1670: 3d 22 23 43 45 52 54 49 46 49 43 41 54 45 20 56  ="#CERTIFICATE V
1680: 41 4c 49 44 41 54 49 4f 4e 22 3e 43 45 52 54 49  ALIDATION">CERTI
1690: 46 49 43 41 54 45 20 56 41 4c 49 44 41 54 49 4f  FICATE VALIDATIO
16a0: 4e 3c 2f 61 3e 2e 3c 2f 64 64 3e 0a 09 3c 64 74  N</a>.</dd>..<dt
16b0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69 6c 65  ><strong>-cafile
16c0: 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69   </strong><em>fi
16d0: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  lename</em></dt>
16e0: 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 65 73 20  ..<dd>Specifies 
16f0: 74 68 65 20 66 69 6c 65 20 77 69 74 68 20 74 68  the file with th
1700: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75  e Certificate Au
1710: 74 68 6f 72 69 74 79 20 28 43 41 29 20 63 65 72  thority (CA) cer
1720: 74 69 66 69 63 61 74 65 73 0a 09 20 20 20 20 74  tificates..    t
1730: 6f 20 75 73 65 2e 20 54 68 65 20 64 65 66 61 75  o use. The defau
1740: 6c 74 20 69 73 20 3c 62 3e 63 65 72 74 2e 70 65  lt is <b>cert.pe
1750: 6d 3c 2f 62 3e 2c 20 69 6e 20 74 68 65 20 4f 70  m</b>, in the Op
1760: 65 6e 53 53 4c 20 64 69 72 65 63 74 6f 72 79 2e  enSSL directory.
1770: 0a 09 20 20 20 20 54 68 65 20 64 65 66 61 75 6c  ..    The defaul
1780: 74 20 66 69 6c 65 20 63 61 6e 20 62 65 20 6f 76  t file can be ov
1790: 65 72 72 69 64 64 65 6e 20 76 69 61 20 74 68 65  erridden via the
17a0: 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 46 49 4c   <b>SSL_CERT_FIL
17b0: 45 3c 2f 62 3e 0a 09 20 20 20 20 65 6e 76 69 72  E</b>..    envir
17c0: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e  onment variable.
17d0: 0a 09 20 20 20 20 53 65 65 20 3c 61 20 68 72 65  ..    See <a hre
17e0: 66 3d 22 23 43 45 52 54 49 46 49 43 41 54 45 20  f="#CERTIFICATE 
17f0: 56 41 4c 49 44 41 54 49 4f 4e 22 3e 43 45 52 54  VALIDATION">CERT
1800: 49 46 49 43 41 54 45 20 56 41 4c 49 44 41 54 49  IFICATE VALIDATI
1810: 4f 4e 3c 2f 61 3e 2e 3c 2f 64 64 3e 0a 09 3c 64  ON</a>.</dd>..<d
1820: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 73 74 6f  t><strong>-casto
1830: 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  re</strong> <em>
1840: 55 52 49 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  URI</em></dt>..<
1850: 64 64 3e 55 52 49 20 66 6f 72 20 61 20 43 65 72  dd>URI for a Cer
1860: 74 69 66 69 63 61 74 65 20 41 75 74 68 6f 72 69  tificate Authori
1870: 74 79 20 28 43 41 29 20 73 74 6f 72 65 2c 20 77  ty (CA) store, w
1880: 68 69 63 68 20 6d 61 79 20 62 65 20 61 20 73 69  hich may be a si
1890: 6e 67 6c 65 0a 09 20 20 20 20 63 6f 6e 74 61 69  ngle..    contai
18a0: 6e 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f 67  ner or a catalog
18b0: 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e 20   of containers. 
18c0: 53 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70  Starting with Op
18d0: 65 6e 53 53 4c 20 33 2e 32 20 6f 6e 0a 09 20 20  enSSL 3.2 on..  
18e0: 20 20 57 69 6e 64 6f 77 73 2c 20 73 65 74 20 74    Windows, set t
18f0: 6f 20 22 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77  o "org.openssl.w
1900: 69 6e 73 74 6f 72 65 3a 2f 2f 22 20 74 6f 20 75  instore://" to u
1910: 73 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 0a  se the built-in.
1920: 09 20 20 20 20 57 69 6e 64 6f 77 73 20 43 65 72  .    Windows Cer
1930: 74 20 53 74 6f 72 65 2e 20 54 68 65 20 57 69 6e  t Store. The Win
1940: 64 6f 77 73 20 63 65 72 74 20 73 74 6f 72 65 20  dows cert store 
1950: 6f 6e 6c 79 20 73 75 70 70 6f 72 74 73 20 72 6f  only supports ro
1960: 6f 74 0a 09 20 20 20 20 63 65 72 74 69 66 69 63  ot..    certific
1970: 61 74 65 20 73 74 6f 72 65 73 2e 0a 09 20 20 20  ate stores...   
1980: 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43   See <a href="#C
1990: 45 52 54 49 46 49 43 41 54 45 20 56 41 4c 49 44  ERTIFICATE VALID
19a0: 41 54 49 4f 4e 22 3e 43 45 52 54 49 46 49 43 41  ATION">CERTIFICA
19b0: 54 45 20 56 41 4c 49 44 41 54 49 4f 4e 3c 2f 61  TE VALIDATION</a
19c0: 3e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  >.</dd>..<dt><st
19d0: 72 6f 6e 67 3e 2d 63 65 72 74 66 69 6c 65 3c 2f  rong>-certfile</
19e0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65  strong> <em>file
19f0: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  name</em></dt>..
1a00: 3c 64 64 3e 53 70 65 63 69 66 69 65 73 20 74 68  <dd>Specifies th
1a10: 65 20 66 69 6c 65 20 77 69 74 68 20 74 68 65 20  e file with the 
1a20: 63 65 72 74 69 66 69 63 61 74 65 20 74 6f 20 75  certificate to u
1a30: 73 65 20 69 6e 20 50 45 4d 20 66 6f 72 6d 61 74  se in PEM format
1a40: 2e 0a 09 20 20 20 20 54 68 69 73 20 61 6c 73 6f  ...    This also
1a50: 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 70 75   contains the pu
1a60: 62 6c 69 63 20 6b 65 79 2e 3c 2f 64 64 3e 0a 09  blic key.</dd>..
1a70: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72  <dt><strong>-cer
1a80: 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  t</strong> <em>b
1a90: 69 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d  inary_string</em
1aa0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63  ></dt>..<dd>Spec
1ab0: 69 66 69 65 73 20 74 68 65 20 63 65 72 74 69 66  ifies the certif
1ac0: 69 63 61 74 65 20 74 6f 20 75 73 65 20 61 73 20  icate to use as 
1ad0: 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 73 74  a DER encoded st
1ae0: 72 69 6e 67 20 28 58 2e 35 30 39 20 44 45 52 29  ring (X.509 DER)
1af0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
1b00: 6f 6e 67 3e 2d 63 69 70 68 65 72 3c 2f 73 74 72  ong>-cipher</str
1b10: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c  ong> <em>string<
1b20: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53  /em></dt>..<dd>S
1b30: 70 65 63 69 66 69 65 73 20 74 68 65 20 6c 69 73  pecifies the lis
1b40: 74 20 6f 66 20 63 69 70 68 65 72 73 20 74 6f 20  t of ciphers to 
1b50: 75 73 65 20 66 6f 72 20 54 4c 53 20 31 2e 32 20  use for TLS 1.2 
1b60: 61 6e 64 20 65 61 72 6c 69 65 72 2e 20 53 74 72  and earlier. Str
1b70: 69 6e 67 20 69 73 20 61 0a 09 20 20 20 20 63 6f  ing is a..    co
1b80: 6c 6f 6e 20 28 22 3a 22 29 20 73 65 70 61 72 61  lon (":") separa
1b90: 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68  ted list of ciph
1ba0: 65 72 73 2e 20 43 69 70 68 65 72 73 20 63 61 6e  ers. Ciphers can
1bb0: 20 62 65 20 63 6f 6d 62 69 6e 65 64 20 75 73 69   be combined usi
1bc0: 6e 67 20 74 68 65 0a 09 20 20 20 20 3c 62 3e 2b  ng the..    <b>+
1bd0: 3c 2f 62 3e 20 63 68 61 72 61 63 74 65 72 2e 20  </b> character. 
1be0: 50 72 65 66 69 78 65 73 20 63 61 6e 20 62 65 20  Prefixes can be 
1bf0: 75 73 65 64 20 74 6f 20 70 65 72 6d 61 6e 65 6e  used to permanen
1c00: 74 6c 79 20 72 65 6d 6f 76 65 20 28 22 21 22 29  tly remove ("!")
1c10: 2c 0a 09 20 20 20 20 64 65 6c 65 74 65 20 28 22  ,..    delete ("
1c20: 2d 22 29 2c 20 6f 72 20 6d 6f 76 65 20 61 20 63  -"), or move a c
1c30: 69 70 68 65 72 20 74 6f 20 74 68 65 20 65 6e 64  ipher to the end
1c40: 20 6f 66 20 74 68 65 20 6c 69 73 74 20 28 22 2b   of the list ("+
1c50: 22 29 2e 20 4b 65 79 77 6f 72 64 73 0a 09 20 20  "). Keywords..  
1c60: 20 20 3c 62 3e 40 53 54 52 45 4e 47 54 48 3c 2f    <b>@STRENGTH</
1c70: 62 3e 20 28 73 6f 72 74 20 62 79 20 61 6c 67 6f  b> (sort by algo
1c80: 72 69 74 68 6d 20 6b 65 79 20 6c 65 6e 67 74 68  rithm key length
1c90: 29 2c 20 3c 62 3e 40 53 45 43 4c 45 56 45 4c 3d  ), <b>@SECLEVEL=
1ca0: 3c 2f 62 3e 3c 69 3e 6e 3c 2f 69 3e 0a 09 20 20  </b><i>n</i>..  
1cb0: 20 20 28 73 65 74 20 73 65 63 75 72 69 74 79 20    (set security 
1cc0: 6c 65 76 65 6c 20 74 6f 20 6e 29 2c 20 61 6e 64  level to n), and
1cd0: 20 3c 62 3e 44 45 46 41 55 4c 54 3c 2f 62 3e 20   <b>DEFAULT</b> 
1ce0: 28 75 73 65 20 64 65 66 61 75 6c 74 20 63 69 70  (use default cip
1cf0: 68 65 72 20 6c 69 73 74 2c 0a 09 20 20 20 20 61  her list,..    a
1d00: 74 20 73 74 61 72 74 20 6f 6e 6c 79 29 20 63 61  t start only) ca
1d10: 6e 20 61 6c 73 6f 20 62 65 20 73 70 65 63 69 66  n also be specif
1d20: 69 65 64 2e 20 53 65 65 20 4f 70 65 6e 53 53 4c  ied. See OpenSSL
1d30: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66   documentation f
1d40: 6f 72 20 74 68 65 0a 09 20 20 20 20 66 75 6c 6c  or the..    full
1d50: 20 6c 69 73 74 20 6f 66 20 76 61 6c 69 64 20 76   list of valid v
1d60: 61 6c 75 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74  alues.</dd>..<dt
1d70: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72  ><strong>-cipher
1d80: 73 75 69 74 65 73 3c 2f 73 74 72 6f 6e 67 3e 20  suites</strong> 
1d90: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c  <em>string</em><
1da0: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66  /dt>..<dd>Specif
1db0: 69 65 73 20 74 68 65 20 6c 69 73 74 20 6f 66 20  ies the list of 
1dc0: 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74 6f  cipher suites to
1dd0: 20 75 73 65 20 66 6f 72 20 54 4c 53 20 31 2e 33   use for TLS 1.3
1de0: 2e 20 53 74 72 69 6e 67 20 69 73 20 61 20 63 6f  . String is a co
1df0: 6c 6f 6e 0a 09 20 20 20 20 28 22 3a 22 29 20 73  lon..    (":") s
1e00: 65 70 61 72 61 74 65 64 20 6c 69 73 74 20 6f 66  eparated list of
1e10: 20 63 69 70 68 65 72 20 73 75 69 74 65 20 6e 61   cipher suite na
1e20: 6d 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  mes.</dd>..<dt><
1e30: 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c  strong>-command<
1e40: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c  /strong> <em>cal
1e50: 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  lback</em></dt>.
1e60: 09 3c 64 64 3e 53 70 65 63 69 66 69 65 73 20 74  .<dd>Specifies t
1e70: 68 65 20 63 61 6c 6c 62 61 63 6b 20 63 6f 6d 6d  he callback comm
1e80: 61 6e 64 20 74 6f 20 62 65 20 69 6e 76 6f 6b 65  and to be invoke
1e90: 64 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69  d at several poi
1ea0: 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65 0a 09  nts during the..
1eb0: 20 20 20 20 68 61 6e 64 73 68 61 6b 65 20 74 6f      handshake to
1ec0: 20 70 61 73 73 20 65 72 72 6f 72 73 2c 20 74 72   pass errors, tr
1ed0: 61 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f  acing informatio
1ee0: 6e 2c 20 61 6e 64 20 70 72 6f 74 6f 63 6f 6c 20  n, and protocol 
1ef0: 6d 65 73 73 61 67 65 73 2e 0a 09 20 20 20 20 53  messages...    S
1f00: 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43 41 4c  ee <a href="#CAL
1f10: 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43  LBACK OPTIONS">C
1f20: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c  ALLBACK OPTIONS<
1f30: 2f 61 3e 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66  /a> for more inf
1f40: 6f 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  o.</dd>..<dt><st
1f50: 72 6f 6e 67 3e 2d 64 68 70 61 72 61 6d 73 20 3c  rong>-dhparams <
1f60: 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69 6c 65  /strong><em>file
1f70: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  name</em></dt>..
1f80: 3c 64 64 3e 53 70 65 63 69 66 69 65 73 20 74 68  <dd>Specifies th
1f90: 65 20 44 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e  e Diffie-Hellman
1fa0: 20 28 44 48 29 20 70 61 72 61 6d 65 74 65 72 73   (DH) parameters
1fb0: 20 66 69 6c 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74   file.</dd>..<dt
1fc0: 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 66 69 6c  ><strong>-keyfil
1fd0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66  e</strong> <em>f
1fe0: 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74  ilename</em></dt
1ff0: 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 65 73  >..<dd>Specifies
2000: 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65 79   the private key
2010: 20 66 69 6c 65 2e 20 28 64 65 66 61 75 6c 74 20   file. (default 
2020: 69 73 20 76 61 6c 75 65 20 6f 66 20 2d 63 65 72  is value of -cer
2030: 74 66 69 6c 65 29 2e 3c 2f 64 64 3e 0a 09 3c 64  tfile).</dd>..<d
2040: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 3c 2f  t><strong>-key</
2050: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65  strong> <em>file
2060: 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  name</em></dt>..
2070: 3c 64 64 3e 53 70 65 63 69 66 69 65 73 20 74 68  <dd>Specifies th
2080: 65 20 70 72 69 76 61 74 65 20 6b 65 79 20 74 6f  e private key to
2090: 20 75 73 65 20 61 73 20 61 20 44 45 52 20 65 6e   use as a DER en
20a0: 63 6f 64 65 64 20 73 74 72 69 6e 67 20 28 50 4b  coded string (PK
20b0: 43 53 23 31 20 44 45 52 29 2e 3c 2f 64 64 3e 0a  CS#1 DER).</dd>.
20c0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6d 6f  .<dt><strong>-mo
20d0: 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  del</strong> <em
20e0: 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64  >channel</em></d
20f0: 74 3e 0a 09 3c 64 64 3e 46 6f 72 63 65 20 74 68  t>..<dd>Force th
2100: 69 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73 68  is channel to sh
2110: 61 72 65 20 74 68 65 20 73 61 6d 65 20 3c 65 6d  are the same <em
2120: 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c 5f 43 54 58  ><strong>SSL_CTX
2130: 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65 6d 3e 0a 09  </strong></em>..
2140: 20 20 20 20 73 74 72 75 63 74 75 72 65 20 61 73      structure as
2150: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c   the specified <
2160: 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c  em>channel</em>,
2170: 20 61 6e 64 0a 09 20 20 20 20 74 68 65 72 65 66   and..    theref
2180: 6f 72 65 20 73 68 61 72 65 20 63 61 6c 6c 62 61  ore share callba
2190: 63 6b 73 20 65 74 63 2e 3c 2f 64 64 3e 0a 09 3c  cks etc.</dd>..<
21a0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73  dt><strong>-pass
21b0: 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  word</strong> <e
21c0: 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c  m>callback</em><
21d0: 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66  /dt>..<dd>Specif
21e0: 69 65 73 20 74 68 65 20 63 61 6c 6c 62 61 63 6b  ies the callback
21f0: 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 76 6f   command to invo
2200: 6b 65 20 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20  ke when OpenSSL 
2210: 6e 65 65 64 73 20 74 6f 0a 09 20 20 20 20 6f 62  needs to..    ob
2220: 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e  tain a password.
2230: 20 54 68 69 73 20 69 73 20 74 79 70 69 63 61 6c   This is typical
2240: 6c 79 20 75 73 65 64 20 74 6f 20 75 6e 6c 6f 63  ly used to unloc
2250: 6b 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65  k the private ke
2260: 79 20 6f 66 0a 09 20 20 20 20 61 20 63 65 72 74  y of..    a cert
2270: 69 66 69 63 61 74 65 2e 20 54 68 65 20 63 61 6c  ificate. The cal
2280: 6c 62 61 63 6b 20 73 68 6f 75 6c 64 20 72 65 74  lback should ret
2290: 75 72 6e 20 61 20 70 61 73 73 77 6f 72 64 20 73  urn a password s
22a0: 74 72 69 6e 67 2e 0a 09 20 20 20 20 53 65 65 20  tring...    See 
22b0: 3c 61 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41  <a href="#CALLBA
22c0: 43 4b 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c  CK OPTIONS">CALL
22d0: 42 41 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e  BACK OPTIONS</a>
22e0: 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c   for more info.<
22f0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
2300: 67 3e 2d 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b  g>-post_handshak
2310: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  e</strong> <em>b
2320: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ool</em></dt>..<
2330: 64 64 3e 41 6c 6c 6f 77 20 70 6f 73 74 2d 68 61  dd>Allow post-ha
2340: 6e 64 73 68 61 6b 65 20 73 65 73 73 69 6f 6e 20  ndshake session 
2350: 74 69 63 6b 65 74 20 75 70 64 61 74 65 73 2e 3c  ticket updates.<
2360: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
2370: 67 3e 2d 72 65 71 75 65 73 74 20 3c 2f 73 74 72  g>-request </str
2380: 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ong><em>bool</em
2390: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 52 65 71 75  ></dt>..<dd>Requ
23a0: 65 73 74 20 61 20 63 65 72 74 69 66 69 63 61 74  est a certificat
23b0: 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69  e from peer duri
23c0: 6e 67 20 74 68 65 20 53 53 4c 20 68 61 6e 64 73  ng the SSL hands
23d0: 68 61 6b 65 2e 20 54 68 69 73 20 69 73 0a 09 20  hake. This is.. 
23e0: 20 20 20 6e 65 65 64 65 64 20 74 6f 20 64 6f 20     needed to do 
23f0: 63 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69  certificate vali
2400: 64 61 74 69 6f 6e 2e 20 28 64 65 66 61 75 6c 74  dation. (default
2410: 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d   is <em>true</em
2420: 3e 29 2e 0a 09 20 20 20 20 53 65 65 20 3c 61 20  >)...    See <a 
2430: 68 72 65 66 3d 22 23 43 45 52 54 49 46 49 43 41  href="#CERTIFICA
2440: 54 45 20 56 41 4c 49 44 41 54 49 4f 4e 22 3e 43  TE VALIDATION">C
2450: 45 52 54 49 46 49 43 41 54 45 20 56 41 4c 49 44  ERTIFICATE VALID
2460: 41 54 49 4f 4e 3c 2f 61 3e 2e 3c 2f 64 64 3e 0a  ATION</a>.</dd>.
2470: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65  .<dt><strong>-re
2480: 71 75 69 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  quire</strong> <
2490: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  em>bool</em></dt
24a0: 3e 0a 09 3c 64 64 3e 52 65 71 75 69 72 65 20 61  >..<dd>Require a
24b0: 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61   valid certifica
24c0: 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72  te from peer dur
24d0: 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b  ing SSL handshak
24e0: 65 2e 20 49 66 20 74 68 69 73 0a 09 20 20 20 20  e. If this..    
24f0: 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 2c 20  is set to true, 
2500: 74 68 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d 72 65  then <strong>-re
2510: 71 75 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 6d  quest</strong> m
2520: 75 73 74 20 61 6c 73 6f 20 62 65 20 73 65 74 20  ust also be set 
2530: 74 6f 0a 09 20 20 20 20 74 72 75 65 20 61 6e 64  to..    true and
2540: 20 61 20 65 69 74 68 65 72 20 61 20 2d 63 61 64   a either a -cad
2550: 69 72 2c 20 2d 63 61 66 69 6c 65 2c 20 2d 63 61  ir, -cafile, -ca
2560: 73 74 6f 72 65 2c 20 6f 72 20 70 6c 61 74 66 6f  store, or platfo
2570: 72 6d 20 64 65 66 61 75 6c 74 0a 09 20 20 20 20  rm default..    
2580: 6d 75 73 74 20 62 65 20 70 72 6f 76 69 64 65 64  must be provided
2590: 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 76 61 6c   in order to val
25a0: 69 64 61 74 65 20 61 67 61 69 6e 73 74 2e 20 28  idate against. (
25b0: 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66  default is <em>f
25c0: 61 6c 73 65 3c 2f 65 6d 3e 29 2e 0a 09 20 20 20  alse</em>)...   
25d0: 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23 43   See <a href="#C
25e0: 45 52 54 49 46 49 43 41 54 45 20 56 41 4c 49 44  ERTIFICATE VALID
25f0: 41 54 49 4f 4e 22 3e 43 45 52 54 49 46 49 43 41  ATION">CERTIFICA
2600: 54 45 20 56 41 4c 49 44 41 54 49 4f 4e 3c 2f 61  TE VALIDATION</a
2610: 3e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  >.</dd>..<dt><st
2620: 72 6f 6e 67 3e 2d 73 65 63 75 72 69 74 79 5f 6c  rong>-security_l
2630: 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  evel</strong> <e
2640: 6d 3e 69 6e 74 65 67 65 72 3c 2f 65 6d 3e 3c 2f  m>integer</em></
2650: 64 74 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 69  dt>..<dd>Specifi
2660: 65 73 20 74 68 65 20 73 65 63 75 72 69 74 79 20  es the security 
2670: 6c 65 76 65 6c 20 28 76 61 6c 75 65 20 66 72 6f  level (value fro
2680: 6d 20 30 20 74 6f 20 35 29 2e 20 54 68 65 20 73  m 0 to 5). The s
2690: 65 63 75 72 69 74 79 20 6c 65 76 65 6c 0a 09 20  ecurity level.. 
26a0: 20 20 20 61 66 66 65 63 74 73 20 74 68 65 20 63     affects the c
26b0: 69 70 68 65 72 20 73 75 69 74 65 20 65 6e 63 72  ipher suite encr
26c0: 79 70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d  yption algorithm
26d0: 73 2c 20 73 75 70 70 6f 72 74 65 64 20 45 43 43  s, supported ECC
26e0: 20 63 75 72 76 65 73 2c 0a 09 20 20 20 20 73 75   curves,..    su
26f0: 70 70 6f 72 74 65 64 20 73 69 67 6e 61 74 75 72  pported signatur
2700: 65 20 61 6c 67 6f 72 69 74 68 6d 73 2c 20 44 48  e algorithms, DH
2710: 20 70 61 72 61 6d 65 74 65 72 20 73 69 7a 65 73   parameter sizes
2720: 2c 20 63 65 72 74 69 66 69 63 61 74 65 20 6b 65  , certificate ke
2730: 79 0a 09 20 20 20 20 73 69 7a 65 73 20 61 6e 64  y..    sizes and
2740: 20 73 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72   signature algor
2750: 69 74 68 6d 73 2e 20 54 68 65 20 64 65 66 61 75  ithms. The defau
2760: 6c 74 20 69 73 20 31 20 70 72 69 6f 72 20 74 6f  lt is 1 prior to
2770: 20 4f 70 65 6e 53 53 4c 20 33 2e 32 0a 09 20 20   OpenSSL 3.2..  
2780: 20 20 61 6e 64 20 32 20 74 68 65 72 65 61 66 74    and 2 thereaft
2790: 65 72 2e 20 4c 65 76 65 6c 20 33 20 61 6e 64 20  er. Level 3 and 
27a0: 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 20 73  higher disable s
27b0: 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73 69  upport for sessi
27c0: 6f 6e 0a 09 20 20 20 20 74 69 63 6b 65 74 73 20  on..    tickets 
27d0: 61 6e 64 20 6f 6e 6c 79 20 61 63 63 65 70 74 20  and only accept 
27e0: 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74 68  cipher suites th
27f0: 61 74 20 70 72 6f 76 69 64 65 20 66 6f 72 77 61  at provide forwa
2800: 72 64 20 73 65 63 72 65 63 79 2e 3c 2f 64 64 3e  rd secrecy.</dd>
2810: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73  ..<dt><strong>-s
2820: 65 72 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c  erver</strong> <
2830: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  em>bool</em></dt
2840: 3e 0a 09 3c 64 64 3e 53 70 65 63 69 66 69 65 73  >..<dd>Specifies
2850: 20 77 68 65 74 68 65 72 20 74 6f 20 61 63 74 20   whether to act 
2860: 61 73 20 61 20 73 65 72 76 65 72 20 61 6e 64 20  as a server and 
2870: 72 65 73 70 6f 6e 64 20 77 69 74 68 20 61 20 73  respond with a s
2880: 65 72 76 65 72 0a 09 20 20 20 20 68 61 6e 64 73  erver..    hands
2890: 68 61 6b 65 20 77 68 65 6e 20 61 20 63 6c 69 65  hake when a clie
28a0: 6e 74 20 63 6f 6e 6e 65 63 74 73 20 61 6e 64 20  nt connects and 
28b0: 70 72 6f 76 69 64 65 73 20 61 20 63 6c 69 65 6e  provides a clien
28c0: 74 20 68 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20  t handshake...  
28d0: 20 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65    (default is <e
28e0: 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64  m>false</em>)</d
28f0: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
2900: 2d 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72  -servername</str
2910: 6f 6e 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65  ong> <em>host</e
2920: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 70 65  m></dt>..<dd>Spe
2930: 63 69 66 79 20 73 65 72 76 65 72 27 73 20 68 6f  cify server's ho
2940: 73 74 6e 61 6d 65 2e 20 54 68 69 73 20 69 73 20  stname. This is 
2950: 75 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 20  used to set the 
2960: 54 4c 53 20 53 65 72 76 65 72 20 4e 61 6d 65 0a  TLS Server Name.
2970: 09 20 20 20 20 49 6e 64 69 63 61 74 69 6f 6e 20  .    Indication 
2980: 28 53 4e 49 29 20 65 78 74 65 6e 73 69 6f 6e 2e  (SNI) extension.
2990: 20 53 65 74 20 74 68 69 73 20 74 6f 20 74 68 65   Set this to the
29a0: 20 65 78 70 65 63 74 65 64 20 73 65 72 76 65 72   expected server
29b0: 6e 61 6d 65 20 69 6e 20 74 68 65 0a 09 20 20 20  name in the..   
29c0: 73 65 72 76 65 72 27 73 20 63 65 72 74 69 66 69  server's certifi
29d0: 63 61 74 65 20 6f 72 20 6f 6e 65 20 6f 66 20 74  cate or one of t
29e0: 68 65 20 73 75 62 6a 65 63 74 41 6c 74 4e 61 6d  he subjectAltNam
29f0: 65 20 61 6c 74 65 72 6e 61 74 65 73 2e 3c 2f 64  e alternates.</d
2a00: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
2a10: 2d 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72  -session_id</str
2a20: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c  ong> <em>string<
2a30: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53  /em></dt>..<dd>S
2a40: 70 65 63 69 66 69 65 73 20 74 68 65 20 73 65 73  pecifies the ses
2a50: 73 69 6f 6e 20 69 64 20 74 6f 20 72 65 73 75 6d  sion id to resum
2a60: 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a  e session.</dd>.
2a70: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73  .<dt><strong>-ss
2a80: 6c 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  l2</strong> <em>
2a90: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  bool</em></dt>..
2aa0: 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f  <dd>Enable use o
2ab0: 66 20 53 53 4c 20 76 32 2e 20 28 64 65 66 61 75  f SSL v2. (defau
2ac0: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c  lt is <em>false<
2ad0: 2f 65 6d 3e 29 2e 0a 09 4e 6f 74 65 3a 20 52 65  /em>)...Note: Re
2ae0: 63 65 6e 74 20 76 65 72 73 69 6f 6e 73 20 6f 66  cent versions of
2af0: 20 4f 70 65 6e 53 53 4c 20 64 6f 6e 27 74 20 73   OpenSSL don't s
2b00: 75 70 70 6f 72 74 20 53 53 4c 76 32 2e 3c 2f 64  upport SSLv2.</d
2b10: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
2b20: 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e 67 3e 3c  -ssl3 </strong><
2b30: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  em>bool</em></dt
2b40: 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73  >..<dd>Enable us
2b50: 65 20 6f 66 20 53 53 4c 20 76 33 2e 20 28 64 65  e of SSL v3. (de
2b60: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c  fault is <em>fal
2b70: 73 65 3c 2f 65 6d 3e 29 2e 0a 09 4e 6f 74 65 3a  se</em>)...Note:
2b80: 20 53 53 4c 20 76 33 20 6d 75 73 74 20 61 6c 73   SSL v3 must als
2b90: 6f 20 62 65 20 65 6e 61 62 6c 65 64 20 77 69 74  o be enabled wit
2ba0: 68 20 61 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65  h a compile time
2bb0: 20 6f 70 74 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c   option.</dd>..<
2bc0: 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31  dt>-<strong>tls1
2bd0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f  </strong> <em>bo
2be0: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  ol</em></dt>..<d
2bf0: 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20  d>Enable use of 
2c00: 54 4c 53 20 76 31 2e 20 28 64 65 66 61 75 6c 74  TLS v1. (default
2c10: 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d   is <em>true</em
2c20: 3e 29 2e 0a 09 4e 6f 74 65 3a 20 54 4c 53 20 31  >)...Note: TLS 1
2c30: 2e 30 20 6e 65 65 64 73 20 53 48 41 31 20 74 6f  .0 needs SHA1 to
2c40: 20 6f 70 65 72 61 74 65 2c 20 77 68 69 63 68 20   operate, which 
2c50: 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c  is only availabl
2c60: 65 20 69 6e 0a 09 73 65 63 75 72 69 74 79 20 6c  e in..security l
2c70: 65 76 65 6c 20 30 20 66 6f 72 20 4f 70 65 6e 20  evel 0 for Open 
2c80: 53 53 4c 20 33 2e 30 2b 2e 3c 2f 64 64 3e 0a 09  SSL 3.0+.</dd>..
2c90: 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73  <dt>-<strong>tls
2ca0: 31 2e 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  1.1</strong> <em
2cb0: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >bool</em></dt>.
2cc0: 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20  .<dd>Enable use 
2cd0: 6f 66 20 54 4c 53 20 76 31 2e 31 20 28 64 65 66  of TLS v1.1 (def
2ce0: 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65  ault is <em>true
2cf0: 3c 2f 65 6d 3e 29 2e 0a 09 4e 6f 74 65 3a 20 54  </em>)...Note: T
2d00: 4c 53 20 31 2e 31 20 6e 65 65 64 73 20 53 48 41  LS 1.1 needs SHA
2d10: 31 20 74 6f 20 6f 70 65 72 61 74 65 2c 20 77 68  1 to operate, wh
2d20: 69 63 68 20 69 73 20 6f 6e 6c 79 20 61 76 61 69  ich is only avai
2d30: 6c 61 62 6c 65 20 69 6e 0a 09 73 65 63 75 72 69  lable in..securi
2d40: 74 79 20 6c 65 76 65 6c 20 30 20 66 6f 72 20 4f  ty level 0 for O
2d50: 70 65 6e 20 53 53 4c 20 33 2e 30 2b 2e 3c 2f 64  pen SSL 3.0+.</d
2d60: 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67  d>..<dt>-<strong
2d70: 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67 3e  >tls1.2</strong>
2d80: 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f   <em>bool</em></
2d90: 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20  dt>..<dd>Enable 
2da0: 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e 32 20  use of TLS v1.2 
2db0: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
2dc0: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  true</em>)</dd>.
2dd0: 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c  .<dt>-<strong>tl
2de0: 73 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  s1.3</strong> <e
2df0: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>bool</em></dt>
2e00: 0a 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65  ..<dd>Enable use
2e10: 20 6f 66 20 54 4c 53 20 76 31 2e 33 20 28 64 65   of TLS v1.3 (de
2e20: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75  fault is <em>tru
2e30: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64  e</em>)</dd>..<d
2e40: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64  t><strong>-valid
2e50: 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f  atecommand</stro
2e60: 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b  ng> <em>callback
2e70: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
2e80: 53 70 65 63 69 66 69 65 73 20 74 68 65 20 63 61  Specifies the ca
2e90: 6c 6c 62 61 63 6b 20 63 6f 6d 6d 61 6e 64 20 74  llback command t
2ea0: 6f 20 69 6e 76 6f 6b 65 20 74 6f 20 76 61 6c 69  o invoke to vali
2eb0: 64 61 74 65 20 70 72 6f 74 6f 63 6f 6c 0a 09 20  date protocol.. 
2ec0: 20 20 20 63 6f 6e 66 69 67 20 70 61 72 61 6d 65     config parame
2ed0: 74 65 72 73 20 64 75 72 69 6e 67 20 74 68 65 20  ters during the 
2ee0: 70 72 6f 74 6f 63 6f 6c 20 6e 65 67 6f 74 69 61  protocol negotia
2ef0: 74 69 6f 6e 20 70 68 61 73 65 2e 20 54 68 69 73  tion phase. This
2f00: 20 63 61 6e 20 62 65 0a 09 20 20 20 20 75 73 65   can be..    use
2f10: 64 20 62 79 20 54 43 4c 20 73 63 72 69 70 74 73  d by TCL scripts
2f20: 20 74 6f 20 70 65 72 66 6f 72 6d 20 74 68 65 69   to perform thei
2f30: 72 20 6f 77 6e 20 63 65 72 74 69 66 69 63 61 74  r own certificat
2f40: 65 20 76 61 6c 69 64 61 74 69 6f 6e 20 74 6f 0a  e validation to.
2f50: 09 20 20 20 20 73 75 70 70 6c 65 6d 65 6e 74 20  .    supplement 
2f60: 74 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 69  the default vali
2f70: 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64 20  dation provided 
2f80: 62 79 20 4f 70 65 6e 53 53 4c 2e 20 54 68 65 20  by OpenSSL. The 
2f90: 73 63 72 69 70 74 20 6d 75 73 74 0a 09 20 20 20  script must..   
2fa0: 20 72 65 74 75 72 6e 20 61 20 62 6f 6f 6c 65 61   return a boolea
2fb0: 6e 20 74 72 75 65 20 74 6f 20 63 6f 6e 74 69 6e  n true to contin
2fc0: 75 65 20 74 68 65 20 6e 65 67 6f 74 69 61 74 69  ue the negotiati
2fd0: 6f 6e 2e 20 53 65 65 0a 09 20 20 20 20 3c 61 20  on. See..    <a 
2fe0: 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20  href="#CALLBACK 
2ff0: 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43  OPTIONS">CALLBAC
3000: 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 20 66 6f  K OPTIONS</a> fo
3010: 72 20 6d 6f 72 65 20 69 6e 66 6f 2e 3c 2f 64 64  r more info.</dd
3020: 3e 0a 20 20 20 20 3c 2f 62 6c 6f 63 6b 71 75 6f  >.    </blockquo
3030: 74 65 3e 3c 2f 64 6c 3e 0a 20 20 20 20 3c 64 74  te></dl>.    <dt
3040: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 75  ><a name="tls::u
3050: 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c 73 3a  nimport"><b>tls:
3060: 3a 75 6e 69 6d 70 6f 72 74 20 3c 2f 62 3e 3c 69  :unimport </b><i
3070: 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e  >channel</i></a>
3080: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 50 72  </dt>.    <dd>Pr
3090: 6f 76 69 64 65 64 20 66 6f 72 20 73 79 6d 6d 65  ovided for symme
30a0: 74 72 79 20 74 6f 20 3c 73 74 72 6f 6e 67 3e 74  try to <strong>t
30b0: 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f  ls::import</stro
30c0: 6e 67 3e 2c 20 74 68 69 73 0a 09 75 6e 73 74 61  ng>, this..unsta
30d0: 63 6b 73 20 74 68 65 20 65 6e 63 72 79 70 74 69  cks the encrypti
30e0: 6f 6e 20 6f 66 20 61 20 72 65 67 75 6c 61 72 20  on of a regular 
30f0: 54 43 4c 20 63 68 61 6e 6e 65 6c 2e 20 41 6e 20  TCL channel. An 
3100: 65 72 72 6f 72 0a 09 69 73 20 74 68 72 6f 77 6e  error..is thrown
3110: 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74 20 74   if TLS is not t
3120: 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64 20 63  he top stacked c
3130: 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 64  hannel type.</dd
3140: 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b  >.    <dt> 
3150: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61  </dt>.    <dt><a
3160: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e 64   name="tls::hand
3170: 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e 74  shake"><strong>t
3180: 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 73  ls::handshake</s
3190: 74 72 6f 6e 67 3e 0a 09 3c 65 6d 3e 63 68 61 6e  trong>..<em>chan
31a0: 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74  nel</em></a></dt
31b0: 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63 65 73  >.    <dd>Forces
31c0: 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61   handshake to ta
31d0: 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 20 72 65  ke place, and re
31e0: 74 75 72 6e 73 20 30 20 69 66 0a 09 68 61 6e 64  turns 0 if..hand
31f0: 73 68 61 6b 65 20 69 73 20 73 74 69 6c 6c 20 69  shake is still i
3200: 6e 20 70 72 6f 67 72 65 73 73 20 28 6e 6f 6e 2d  n progress (non-
3210: 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20 31 20  blocking), or 1 
3220: 69 66 0a 09 74 68 65 20 68 61 6e 64 73 68 61 6b  if..the handshak
3230: 65 20 77 61 73 20 73 75 63 63 65 73 73 66 75 6c  e was successful
3240: 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73 68 61  . If the handsha
3250: 6b 65 20 66 61 69 6c 65 64 0a 09 74 68 69 73 20  ke failed..this 
3260: 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 74 68 72  routine will thr
3270: 6f 77 20 61 6e 20 65 72 72 6f 72 2e 3c 2f 64 64  ow an error.</dd
3280: 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b  >.    <dt> 
3290: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61  </dt>.    <dt><a
32a0: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 74 61 74   name="tls::stat
32b0: 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  us"><strong>tls:
32c0: 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e 67 3e  :status</strong>
32d0: 0a 09 3c 65 6d 3e 3f 3c 2f 65 6d 3e 3c 62 3e 2d  ..<em>?</em><b>-
32e0: 6c 6f 63 61 6c 3c 2f 62 3e 3c 65 6d 3e 3f 20 63  local</b><em>? c
32f0: 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c  hannel</em></a><
3300: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74  /dt>.    <dd>Ret
3310: 75 72 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74  urns the current
3320: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53   status of an SS
3330: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 20 72  L channel. The r
3340: 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 0a  esult is a list.
3350: 09 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61  .of key-value pa
3360: 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74  irs describing t
3370: 68 65 20 53 53 4c 2c 20 63 65 72 74 69 66 69 63  he SSL, certific
3380: 61 74 65 2c 20 61 6e 64 20 63 65 72 74 69 66 69  ate, and certifi
3390: 63 61 74 65 0a 09 76 65 72 69 66 69 63 61 74 69  cate..verificati
33a0: 6f 6e 20 73 74 61 74 75 73 2e 20 49 66 20 74 68  on status. If th
33b0: 65 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 20  e SSL handshake 
33c0: 68 61 73 20 6e 6f 74 20 79 65 74 20 63 6f 6d 70  has not yet comp
33d0: 6c 65 74 65 64 2c 0a 09 61 6e 20 65 6d 70 74 79  leted,..an empty
33e0: 20 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e 65   list is returne
33f0: 64 2e 20 49 66 20 3c 62 3e 2d 6c 6f 63 61 6c 3c  d. If <b>-local<
3400: 2f 62 3e 20 69 73 20 73 70 65 63 69 66 69 65 64  /b> is specified
3410: 2c 20 74 68 65 6e 20 74 68 65 0a 09 6c 6f 63 61  , then the..loca
3420: 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73  l certificate is
3430: 20 75 73 65 64 2e 3c 2f 64 64 3e 0a 20 20 20 20   used.</dd>.    
3440: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20 20  <blockquote>.   
3450: 20 3c 62 3e 53 53 4c 20 53 74 61 74 75 73 3c 2f   <b>SSL Status</
3460: 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74  b>.    <dl>..<dt
3470: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73  ><strong>alpn</s
3480: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f  trong> <em>proto
3490: 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  col</em></dt>..<
34a0: 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c 20  dd>The protocol 
34b0: 73 65 6c 65 63 74 65 64 20 61 66 74 65 72 20 41  selected after A
34c0: 70 70 6c 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72  pplication-Layer
34d0: 20 50 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 4e   Protocol..    N
34e0: 65 67 6f 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e  egotiation (ALPN
34f0: 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  ).</dd>..<dt><st
3500: 72 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72  rong>cipher</str
3510: 6f 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c  ong> <em>cipher<
3520: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54  /em></dt>..<dd>T
3530: 68 65 20 63 75 72 72 65 6e 74 20 63 69 70 68 65  he current ciphe
3540: 72 20 69 6e 20 75 73 65 20 66 6f 72 20 74 68 65  r in use for the
3550: 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09   session.</dd>..
3560: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 65 65 72  <dt><strong>peer
3570: 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  name</strong> <e
3580: 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>name</em></dt>
3590: 0a 09 3c 64 64 3e 54 68 65 20 70 65 65 72 6e 61  ..<dd>The peerna
35a0: 6d 65 20 66 72 6f 6d 20 74 68 65 20 63 65 72 74  me from the cert
35b0: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 09 3c  ificate.</dd>..<
35c0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f  dt><strong>proto
35d0: 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  col</strong> <em
35e0: 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64  >version</em></d
35f0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72 6f 74  t>..<dd>The prot
3600: 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75 73 65  ocol version use
3610: 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63  d for the connec
3620: 74 69 6f 6e 3a 0a 09 20 20 20 20 53 53 4c 32 2c  tion:..    SSL2,
3630: 20 53 53 4c 33 2c 20 54 4c 53 31 2c 20 54 4c 53   SSL3, TLS1, TLS
3640: 31 2e 31 2c 20 54 4c 53 31 2e 32 2c 20 54 4c 53  1.1, TLS1.2, TLS
3650: 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e  1.3, or unknown.
3660: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
3670: 6e 67 3e 73 62 69 74 73 3c 2f 73 74 72 6f 6e 67  ng>sbits</strong
3680: 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74  > <em>n</em></dt
3690: 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65  >..<dd>The numbe
36a0: 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20 66  r of bits used f
36b0: 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 6b  or the session k
36c0: 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ey.</dd>..<dt><s
36d0: 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 48  trong>signatureH
36e0: 61 73 68 41 6c 67 6f 72 69 74 68 6d 3c 2f 73 74  ashAlgorithm</st
36f0: 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69  rong> <em>algori
3700: 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  thm</em></dt>..<
3710: 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65  dd>The signature
3720: 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 2e   hash algorithm.
3730: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
3740: 6e 67 3e 73 69 67 6e 61 74 75 72 65 54 79 70 65  ng>signatureType
3750: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 74 79  </strong> <em>ty
3760: 70 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  pe</em></dt>..<d
3770: 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20  d>The signature 
3780: 74 79 70 65 20 76 61 6c 75 65 2e 3c 2f 64 64 3e  type value.</dd>
3790: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 76 65  ..<dt><strong>ve
37a0: 72 69 66 79 44 65 70 74 68 3c 2f 73 74 72 6f 6e  rifyDepth</stron
37b0: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64  g> <em>n</em></d
37c0: 74 3e 0a 09 3c 64 64 3e 4d 61 78 69 6d 75 6d 20  t>..<dd>Maximum 
37d0: 64 65 70 74 68 20 66 6f 72 20 74 68 65 20 63 65  depth for the ce
37e0: 72 74 69 66 69 63 61 74 65 20 63 68 61 69 6e 20  rtificate chain 
37f0: 76 65 72 69 66 69 63 61 74 69 6f 6e 2e 0a 09 20  verification... 
3800: 20 20 20 44 65 66 61 75 6c 74 20 69 73 20 2d 31     Default is -1
3810: 2c 20 74 6f 20 63 68 65 63 6b 20 61 6c 6c 2e 3c  , to check all.<
3820: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
3830: 67 3e 76 65 72 69 66 79 4d 6f 64 65 3c 2f 73 74  g>verifyMode</st
3840: 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f  rong> <em>list</
3850: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69  em></dt>..<dd>Li
3860: 73 74 20 6f 66 20 63 65 72 74 69 66 69 63 61 74  st of certificat
3870: 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e 20 6d  e verification m
3880: 6f 64 65 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  odes.</dd>..<dt>
3890: 3c 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 52 65  <strong>verifyRe
38a0: 73 75 6c 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  sult</strong> <e
38b0: 6d 3e 72 65 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64  m>result</em></d
38c0: 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63  t>..<dd>Certific
38d0: 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f 6e  ate verification
38e0: 20 72 65 73 75 6c 74 2e 3c 2f 64 64 3e 0a 09 3c   result.</dd>..<
38f0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 61 5f 6e 61  dt><strong>ca_na
3900: 6d 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  mes</strong> <em
3910: 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >list</em></dt>.
3920: 09 3c 64 64 3e 4c 69 73 74 20 6f 66 20 74 68 65  .<dd>List of the
3930: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74   Certificate Aut
3940: 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 74 6f  horities used to
3950: 20 63 72 65 61 74 65 20 74 68 65 20 63 65 72 74   create the cert
3960: 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20  ificate.</dd>.  
3970: 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 62 3e 43    </dl>.    <b>C
3980: 65 72 74 69 66 69 63 61 74 65 20 53 74 61 74 75  ertificate Statu
3990: 73 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09  s</b>.    <dl>..
39a0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 6c 3c  <dt><strong>all<
39b0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72  /strong> <em>str
39c0: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ing</em></dt>..<
39d0: 64 64 3e 44 75 6d 70 20 6f 66 20 61 6c 6c 20 63  dd>Dump of all c
39e0: 65 72 74 69 66 69 63 61 74 65 20 69 6e 66 6f 2e  ertificate info.
39f0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
3a00: 6e 67 3e 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f  ng>version</stro
3a10: 6e 67 3e 20 3c 65 6d 3e 76 61 6c 75 65 3c 2f 65  ng> <em>value</e
3a20: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
3a30: 20 63 65 72 74 69 66 69 63 61 74 65 20 76 65 72   certificate ver
3a40: 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e  sion.</dd>..<dt>
3a50: 3c 73 74 72 6f 6e 67 3e 73 65 72 69 61 6c 4e 75  <strong>serialNu
3a60: 6d 62 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  mber</strong> <e
3a70: 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  m>n</em></dt>..<
3a80: 64 64 3e 54 68 65 20 73 65 72 69 61 6c 20 6e 75  dd>The serial nu
3a90: 6d 62 65 72 20 6f 66 20 74 68 65 20 63 65 72 74  mber of the cert
3aa0: 69 66 69 63 61 74 65 20 61 73 20 61 20 68 65 78  ificate as a hex
3ab0: 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c   string.</dd>..<
3ac0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61  dt><strong>signa
3ad0: 74 75 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  ture</strong> <e
3ae0: 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e  m>algorithm</em>
3af0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 69 70 68 65  </dt>..<dd>Ciphe
3b00: 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64  r algorithm used
3b10: 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65   for certificate
3b20: 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e   signature.</dd>
3b30: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 73  ..<dt><strong>is
3b40: 73 75 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  suer</strong> <e
3b50: 6d 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  m>dn</em></dt>..
3b60: 3c 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75  <dd>The distingu
3b70: 69 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20  ished name (DN) 
3b80: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61  of the certifica
3b90: 74 65 20 69 73 73 75 65 72 2e 3c 2f 64 64 3e 0a  te issuer.</dd>.
3ba0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74  .<dt><strong>not
3bb0: 42 65 66 6f 72 65 3c 2f 73 74 72 6f 6e 67 3e 20  Before</strong> 
3bc0: 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64  <em>date</em></d
3bd0: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 62 65 67 69  t>..<dd>The begi
3be0: 6e 6e 69 6e 67 20 64 61 74 65 20 6f 66 20 74 68  nning date of th
3bf0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 76 61  e certificate va
3c00: 6c 69 64 69 74 79 2e 3c 2f 64 64 3e 0a 09 3c 64  lidity.</dd>..<d
3c10: 74 3e 3c 73 74 72 6f 6e 67 3e 6e 6f 74 41 66 74  t><strong>notAft
3c20: 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  er</strong> <em>
3c30: 64 61 74 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  date</em></dt>..
3c40: 3c 64 64 3e 54 68 65 20 65 78 70 69 72 61 74 69  <dd>The expirati
3c50: 6f 6e 20 64 61 74 65 20 6f 66 20 74 68 65 20 63  on date of the c
3c60: 65 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64  ertificate valid
3c70: 69 74 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ity.</dd>..<dt><
3c80: 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74 3c 2f  strong>subject</
3c90: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f  strong> <em>dn</
3ca0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
3cb0: 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20  e distinguished 
3cc0: 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65  name (DN) of the
3cd0: 20 63 65 72 74 69 66 69 63 61 74 65 20 73 75 62   certificate sub
3ce0: 6a 65 63 74 2e 0a 09 20 20 20 20 46 69 65 6c 64  ject...    Field
3cf0: 73 20 69 6e 63 6c 75 64 65 3a 20 43 6f 6d 6d 6f  s include: Commo
3d00: 6e 20 4e 61 6d 65 20 28 43 4e 29 2c 20 4f 72 67  n Name (CN), Org
3d10: 61 6e 69 7a 61 74 69 6f 6e 20 28 4f 29 2c 20 4c  anization (O), L
3d20: 6f 63 61 6c 69 74 79 0a 09 20 20 20 20 6f 72 20  ocality..    or 
3d30: 43 69 74 79 20 28 4c 29 2c 20 53 74 61 74 65 20  City (L), State 
3d40: 6f 72 20 50 72 6f 76 69 6e 63 65 20 28 53 29 2c  or Province (S),
3d50: 20 61 6e 64 20 43 6f 75 6e 74 72 79 20 4e 61 6d   and Country Nam
3d60: 65 20 28 43 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74  e (C).</dd>..<dt
3d70: 3e 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 55  ><strong>issuerU
3d80: 6e 69 71 75 65 49 44 3c 2f 73 74 72 6f 6e 67 3e  niqueID</strong>
3d90: 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e   <em>string</em>
3da0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 69  </dt>..<dd>The i
3db0: 73 73 75 65 72 20 75 6e 69 71 75 65 20 69 64 2e  ssuer unique id.
3dc0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
3dd0: 6e 67 3e 73 75 62 6a 65 63 74 55 6e 69 71 75 65  ng>subjectUnique
3de0: 49 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  ID</strong> <em>
3df0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
3e00: 0a 09 3c 64 64 3e 54 68 65 20 73 75 62 6a 65 63  ..<dd>The subjec
3e10: 74 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 64 64  t unique id.</dd
3e20: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6e  >..<dt><strong>n
3e30: 75 6d 5f 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73  um_extensions</s
3e40: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d  trong> <em>n</em
3e50: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75 6d 62  ></dt>..<dd>Numb
3e60: 65 72 20 6f 66 20 63 65 72 74 69 66 69 63 61 74  er of certificat
3e70: 65 20 65 78 74 65 6e 73 69 6f 6e 73 2e 3c 2f 64  e extensions.</d
3e80: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
3e90: 65 78 74 65 6e 73 69 6f 6e 73 3c 2f 73 74 72 6f  extensions</stro
3ea0: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d  ng> <em>list</em
3eb0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74  ></dt>..<dd>List
3ec0: 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65 20   of certificate 
3ed0: 65 78 74 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e  extension names.
3ee0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
3ef0: 6e 67 3e 61 75 74 68 6f 72 69 74 79 4b 65 79 49  ng>authorityKeyI
3f00: 64 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e  dentifier</stron
3f10: 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65  g> <em>string</e
3f20: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 28 41 4b  m></dt>..<dd>(AK
3f30: 49 29 20 4b 65 79 20 69 64 65 6e 74 69 66 69 65  I) Key identifie
3f40: 72 20 6f 66 20 74 68 65 20 49 73 73 75 69 6e 67  r of the Issuing
3f50: 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 20   CA certificate 
3f60: 74 68 61 74 20 73 69 67 6e 65 64 0a 09 20 20 20  that signed..   
3f70: 20 74 68 65 20 53 53 4c 20 63 65 72 74 69 66 69   the SSL certifi
3f80: 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73 74  cate as a hex st
3f90: 72 69 6e 67 2e 20 54 68 69 73 20 76 61 6c 75 65  ring. This value
3fa0: 20 6d 61 74 63 68 65 73 20 74 68 65 20 53 4b 49   matches the SKI
3fb0: 0a 09 20 20 20 20 76 61 6c 75 65 20 6f 66 20 74  ..    value of t
3fc0: 68 65 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20  he Intermediate 
3fd0: 43 41 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c  CA certificate.<
3fe0: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
3ff0: 67 3e 73 75 62 6a 65 63 74 4b 65 79 49 64 65 6e  g>subjectKeyIden
4000: 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e 67 3e 20  tifier</strong> 
4010: 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c  <em>string</em><
4020: 2f 64 74 3e 0a 09 3c 64 64 3e 28 53 4b 49 29 20  /dt>..<dd>(SKI) 
4030: 48 61 73 68 20 6f 66 20 74 68 65 20 70 75 62 6c  Hash of the publ
4040: 69 63 20 6b 65 79 20 69 6e 73 69 64 65 20 74 68  ic key inside th
4050: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 61 73  e certificate as
4060: 20 61 20 68 65 78 0a 09 20 20 20 20 73 74 72 69   a hex..    stri
4070: 6e 67 2e 20 55 73 65 64 20 74 6f 20 69 64 65 6e  ng. Used to iden
4080: 74 69 66 79 20 63 65 72 74 69 66 69 63 61 74 65  tify certificate
4090: 73 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 20 61  s that contain a
40a0: 20 70 61 72 74 69 63 75 6c 61 72 0a 09 20 20 20   particular..   
40b0: 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c 2f 64 64   public key.</dd
40c0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
40d0: 75 62 6a 65 63 74 41 6c 74 4e 61 6d 65 3c 2f 73  ubjectAltName</s
40e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c  trong> <em>list<
40f0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c  /em></dt>..<dd>L
4100: 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66 20 74 68  ist of all of th
4110: 65 20 61 6c 74 65 72 6e 61 74 69 76 65 20 64 6f  e alternative do
4120: 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62 20  main names, sub 
4130: 64 6f 6d 61 69 6e 73 2c 0a 09 20 20 20 20 61 6e  domains,..    an
4140: 64 20 49 50 20 61 64 64 72 65 73 73 65 73 20 74  d IP addresses t
4150: 68 61 74 20 61 72 65 20 73 65 63 75 72 65 64 20  hat are secured 
4160: 62 79 20 74 68 65 20 63 65 72 74 69 66 69 63 61  by the certifica
4170: 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  te.</dd>..<dt><s
4180: 74 72 6f 6e 67 3e 6f 63 73 70 3c 2f 73 74 72 6f  trong>ocsp</stro
4190: 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d  ng> <em>list</em
41a0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4c 69 73 74  ></dt>..<dd>List
41b0: 20 6f 66 20 61 6c 6c 20 4f 6e 6c 69 6e 65 20 43   of all Online C
41c0: 65 72 74 69 66 69 63 61 74 65 20 53 74 61 74 75  ertificate Statu
41d0: 73 20 50 72 6f 74 6f 63 6f 6c 20 28 4f 43 53 50  s Protocol (OCSP
41e0: 29 20 55 52 4c 73 2e 3c 2f 64 64 3e 0a 09 3c 64  ) URLs.</dd>..<d
41f0: 74 3e 3c 73 74 72 6f 6e 67 3e 63 65 72 74 69 66  t><strong>certif
4200: 69 63 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  icate</strong> <
4210: 65 6d 3e 63 65 72 74 3c 2f 65 6d 3e 3c 2f 64 74  em>cert</em></dt
4220: 3e 0a 09 3c 64 64 3e 54 68 65 20 50 45 4d 20 65  >..<dd>The PEM e
4230: 6e 63 6f 64 65 64 20 63 65 72 74 69 66 69 63 61  ncoded certifica
4240: 74 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  te.</dd>..<dt><s
4250: 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 41  trong>signatureA
4260: 6c 67 6f 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67  lgorithm</strong
4270: 3e 20 3c 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c  > <em>algorithm<
4280: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43  /em></dt>..<dd>C
4290: 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d 20  ipher algorithm 
42a0: 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 65 72  used for the cer
42b0: 74 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75  tificate signatu
42c0: 72 65 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  re.</dd>..<dt><s
42d0: 74 72 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 56  trong>signatureV
42e0: 61 6c 75 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  alue</strong> <e
42f0: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64  m>string</em></d
4300: 74 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63  t>..<dd>Certific
4310: 61 74 65 20 73 69 67 6e 61 74 75 72 65 20 61 73  ate signature as
4320: 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e 3c 2f   a hex string.</
4330: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
4340: 3e 73 69 67 6e 61 74 75 72 65 44 69 67 65 73 74  >signatureDigest
4350: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65  </strong> <em>ve
4360: 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  rsion</em></dt>.
4370: 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61 74 65  .<dd>Certificate
4380: 20 73 69 67 6e 69 6e 67 20 64 69 67 65 73 74 20   signing digest 
4390: 61 73 20 61 20 68 65 78 20 73 74 72 69 6e 67 2e  as a hex string.
43a0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
43b0: 6e 67 3e 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f  ng>publicKeyAlgo
43c0: 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c  rithm</strong> <
43d0: 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d  em>algorithm</em
43e0: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 43 65 72 74  ></dt>..<dd>Cert
43f0: 69 66 69 63 61 74 65 20 73 69 67 6e 61 74 75 72  ificate signatur
4400: 65 20 70 75 62 6c 69 63 20 6b 65 79 20 61 6c 67  e public key alg
4410: 6f 72 69 74 68 6d 2e 3c 2f 64 64 3e 0a 09 3c 64  orithm.</dd>..<d
4420: 74 3e 3c 73 74 72 6f 6e 67 3e 70 75 62 6c 69 63  t><strong>public
4430: 4b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  Key</strong> <em
4440: 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74  >string</em></dt
4450: 3e 0a 09 3c 64 64 3e 43 65 72 74 69 66 69 63 61  >..<dd>Certifica
4460: 74 65 20 73 69 67 6e 61 74 75 72 65 20 70 75 62  te signature pub
4470: 6c 69 63 20 6b 65 79 20 61 73 20 61 20 68 65 78  lic key as a hex
4480: 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 09 3c   string.</dd>..<
4490: 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74 73 3c  dt><strong>bits<
44a0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f  /strong> <em>n</
44b0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4e 75  em></dt>..<dd>Nu
44c0: 6d 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65  mber of bits use
44d0: 64 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74  d for certificat
44e0: 65 20 73 69 67 6e 61 74 75 72 65 20 6b 65 79 2e  e signature key.
44f0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
4500: 6e 67 3e 73 65 6c 66 5f 73 69 67 6e 65 64 3c 2f  ng>self_signed</
4510: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
4520: 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ean</em></dt>..<
4530: 64 64 3e 57 68 65 74 68 65 72 20 74 68 65 20 63  dd>Whether the c
4540: 65 72 74 69 66 69 63 61 74 65 20 73 69 67 6e 61  ertificate signa
4550: 74 75 72 65 20 69 73 20 73 65 6c 66 20 73 69 67  ture is self sig
4560: 6e 65 64 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ned.</dd>..<dt><
4570: 73 74 72 6f 6e 67 3e 73 68 61 31 5f 68 61 73 68  strong>sha1_hash
4580: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68 61  </strong> <em>ha
4590: 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  sh</em></dt>..<d
45a0: 64 3e 54 68 65 20 53 48 41 31 20 68 61 73 68 20  d>The SHA1 hash 
45b0: 6f 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61  of the certifica
45c0: 74 65 20 61 73 20 61 20 68 65 78 20 73 74 72 69  te as a hex stri
45d0: 6e 67 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  ng.</dd>..<dt><s
45e0: 74 72 6f 6e 67 3e 73 68 61 32 35 36 5f 68 61 73  trong>sha256_has
45f0: 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 68  h</strong> <em>h
4600: 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ash</em></dt>..<
4610: 64 64 3e 54 68 65 20 53 48 41 32 35 36 20 68 61  dd>The SHA256 ha
4620: 73 68 20 6f 66 20 74 68 65 20 63 65 72 74 69 66  sh of the certif
4630: 69 63 61 74 65 20 61 73 20 61 20 68 65 78 20 73  icate as a hex s
4640: 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 20 20 20 20  tring.</dd>.    
4650: 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 62 6c 6f 63  </dl>.    </bloc
4660: 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74  kquote>..    <dt
4670: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63  ><a name="tls::c
4680: 6f 6e 6e 65 63 74 69 6f 6e 22 3e 3c 73 74 72 6f  onnection"><stro
4690: 6e 67 3e 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69  ng>tls::connecti
46a0: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 0a 20 20 20 20  on</strong>.    
46b0: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  <em>channel</em>
46c0: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
46d0: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75  d>Returns the cu
46e0: 72 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e  rrent connection
46f0: 20 73 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53   status of an SS
4700: 4c 20 63 68 61 6e 6e 65 6c 2e 20 54 68 65 0a 09  L channel. The..
4710: 72 65 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74  result is a list
4720: 20 6f 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61   of key-value pa
4730: 69 72 73 20 64 65 73 63 72 69 62 69 6e 67 20 74  irs describing t
4740: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f  he connection.</
4750: 64 64 3e 0a 20 20 20 20 3c 62 6c 6f 63 6b 71 75  dd>.    <blockqu
4760: 6f 74 65 3e 0a 20 20 20 20 3c 62 3e 53 53 4c 20  ote>.    <b>SSL 
4770: 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20 3c  Status</b>.    <
4780: 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dl>..<dt><strong
4790: 3e 73 74 61 74 65 3c 2f 73 74 72 6f 6e 67 3e 20  >state</strong> 
47a0: 3c 65 6d 3e 73 74 61 74 65 3c 2f 65 6d 3e 3c 2f  <em>state</em></
47b0: 64 74 3e 0a 09 3c 64 64 3e 53 74 61 74 65 20 6f  dt>..<dd>State o
47c0: 66 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  f the connection
47d0: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
47e0: 6f 6e 67 3e 73 65 72 76 65 72 6e 61 6d 65 3c 2f  ong>servername</
47f0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 61 6d 65  strong> <em>name
4800: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
4810: 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20  The name of the 
4820: 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 73 65 72  connected to ser
4830: 76 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ver.</dd>..<dt><
4840: 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c 3c  strong>protocol<
4850: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72  /strong> <em>ver
4860: 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  sion</em></dt>..
4870: 3c 64 64 3e 54 68 65 20 70 72 6f 74 6f 63 6f 6c  <dd>The protocol
4880: 20 76 65 72 73 69 6f 6e 20 75 73 65 64 20 66 6f   version used fo
4890: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  r the connection
48a0: 3a 0a 09 20 20 20 20 53 53 4c 32 2c 20 53 53 4c  :..    SSL2, SSL
48b0: 33 2c 20 54 4c 53 31 2c 20 54 4c 53 31 2e 31 2c  3, TLS1, TLS1.1,
48c0: 20 54 4c 53 31 2e 32 2c 20 54 4c 53 31 2e 33 2c   TLS1.2, TLS1.3,
48d0: 20 6f 72 20 75 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64   or unknown.</dd
48e0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72  >..<dt><strong>r
48f0: 65 6e 65 67 6f 74 69 61 74 69 6f 6e 5f 61 6c 6c  enegotiation_all
4900: 6f 77 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  owed</strong> <e
4910: 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f  m>boolean</em></
4920: 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72  dt>..<dd>Whether
4930: 20 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f   protocol renego
4940: 74 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f  tiation is suppo
4950: 72 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64  rted or not.</dd
4960: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
4970: 65 63 75 72 69 74 79 5f 6c 65 76 65 6c 3c 2f 73  ecurity_level</s
4980: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 65 76 65 6c  trong> <em>level
4990: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
49a0: 54 68 65 20 73 65 63 75 72 69 74 79 20 6c 65 76  The security lev
49b0: 65 6c 20 75 73 65 64 20 66 6f 72 20 73 65 6c 65  el used for sele
49c0: 63 74 69 6f 6e 20 6f 66 20 63 69 70 68 65 72 73  ction of ciphers
49d0: 2c 20 6b 65 79 20 73 69 7a 65 2c 20 65 74 63 2e  , key size, etc.
49e0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
49f0: 6e 67 3e 73 65 73 73 69 6f 6e 5f 72 65 75 73 65  ng>session_reuse
4a00: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  d</strong> <em>b
4a10: 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e  oolean</em></dt>
4a20: 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20 74 68  ..<dd>Whether th
4a30: 65 20 73 65 73 73 69 6f 6e 20 68 61 73 20 62 65  e session has be
4a40: 65 6e 20 72 65 75 73 65 64 20 6f 72 20 6e 6f 74  en reused or not
4a50: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
4a60: 6f 6e 67 3e 69 73 5f 73 65 72 76 65 72 3c 2f 73  ong>is_server</s
4a70: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65  trong> <em>boole
4a80: 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  an</em></dt>..<d
4a90: 64 3e 57 68 65 74 68 65 72 20 74 68 65 20 63 6f  d>Whether the co
4aa0: 6e 6e 65 63 74 69 6f 6e 20 69 73 20 63 6f 6e 66  nnection is conf
4ab0: 69 67 75 72 65 64 20 61 73 20 61 20 73 65 72 76  igured as a serv
4ac0: 65 72 20 28 31 29 20 6f 72 20 63 6c 69 65 6e 74  er (1) or client
4ad0: 20 28 30 29 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e   (0).</dd>..<dt>
4ae0: 3c 73 74 72 6f 6e 67 3e 63 6f 6d 70 72 65 73 73  <strong>compress
4af0: 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ion</strong> <em
4b00: 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >mode</em></dt>.
4b10: 09 3c 64 64 3e 43 6f 6d 70 72 65 73 73 69 6f 6e  .<dd>Compression
4b20: 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 09 3c   method.</dd>..<
4b30: 64 74 3e 3c 73 74 72 6f 6e 67 3e 65 78 70 61 6e  dt><strong>expan
4b40: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  sion</strong> <e
4b50: 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>mode</em></dt>
4b60: 0a 09 3c 64 64 3e 45 78 70 61 6e 73 69 6f 6e 20  ..<dd>Expansion 
4b70: 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 09 3c 64  method.</dd>..<d
4b80: 74 3e 3c 73 74 72 6f 6e 67 3e 63 61 4c 69 73 74  t><strong>caList
4b90: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69  </strong> <em>li
4ba0: 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64  st</em></dt>..<d
4bb0: 64 3e 4c 69 73 74 20 6f 66 20 43 65 72 74 69 66  d>List of Certif
4bc0: 69 63 61 74 65 20 41 75 74 68 6f 72 69 74 69 65  icate Authoritie
4bd0: 73 20 28 43 41 29 20 66 6f 72 20 58 2e 35 30 39  s (CA) for X.509
4be0: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
4bf0: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 20 20 20  d>.    </dl>.   
4c00: 20 3c 62 3e 43 69 70 68 65 72 20 49 6e 66 6f 3c   <b>Cipher Info<
4c10: 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64  /b>.    <dl>..<d
4c20: 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65 72  t><strong>cipher
4c30: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 69  </strong> <em>ci
4c40: 70 68 65 72 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  pher</em></dt>..
4c50: 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74 20  <dd>The current 
4c60: 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 66 6f  cipher in use fo
4c70: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  r the connection
4c80: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
4c90: 6f 6e 67 3e 73 74 61 6e 64 61 72 64 5f 6e 61 6d  ong>standard_nam
4ca0: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e  e</strong> <em>n
4cb0: 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  ame</em></dt>..<
4cc0: 64 64 3e 54 68 65 20 73 74 61 6e 64 61 72 64 20  dd>The standard 
4cd0: 52 46 43 20 6e 61 6d 65 20 6f 66 20 63 69 70 68  RFC name of ciph
4ce0: 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73  er.</dd>..<dt><s
4cf0: 74 72 6f 6e 67 3e 61 6c 67 6f 72 69 74 68 6d 5f  trong>algorithm_
4d00: 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  bits</strong> <e
4d10: 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  m>n</em></dt>..<
4d20: 64 64 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f 66  dd>The number of
4d30: 20 70 72 6f 63 65 73 73 65 64 20 62 69 74 73 20   processed bits 
4d40: 75 73 65 64 20 66 6f 72 20 63 69 70 68 65 72 2e  used for cipher.
4d50: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
4d60: 6e 67 3e 73 65 63 72 65 74 5f 62 69 74 73 3c 2f  ng>secret_bits</
4d70: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65  strong> <em>n</e
4d80: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
4d90: 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 72 65   number of secre
4da0: 74 20 62 69 74 73 20 75 73 65 64 20 66 6f 72 20  t bits used for 
4db0: 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 09 3c 64  cipher.</dd>..<d
4dc0: 74 3e 3c 73 74 72 6f 6e 67 3e 6d 69 6e 5f 76 65  t><strong>min_ve
4dd0: 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c  rsion</strong> <
4de0: 65 6d 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c  em>version</em><
4df0: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6d 69  /dt>..<dd>The mi
4e00: 6e 69 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76  nimum protocol v
4e10: 65 72 73 69 6f 6e 20 66 6f 72 20 63 69 70 68 65  ersion for ciphe
4e20: 72 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  r.</dd>..<dt><st
4e30: 72 6f 6e 67 3e 63 69 70 68 65 72 5f 69 73 5f 61  rong>cipher_is_a
4e40: 65 61 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ead</strong> <em
4e50: 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64  >boolean</em></d
4e60: 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65 72 20  t>..<dd>Whether 
4e70: 74 68 65 20 63 69 70 68 65 72 20 69 73 20 41 75  the cipher is Au
4e80: 74 68 65 6e 74 69 63 61 74 65 64 20 45 6e 63 72  thenticated Encr
4e90: 79 70 74 69 6f 6e 20 77 69 74 68 0a 09 20 20 20  yption with..   
4ea0: 20 41 73 73 6f 63 69 61 74 65 64 20 44 61 74 61   Associated Data
4eb0: 20 28 41 45 41 44 29 2e 3c 2f 64 64 3e 0a 09 3c   (AEAD).</dd>..<
4ec0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 63 69 70 68 65  dt><strong>ciphe
4ed0: 72 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  r_id</strong> <e
4ee0: 6d 3e 69 64 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  m>id</em></dt>..
4ef0: 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20  <dd>The OpenSSL 
4f00: 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 3e 0a  cipher id.</dd>.
4f10: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 64 65 73  .<dt><strong>des
4f20: 63 72 69 70 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67  cription</strong
4f30: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d  > <em>string</em
4f40: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41 20 74 65  ></dt>..<dd>A te
4f50: 78 74 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f  xt description o
4f60: 66 20 74 68 65 20 63 69 70 68 65 72 2e 3c 2f 64  f the cipher.</d
4f70: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
4f80: 68 61 6e 64 73 68 61 6b 65 5f 64 69 67 65 73 74  handshake_digest
4f90: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f  </strong> <em>bo
4fa0: 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  olean</em></dt>.
4fb0: 09 3c 64 64 3e 44 69 67 65 73 74 20 75 73 65 64  .<dd>Digest used
4fc0: 20 64 75 72 69 6e 67 20 68 61 6e 64 73 68 61 6b   during handshak
4fd0: 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c  e.</dd>.    </dl
4fe0: 3e 0a 20 20 20 20 3c 62 3e 53 65 73 73 69 6f 6e  >.    <b>Session
4ff0: 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c 64   Info</b>.    <d
5000: 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  l>..<dt><strong>
5010: 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  alpn</strong> <e
5020: 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e 3c  m>protocol</em><
5030: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72  /dt>..<dd>The pr
5040: 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20  otocol selected 
5050: 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f  after Applicatio
5060: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c  n-Layer Protocol
5070: 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 74 69 6f  ..    Negotiatio
5080: 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 09  n (ALPN).</dd>..
5090: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 72 65 73 75  <dt><strong>resu
50a0: 6d 61 62 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  mable</strong> <
50b0: 65 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c  em>boolean</em><
50c0: 2f 64 74 3e 0a 09 3c 64 64 3e 57 68 65 74 68 65  /dt>..<dd>Whethe
50d0: 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20 63 61  r the session ca
50e0: 6e 20 62 65 20 72 65 73 75 6d 65 64 20 6f 72 20  n be resumed or 
50f0: 6e 6f 74 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  not.</dd>..<dt><
5100: 73 74 72 6f 6e 67 3e 73 74 61 72 74 5f 74 69 6d  strong>start_tim
5110: 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73  e</strong> <em>s
5120: 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e  econds</em></dt>
5130: 0a 09 3c 64 64 3e 54 69 6d 65 20 73 69 6e 63 65  ..<dd>Time since
5140: 20 73 65 73 73 69 6f 6e 20 73 74 61 72 74 65 64   session started
5150: 20 69 6e 20 73 65 63 6f 6e 64 73 20 73 69 6e 63   in seconds sinc
5160: 65 20 65 70 6f 63 68 2e 3c 2f 64 64 3e 0a 09 3c  e epoch.</dd>..<
5170: 64 74 3e 3c 73 74 72 6f 6e 67 3e 74 69 6d 65 6f  dt><strong>timeo
5180: 75 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  ut</strong> <em>
5190: 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c 2f 64 74  seconds</em></dt
51a0: 3e 0a 09 3c 64 64 3e 4d 61 78 20 64 75 72 61 74  >..<dd>Max durat
51b0: 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20 69  ion of session i
51c0: 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72 65  n seconds before
51d0: 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 64 64 3e 0a   time-out.</dd>.
51e0: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6c 69 66  .<dt><strong>lif
51f0: 65 74 69 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  etime</strong> <
5200: 65 6d 3e 73 65 63 6f 6e 64 73 3c 2f 65 6d 3e 3c  em>seconds</em><
5210: 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 73 73 69 6f  /dt>..<dd>Sessio
5220: 6e 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d  n ticket lifetim
5230: 65 20 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64  e hint in second
5240: 73 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  s.</dd>..<dt><st
5250: 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 69 64 3c  rong>session_id<
5260: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e  /strong> <em>bin
5270: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c  ary_string</em><
5280: 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65  /dt>..<dd>Unique
5290: 20 73 65 73 73 69 6f 6e 20 69 64 20 66 6f 72 20   session id for 
52a0: 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20  use in resuming 
52b0: 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64  the session.</dd
52c0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73  >..<dt><strong>s
52d0: 65 73 73 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 73  ession_ticket</s
52e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72  trong> <em>binar
52f0: 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64  y_string</em></d
5300: 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65 20 73  t>..<dd>Unique s
5310: 65 73 73 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f  ession ticket fo
5320: 72 20 75 73 65 20 69 6e 20 72 65 73 75 6d 69 6e  r use in resumin
5330: 67 20 74 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f  g the session.</
5340: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
5350: 3e 74 69 63 6b 65 74 5f 61 70 70 5f 64 61 74 61  >ticket_app_data
5360: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69  </strong> <em>bi
5370: 6e 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e  nary_string</em>
5380: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75  </dt>..<dd>Uniqu
5390: 65 20 73 65 73 73 69 6f 6e 20 74 69 63 6b 65 74  e session ticket
53a0: 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 61 74   application dat
53b0: 61 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  a.</dd>..<dt><st
53c0: 72 6f 6e 67 3e 6d 61 73 74 65 72 5f 6b 65 79 3c  rong>master_key<
53d0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 69 6e  /strong> <em>bin
53e0: 61 72 79 5f 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c  ary_string</em><
53f0: 2f 64 74 3e 0a 09 3c 64 64 3e 55 6e 69 71 75 65  /dt>..<dd>Unique
5400: 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 65 72 20   session master 
5410: 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  key.</dd>..<dt><
5420: 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 63  strong>session_c
5430: 61 63 68 65 5f 6d 6f 64 65 3c 2f 73 74 72 6f 6e  ache_mode</stron
5440: 67 3e 20 3c 65 6d 3e 6d 6f 64 65 3c 2f 65 6d 3e  g> <em>mode</em>
5450: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 53 65 72 76 65  </dt>..<dd>Serve
5460: 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c  r cache mode (cl
5470: 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72  ient, server, or
5480: 20 62 6f 74 68 29 2e 3c 2f 64 64 3e 0a 20 20 20   both).</dd>.   
5490: 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 62 6c 6f   </dl>.    </blo
54a0: 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20 3c 64  ckquote>..    <d
54b0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a  t><a name="tls::
54c0: 63 69 70 68 65 72 73 22 3e 3c 73 74 72 6f 6e 67  ciphers"><strong
54d0: 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 73  >tls::ciphers</s
54e0: 74 72 6f 6e 67 3e 0a 09 3c 65 6d 3e 3f 70 72 6f  trong>..<em>?pro
54f0: 74 6f 63 6f 6c 3f 20 3f 76 65 72 62 6f 73 65 3f  tocol? ?verbose?
5500: 20 3f 73 75 70 70 6f 72 74 65 64 3f 3c 2f 65 6d   ?supported?</em
5510: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c  ></a></dt>.    <
5520: 64 64 3e 57 69 74 68 6f 75 74 20 61 6e 79 20 61  dd>Without any a
5530: 72 67 73 2c 20 72 65 74 75 72 6e 73 20 61 20 6c  rgs, returns a l
5540: 69 73 74 20 6f 66 20 61 6c 6c 20 73 79 6d 6d 65  ist of all symme
5550: 74 72 69 63 20 63 69 70 68 65 72 73 20 66 6f 72  tric ciphers for
5560: 20 75 73 65 0a 09 77 69 74 68 20 74 68 65 20 3c   use..with the <
5570: 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 3c 2f  strong>-cipher</
5580: 73 74 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 2e 20  strong> option. 
5590: 57 69 74 68 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f  With <em>protoco
55a0: 6c 3c 2f 65 6d 3e 2c 0a 09 6f 6e 6c 79 20 74 68  l</em>,..only th
55b0: 65 20 63 69 70 68 65 72 73 20 73 75 70 70 6f 72  e ciphers suppor
55c0: 74 65 64 20 66 6f 72 20 74 68 61 74 20 70 72 6f  ted for that pro
55d0: 74 6f 63 6f 6c 20 61 72 65 20 72 65 74 75 72 6e  tocol are return
55e0: 65 64 2e 20 53 65 65 0a 09 3c 61 20 68 72 65 66  ed. See..<a href
55f0: 3d 22 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c  ="#tls::protocol
5600: 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  s"><strong>tls::
5610: 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e  protocols</stron
5620: 67 3e 3c 2f 61 3e 20 63 6f 6d 6d 61 6e 64 0a 09  g></a> command..
5630: 66 6f 72 20 74 68 65 20 73 75 70 70 6f 72 74 65  for the supporte
5640: 64 20 70 72 6f 74 6f 63 6f 6c 73 2e 20 49 66 20  d protocols. If 
5650: 3c 65 6d 3e 76 65 72 62 6f 73 65 3c 2f 65 6d 3e  <em>verbose</em>
5660: 20 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73   is specified as
5670: 20 74 72 75 65 0a 09 74 68 65 6e 20 61 20 76 65   true..then a ve
5680: 72 62 6f 73 65 2c 20 68 75 6d 61 6e 20 72 65 61  rbose, human rea
5690: 64 61 62 6c 65 20 6c 69 73 74 20 69 73 20 72 65  dable list is re
56a0: 74 75 72 6e 65 64 20 77 69 74 68 20 61 64 64 69  turned with addi
56b0: 74 69 6f 6e 61 6c 0a 09 69 6e 66 6f 72 6d 61 74  tional..informat
56c0: 69 6f 6e 20 6f 6e 20 74 68 65 20 63 69 70 68 65  ion on the ciphe
56d0: 72 2e 20 49 66 20 3c 65 6d 3e 73 75 70 70 6f 72  r. If <em>suppor
56e0: 74 65 64 3c 2f 65 6d 3e 20 69 73 20 73 70 65 63  ted</em> is spec
56f0: 69 66 69 65 64 20 61 73 20 74 72 75 65 2c 0a 09  ified as true,..
5700: 74 68 65 6e 20 6f 6e 6c 79 20 74 68 65 20 63 69  then only the ci
5710: 70 68 65 72 73 20 73 75 70 70 6f 72 74 65 64 20  phers supported 
5720: 66 6f 72 20 70 72 6f 74 6f 63 6f 6c 20 77 69 6c  for protocol wil
5730: 6c 20 62 65 20 6c 69 73 74 65 64 2e 3c 2f 64 64  l be listed.</dd
5740: 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b  >.    <dt> 
5750: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61  </dt>.    <dt><a
5760: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 70 72 6f 74   name="tls::prot
5770: 6f 63 6f 6c 73 22 3e 3c 73 74 72 6f 6e 67 3e 74  ocols"><strong>t
5780: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 3c 2f 73  ls::protocols</s
5790: 74 72 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a  trong></a></dt>.
57a0: 20 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20      <dd>Returns 
57b0: 61 20 6c 69 73 74 20 6f 66 20 74 68 65 20 73 75  a list of the su
57c0: 70 70 6f 72 74 65 64 20 53 53 4c 2f 54 4c 53 20  pported SSL/TLS 
57d0: 70 72 6f 74 6f 63 6f 6c 73 2e 20 56 61 6c 69 64  protocols. Valid
57e0: 20 76 61 6c 75 65 73 20 61 72 65 3a 0a 09 3c 62   values are:..<b
57f0: 3e 73 73 6c 32 3c 2f 62 3e 2c 20 3c 62 3e 73 73  >ssl2</b>, <b>ss
5800: 6c 33 3c 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 3c  l3</b>, <b>tls1<
5810: 2f 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 31 3c 2f  /b>, <b>tls1.1</
5820: 62 3e 2c 20 3c 62 3e 74 6c 73 31 2e 32 3c 2f 62  b>, <b>tls1.2</b
5830: 3e 2c 0a 09 61 6e 64 20 3c 62 3e 74 6c 73 31 2e  >,..and <b>tls1.
5840: 33 3c 2f 62 3e 2e 20 45 78 61 63 74 20 6c 69 73  3</b>. Exact lis
5850: 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 4f 70 65  t depends on Ope
5860: 6e 53 53 4c 20 76 65 72 73 69 6f 6e 20 61 6e 64  nSSL version and
5870: 0a 09 63 6f 6d 70 69 6c 65 20 74 69 6d 65 20 66  ..compile time f
5880: 6c 61 67 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c  lags.</dd>.    <
5890: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20  dt> </dt>. 
58a0: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22     <dt><a name="
58b0: 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e 3c 73  tls::version"><s
58c0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72 73 69  trong>tls::versi
58d0: 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 3c  on</strong></a><
58e0: 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52 65 74  /dt>.    <dd>Ret
58f0: 75 72 6e 73 20 74 68 65 20 4f 70 65 6e 53 53 4c  urns the OpenSSL
5900: 20 76 65 72 73 69 6f 6e 20 73 74 72 69 6e 67 2e   version string.
5910: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 62 72 3e  </dd>.</dl>.<br>
5920: 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20 6e  ..<hr>..<h3><a n
5930: 61 6d 65 3d 22 43 45 52 54 49 46 49 43 41 54 45  ame="CERTIFICATE
5940: 20 56 41 4c 49 44 41 54 49 4f 4e 22 3e 43 45 52   VALIDATION">CER
5950: 54 49 46 49 43 41 54 45 20 56 41 4c 49 44 41 54  TIFICATE VALIDAT
5960: 49 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 68  ION</a></h3>..<h
5970: 34 3e 53 75 6d 6d 61 72 79 20 6f 66 20 63 6f 6d  4>Summary of com
5980: 6d 61 6e 64 20 6c 69 6e 65 20 6f 70 74 69 6f 6e  mand line option
5990: 73 3a 3c 2f 68 34 3e 0a 3c 70 3e 54 68 65 20 66  s:</h4>.<p>The f
59a0: 6f 6c 6c 6f 77 69 6e 67 20 6f 70 74 69 6f 6e 73  ollowing options
59b0: 20 61 72 65 20 75 73 65 64 20 66 6f 72 20 63 65   are used for ce
59c0: 72 74 69 66 69 63 61 74 65 20 76 61 6c 69 64 61  rtificate valida
59d0: 74 69 6f 6e 3a 3c 2f 70 3e 0a 3c 75 6c 3e 0a 3c  tion:</p>.<ul>.<
59e0: 6c 69 3e 54 68 65 20 3c 62 3e 2d 63 61 64 69 72  li>The <b>-cadir
59f0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 73 70 65 63  </b> option spec
5a00: 69 66 69 65 73 20 74 68 65 20 64 69 72 65 63 74  ifies the direct
5a10: 6f 72 79 20 77 68 65 72 65 20 74 68 65 20 43 65  ory where the Ce
5a20: 72 74 69 66 69 63 61 74 65 0a 41 75 74 68 6f 72  rtificate.Author
5a30: 69 74 79 20 28 43 41 29 20 63 65 72 74 69 66 69  ity (CA) certifi
5a40: 63 61 74 65 73 20 61 72 65 20 73 74 6f 72 65 64  cates are stored
5a50: 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73  . The default is
5a60: 20 70 6c 61 74 66 6f 72 6d 20 73 70 65 63 69 66   platform specif
5a70: 69 63 2c 20 62 75 74 0a 69 73 20 75 73 75 61 6c  ic, but.is usual
5a80: 6c 79 20 22 2f 65 74 63 2f 73 73 6c 2f 63 65 72  ly "/etc/ssl/cer
5a90: 74 73 22 20 6f 6e 20 4c 69 6e 75 78 2f 55 6e 69  ts" on Linux/Uni
5aa0: 78 20 73 79 73 74 65 6d 73 2e 20 54 68 65 20 64  x systems. The d
5ab0: 65 66 61 75 6c 74 20 6c 6f 63 61 74 69 6f 6e 20  efault location 
5ac0: 63 61 6e 20 62 65 0a 6f 76 65 72 72 69 64 64 65  can be.overridde
5ad0: 6e 20 76 69 61 20 74 68 65 20 3c 62 3e 53 53 4c  n via the <b>SSL
5ae0: 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 65 6e  _CERT_DIR</b> en
5af0: 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62  vironment variab
5b00: 6c 65 2e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 54 68 65  le.</li>.<li>The
5b10: 20 3c 62 3e 2d 63 61 66 69 6c 65 20 3c 2f 62 3e   <b>-cafile </b>
5b20: 20 6f 70 74 69 6f 6e 20 73 70 65 63 69 66 69 65   option specifie
5b30: 73 20 74 68 65 20 66 69 6c 65 20 74 68 61 74 20  s the file that 
5b40: 63 6f 6e 74 61 69 6e 73 20 61 6c 6c 20 6f 66 20  contains all of 
5b50: 74 68 65 0a 43 65 72 74 69 66 69 63 61 74 65 20  the.Certificate 
5b60: 41 75 74 68 6f 72 69 74 79 20 28 43 41 29 20 63  Authority (CA) c
5b70: 65 72 74 69 66 69 63 61 74 65 73 20 69 6e 20 74  ertificates in t
5b80: 68 65 20 50 45 4d 20 66 69 6c 65 20 66 6f 72 6d  he PEM file form
5b90: 61 74 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  at. The default 
5ba0: 69 73 0a 3c 62 3e 63 65 72 74 2e 70 65 6d 3c 2f  is.<b>cert.pem</
5bb0: 62 3e 2c 20 69 6e 20 74 68 65 20 4f 70 65 6e 53  b>, in the OpenS
5bc0: 53 4c 20 64 69 72 65 63 74 6f 72 79 2e 20 4f 6e  SL directory. On
5bd0: 20 4c 69 6e 75 78 2f 55 6e 69 78 20 73 79 73 74   Linux/Unix syst
5be0: 65 6d 73 2c 20 74 68 69 73 20 69 73 0a 75 73 75  ems, this is.usu
5bf0: 61 6c 6c 79 20 22 2f 65 74 63 2f 73 73 6c 2f 63  ally "/etc/ssl/c
5c00: 61 2d 62 75 6e 64 6c 65 2e 70 65 6d 22 2e 20 54  a-bundle.pem". T
5c10: 68 65 20 64 65 66 61 75 6c 74 20 66 69 6c 65 20  he default file 
5c20: 63 61 6e 20 62 65 20 6f 76 65 72 72 69 64 64 65  can be overridde
5c30: 6e 20 76 69 61 20 74 68 65 0a 3c 62 3e 53 53 4c  n via the.<b>SSL
5c40: 5f 43 45 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65  _CERT_FILE</b> e
5c50: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61  nvironment varia
5c60: 62 6c 65 2e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 54 68  ble.</li>.<li>Th
5c70: 65 20 3c 62 3e 2d 63 61 73 74 6f 72 65 3c 2f 62  e <b>-castore</b
5c80: 3e 20 6f 70 74 69 6f 6e 20 63 6f 6e 74 61 69 6e  > option contain
5c90: 73 20 74 68 65 20 55 52 49 20 74 6f 20 74 68 65  s the URI to the
5ca0: 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74   Certificate Aut
5cb0: 68 6f 72 69 74 79 0a 28 43 41 29 20 73 74 6f 72  hority.(CA) stor
5cc0: 65 2c 20 77 68 69 63 68 20 6d 61 79 20 62 65 20  e, which may be 
5cd0: 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 69 6e  a single contain
5ce0: 65 72 20 6f 72 20 61 20 63 61 74 61 6c 6f 67 20  er or a catalog 
5cf0: 6f 66 20 63 6f 6e 74 61 69 6e 65 72 73 2e 0a 53  of containers..S
5d00: 74 61 72 74 69 6e 67 20 77 69 74 68 20 4f 70 65  tarting with Ope
5d10: 6e 53 53 4c 20 33 2e 32 20 6f 6e 20 57 69 6e 64  nSSL 3.2 on Wind
5d20: 6f 77 73 2c 20 73 65 74 20 74 68 69 73 20 74 6f  ows, set this to
5d30: 20 22 6f 72 67 2e 6f 70 65 6e 73 73 6c 2e 77 69   "org.openssl.wi
5d40: 6e 73 74 6f 72 65 3a 2f 2f 22 20 74 6f 0a 75 73  nstore://" to.us
5d50: 65 20 74 68 65 20 62 75 69 6c 74 2d 69 6e 20 57  e the built-in W
5d60: 69 6e 64 6f 77 73 20 43 65 72 74 69 66 69 63 61  indows Certifica
5d70: 74 65 20 53 74 6f 72 65 2e 20 54 68 65 20 57 69  te Store. The Wi
5d80: 6e 64 6f 77 73 20 63 65 72 74 20 73 74 6f 72 65  ndows cert store
5d90: 20 6f 6e 6c 79 0a 73 75 70 70 6f 72 74 73 20 72   only.supports r
5da0: 6f 6f 74 20 63 65 72 74 69 66 69 63 61 74 65 20  oot certificate 
5db0: 73 74 6f 72 65 73 2e 3c 2f 6c 69 3e 0a 3c 6c 69  stores.</li>.<li
5dc0: 3e 54 68 65 20 3c 62 3e 2d 72 65 71 75 65 73 74  >The <b>-request
5dd0: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 69 73 20 75  </b> option is u
5de0: 73 65 64 20 74 6f 20 72 65 71 75 65 73 74 20 74  sed to request t
5df0: 68 65 20 73 65 72 76 65 72 20 73 65 6e 64 20 69  he server send i
5e00: 74 73 0a 63 65 72 74 69 66 69 63 61 74 65 20 63  ts.certificate c
5e10: 68 61 69 6e 20 61 73 20 70 61 72 74 20 6f 66 20  hain as part of 
5e20: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 6e  the connection n
5e30: 65 67 6f 74 69 61 74 69 6f 6e 20 70 72 6f 63 65  egotiation proce
5e40: 73 73 2e 20 54 68 69 73 20 69 73 0a 6e 65 65 64  ss. This is.need
5e50: 65 64 20 74 6f 20 64 6f 20 63 65 72 74 69 66 69  ed to do certifi
5e60: 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e 2e  cate validation.
5e70: 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 73 20   The default is 
5e80: 74 72 75 65 2e 20 49 6e 20 61 64 64 69 74 69 6f  true. In additio
5e90: 6e 2c 20 74 68 65 0a 63 6c 69 65 6e 74 20 63 61  n, the.client ca
5ea0: 6e 20 6d 61 6e 75 61 6c 6c 79 20 69 6e 73 70 65  n manually inspe
5eb0: 63 74 20 61 6e 64 20 61 63 63 65 70 74 20 6f 72  ct and accept or
5ec0: 20 72 65 6a 65 63 74 20 65 61 63 68 20 63 65 72   reject each cer
5ed0: 74 69 66 69 63 61 74 65 20 75 73 69 6e 67 20 74  tificate using t
5ee0: 68 65 0a 3c 62 3e 2d 76 61 6c 69 64 61 74 65 63  he.<b>-validatec
5ef0: 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70 74 69 6f  ommand</b> optio
5f00: 6e 2e 3c 2f 6c 69 3e 0a 3c 6c 69 3e 54 68 65 20  n.</li>.<li>The 
5f10: 3c 62 3e 2d 72 65 71 75 69 72 65 3c 2f 62 3e 20  <b>-require</b> 
5f20: 6f 70 74 69 6f 6e 20 69 73 20 75 73 65 64 20 74  option is used t
5f30: 6f 20 72 65 71 75 69 72 65 20 63 65 72 74 69 66  o require certif
5f40: 69 63 61 74 65 20 76 61 6c 69 64 61 74 69 6f 6e  icate validation
5f50: 20 62 65 0a 70 65 72 66 6f 72 6d 65 64 20 61 73   be.performed as
5f60: 20 70 61 72 74 20 6f 66 20 74 68 65 20 63 6f 6e   part of the con
5f70: 6e 65 63 74 69 6f 6e 20 6e 65 67 6f 74 69 61 74  nection negotiat
5f80: 69 6f 6e 20 70 72 6f 63 65 73 73 2e 20 41 20 76  ion process. A v
5f90: 61 6c 69 64 20 43 41 20 64 69 72 65 63 74 6f 72  alid CA director
5fa0: 79 2c 0a 66 69 6c 65 2c 20 6f 72 20 73 74 6f 72  y,.file, or stor
5fb0: 65 20 6d 75 73 74 20 62 65 20 70 72 65 73 65 6e  e must be presen
5fc0: 74 20 66 6f 72 20 74 68 69 73 20 74 6f 20 77 6f  t for this to wo
5fd0: 72 6b 2e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 0a  rk.</li>.</ul>..
5fe0: 3c 62 72 3e 0a 3c 68 34 3e 57 68 65 6e 20 61 72  <br>.<h4>When ar
5ff0: 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 6f  e command line o
6000: 70 74 69 6f 6e 73 20 6e 65 65 64 65 64 3a 3c 2f  ptions needed:</
6010: 68 34 3e 0a 3c 70 3e 0a 42 79 20 64 65 66 61 75  h4>.<p>.By defau
6020: 6c 74 2c 20 61 20 63 6c 69 65 6e 74 20 54 4c 53  lt, a client TLS
6030: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 64 6f 65 73   connection does
6040: 20 4e 4f 54 20 76 61 6c 69 64 61 74 65 20 74 68   NOT validate th
6050: 65 20 73 65 72 76 65 72 20 63 65 72 74 69 66 69  e server certifi
6060: 63 61 74 65 0a 63 68 61 69 6e 2e 20 54 68 69 73  cate.chain. This
6070: 20 6c 69 6d 69 74 61 74 69 6f 6e 20 69 73 20 64   limitation is d
6080: 75 65 20 74 6f 20 74 68 65 20 6c 61 63 6b 20 6f  ue to the lack o
6090: 66 20 61 20 63 6f 6d 6d 6f 6e 20 63 72 6f 73 73  f a common cross
60a0: 20 70 6c 61 74 66 6f 72 6d 0a 64 61 74 61 62 61   platform.databa
60b0: 73 65 20 6f 66 20 43 65 72 74 69 66 69 63 61 74  se of Certificat
60c0: 65 20 41 75 74 68 6f 72 69 74 79 20 28 43 41 29  e Authority (CA)
60d0: 20 70 72 6f 76 69 64 65 64 20 63 65 72 74 69 66   provided certif
60e0: 69 63 61 74 65 73 20 74 6f 20 76 61 6c 69 64 61  icates to valida
60f0: 74 65 0a 61 67 61 69 6e 73 74 2e 20 4d 61 6e 79  te.against. Many
6100: 20 4c 69 6e 75 78 20 73 79 73 74 65 6d 73 20 6e   Linux systems n
6110: 61 74 69 76 65 6c 79 20 73 75 70 70 6f 72 74 20  atively support 
6120: 4f 70 65 6e 53 53 4c 20 61 6e 64 20 74 68 75 73  OpenSSL and thus
6130: 20 68 61 76 65 20 74 68 65 73 65 0a 63 65 72 74   have these.cert
6140: 69 66 69 63 61 74 65 73 20 69 6e 73 74 61 6c 6c  ificates install
6150: 65 64 20 61 73 20 70 61 72 74 20 6f 66 20 74 68  ed as part of th
6160: 65 20 4f 53 2c 20 62 75 74 20 4d 61 63 4f 53 20  e OS, but MacOS 
6170: 61 6e 64 20 57 69 6e 64 6f 77 73 20 64 6f 20 6e  and Windows do n
6180: 6f 74 2e 20 49 6e 0a 6f 72 64 65 72 20 74 6f 20  ot. In.order to 
6190: 75 73 65 20 74 68 65 20 3c 62 3e 2d 72 65 71 75  use the <b>-requ
61a0: 69 72 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e 2c 20  ire</b> option, 
61b0: 6f 6e 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f  one of the follo
61c0: 77 69 6e 67 20 6d 75 73 74 20 62 65 20 74 72 75  wing must be tru
61d0: 65 3a 3c 2f 70 3e 0a 3c 75 6c 3e 0a 3c 6c 69 3e  e:</p>.<ul>.<li>
61e0: 4f 6e 20 4c 69 6e 75 78 20 61 6e 64 20 55 6e 69  On Linux and Uni
61f0: 78 20 73 79 73 74 65 6d 73 20 77 69 74 68 20 4f  x systems with O
6200: 70 65 6e 53 53 4c 20 61 6c 72 65 61 64 79 20 69  penSSL already i
6210: 6e 73 74 61 6c 6c 65 64 2c 20 69 66 20 74 68 65  nstalled, if the
6220: 20 43 41 0a 63 65 72 74 69 66 69 63 61 74 65 73   CA.certificates
6230: 20 61 72 65 20 73 74 6f 72 65 64 20 69 6e 20 74   are stored in t
6240: 68 65 20 73 74 61 6e 64 61 72 64 20 6c 6f 63 61  he standard loca
6250: 74 69 6f 6e 73 2c 20 6f 72 20 74 68 65 20 3c 62  tions, or the <b
6260: 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62  >SSL_CERT_DIR</b
6270: 3e 0a 6f 72 20 3c 62 3e 53 53 4c 5f 43 45 52 54  >.or <b>SSL_CERT
6280: 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 20 76 61  _FILE</b> env va
6290: 72 73 20 61 72 65 20 73 65 74 2c 20 74 68 65 6e  rs are set, then
62a0: 20 6e 6f 20 6f 74 68 65 72 20 6f 70 74 69 6f 6e   no other option
62b0: 73 20 61 72 65 20 6e 65 65 64 65 64 2e 3c 2f 6c  s are needed.</l
62c0: 69 3e 0a 0a 3c 6c 69 3e 49 66 20 4f 70 65 6e 53  i>..<li>If OpenS
62d0: 53 4c 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c  SL is not instal
62e0: 6c 65 64 20 69 6e 20 74 68 65 20 64 65 66 61 75  led in the defau
62f0: 6c 74 20 6c 6f 63 61 74 69 6f 6e 2c 20 6f 72 20  lt location, or 
6300: 77 68 65 6e 20 75 73 69 6e 67 20 4d 61 63 20 4f  when using Mac O
6310: 53 0a 6f 72 20 57 69 6e 64 6f 77 73 20 61 6e 64  S.or Windows and
6320: 20 4f 70 65 6e 53 53 4c 20 69 73 20 69 6e 73 74   OpenSSL is inst
6330: 61 6c 6c 65 64 2c 20 74 68 65 20 3c 62 3e 53 53  alled, the <b>SS
6340: 4c 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61  L_CERT_DIR</b> a
6350: 6e 64 2f 6f 72 20 0a 3c 62 3e 53 53 4c 5f 43 45  nd/or .<b>SSL_CE
6360: 52 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 20  RT_FILE</b> env 
6370: 76 61 72 73 20 6f 72 20 74 68 65 20 3c 62 3e 2d  vars or the <b>-
6380: 63 61 64 69 72 3c 2f 62 3e 20 61 6e 64 2f 6f 72  cadir</b> and/or
6390: 20 3c 62 3e 2d 63 61 66 69 6c 65 3c 2f 62 3e 0a   <b>-cafile</b>.
63a0: 20 6f 70 74 69 6f 6e 73 20 6d 75 73 74 20 62 65   options must be
63b0: 20 64 65 66 69 6e 65 64 2e 3c 2f 6c 69 3e 0a 0a   defined.</li>..
63c0: 3c 6c 69 3e 4f 6e 20 57 69 6e 64 6f 77 73 2c 20  <li>On Windows, 
63d0: 73 74 61 72 74 69 6e 67 20 69 6e 20 4f 70 65 6e  starting in Open
63e0: 53 53 4c 20 33 2e 32 2c 20 69 74 20 69 73 20 6e  SSL 3.2, it is n
63f0: 6f 77 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 61  ow possible to a
6400: 63 63 65 73 73 20 74 68 65 0a 62 75 69 6c 74 2d  ccess the.built-
6410: 69 6e 20 57 69 6e 64 6f 77 73 20 43 65 72 74 69  in Windows Certi
6420: 66 69 63 61 74 65 20 53 74 6f 72 65 20 66 72 6f  ficate Store fro
6430: 6d 20 4f 70 65 6e 53 53 4c 2e 20 54 68 69 73 20  m OpenSSL. This 
6440: 63 61 6e 20 62 65 20 61 63 68 69 65 76 65 64 20  can be achieved 
6450: 62 79 0a 73 65 74 74 69 6e 67 20 74 68 65 20 3c  by.setting the <
6460: 62 3e 2d 63 61 73 74 6f 72 65 3c 2f 62 3e 20 6f  b>-castore</b> o
6470: 70 74 69 6f 6e 20 74 6f 20 22 3c 62 3e 6f 72 67  ption to "<b>org
6480: 2e 6f 70 65 6e 73 73 6c 2e 77 69 6e 73 74 6f 72  .openssl.winstor
6490: 65 3a 2f 2f 3c 2f 62 3e 22 2e 3c 2f 6c 69 3e 0a  e://</b>".</li>.
64a0: 0a 3c 6c 69 3e 49 66 20 4f 70 65 6e 53 53 4c 20  .<li>If OpenSSL 
64b0: 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64  is not installed
64c0: 2c 20 74 68 65 20 43 41 20 63 65 72 74 69 66 69  , the CA certifi
64d0: 63 61 74 65 73 20 6d 75 73 74 20 62 65 20 64 6f  cates must be do
64e0: 77 6e 6c 6f 61 64 65 64 20 61 6e 64 0a 69 6e 73  wnloaded and.ins
64f0: 74 61 6c 6c 65 64 20 77 69 74 68 20 74 68 65 20  talled with the 
6500: 75 73 65 72 20 73 6f 66 74 77 61 72 65 2e 20 54  user software. T
6510: 68 65 20 43 55 52 4c 20 74 65 61 6d 20 6d 61 6b  he CURL team mak
6520: 65 73 20 74 68 65 6d 20 61 76 61 69 6c 61 62 6c  es them availabl
6530: 65 20 61 74 0a 3c 61 20 68 72 65 66 3d 22 68 74  e at.<a href="ht
6540: 74 70 73 3a 2f 2f 63 75 72 6c 2e 73 65 2f 64 6f  tps://curl.se/do
6550: 63 73 2f 63 61 65 78 74 72 61 63 74 2e 68 74 6d  cs/caextract.htm
6560: 6c 22 3e 43 41 20 63 65 72 74 69 66 69 63 61 74  l">CA certificat
6570: 65 73 20 65 78 74 72 61 63 74 65 64 0a 66 72 6f  es extracted.fro
6580: 6d 20 4d 6f 7a 69 6c 6c 61 3c 2f 61 3e 20 69 6e  m Mozilla</a> in
6590: 20 74 68 65 20 3c 62 3e 63 61 63 65 72 74 2e 70   the <b>cacert.p
65a0: 65 6d 3c 2f 62 3e 20 66 69 6c 65 2e 20 59 6f 75  em</b> file. You
65b0: 20 6d 75 73 74 20 74 68 65 6e 20 65 69 74 68 65   must then eithe
65c0: 72 0a 73 65 74 20 74 68 65 20 3c 62 3e 53 53 4c  r.set the <b>SSL
65d0: 5f 43 45 52 54 5f 44 49 52 3c 2f 62 3e 20 61 6e  _CERT_DIR</b> an
65e0: 64 2f 6f 72 20 3c 62 3e 53 53 4c 5f 43 45 52 54  d/or <b>SSL_CERT
65f0: 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 20 76 61  _FILE</b> env va
6600: 72 73 20 6f 72 20 74 68 65 0a 3c 62 3e 2d 63 61  rs or the.<b>-ca
6610: 64 69 72 3c 2f 62 3e 20 6f 72 20 3c 62 3e 2d 63  dir</b> or <b>-c
6620: 61 66 69 6c 65 3c 2f 62 3e 20 6f 70 74 69 6f 6e  afile</b> option
6630: 73 20 74 6f 20 74 68 65 20 43 41 20 63 65 72 74  s to the CA cert
6640: 20 66 69 6c 65 27 73 20 69 6e 73 74 61 6c 6c 0a   file's install.
6650: 6c 6f 63 61 74 69 6f 6e 2e 20 49 74 20 69 73 20  location. It is 
6660: 79 6f 75 72 20 72 65 73 70 6f 6e 73 69 62 69 6c  your responsibil
6670: 69 74 79 20 74 6f 20 6b 65 65 70 20 74 68 69 73  ity to keep this
6680: 20 66 69 6c 65 20 75 70 20 74 6f 20 64 61 74 65   file up to date
6690: 2e 3c 2f 6c 69 3e 0a 3c 2f 75 6c 3e 0a 3c 62 72  .</li>.</ul>.<br
66a0: 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20  >..<hr>..<h3><a 
66b0: 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43 4b 20 4f  name="CALLBACK O
66c0: 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b  PTIONS">CALLBACK
66d0: 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33   OPTIONS</a></h3
66e0: 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64 69 63 61  >..<p>.As indica
66f0: 74 65 64 20 61 62 6f 76 65 2c 20 69 6e 64 69 76  ted above, indiv
6700: 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c 73 20 63  idual channels c
6710: 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65 69  an be given thei
6720: 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a  r own callbacks.
6730: 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d  to handle interm
6740: 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69 6e  ediate processin
6750: 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c  g by the OpenSSL
6760: 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67 20   library, using 
6770: 74 68 65 0a 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d  the.<strong>-com
6780: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c  mand</strong>, <
6790: 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64  strong>-password
67a0: 3c 2f 73 74 72 6f 6e 67 3e 2c 20 61 6e 64 0a 3c  </strong>, and.<
67b0: 73 74 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65  strong>-validate
67c0: 5f 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67  _command</strong
67d0: 3e 20 6f 70 74 69 6f 6e 73 20 70 61 73 73 65 64  > options passed
67e0: 20 74 6f 20 65 69 74 68 65 72 20 6f 66 0a 3c 73   to either of.<s
67f0: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65  trong>tls::socke
6800: 74 3c 2f 73 74 72 6f 6e 67 3e 20 6f 72 20 3c 73  t</strong> or <s
6810: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72  trong>tls::impor
6820: 74 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 55 6e 6c 69  t</strong>..Unli
6830: 6b 65 20 70 72 65 76 69 6f 75 73 20 76 65 72 73  ke previous vers
6840: 69 6f 6e 73 20 6f 66 20 54 43 4c 20 54 4c 53 2c  ions of TCL TLS,
6850: 20 6f 6e 6c 79 20 69 66 20 74 68 65 20 63 61 6c   only if the cal
6860: 6c 62 61 63 6b 20 67 65 6e 65 72 61 74 65 73 20  lback generates 
6870: 61 6e 20 65 72 72 6f 72 2c 0a 77 69 6c 6c 20 74  an error,.will t
6880: 68 65 20 3c 62 3e 62 67 65 72 72 6f 72 3c 2f 62  he <b>bgerror</b
6890: 3e 20 63 6f 6d 6d 61 6e 64 20 77 69 6c 6c 20 62  > command will b
68a0: 65 20 69 6e 76 6f 6b 65 64 20 77 69 74 68 20 74  e invoked with t
68b0: 68 65 20 65 72 72 6f 72 20 69 6e 66 6f 72 6d 61  he error informa
68c0: 74 69 6f 6e 2e 0a 3c 2f 70 3e 0a 0a 3c 64 6c 3e  tion..</p>..<dl>
68d0: 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67  .    <dt><strong
68e0: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e  >-command</stron
68f0: 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c  g> <em>callback<
6900: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  /em></dt>.    <d
6910: 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20  d>..Invokes the 
6920: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61  specified <em>ca
6930: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69  llback</em> scri
6940: 70 74 20 61 74 20 73 65 76 65 72 61 6c 20 70 6f  pt at several po
6950: 69 6e 74 73 0a 09 64 75 72 69 6e 67 20 74 68 65  ints..during the
6960: 20 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61   OpenSSL handsha
6970: 6b 65 20 61 6e 64 20 75 73 65 2e 20 53 65 65 20  ke and use. See 
6980: 62 65 6c 6f 77 20 66 6f 72 20 74 68 65 20 70 6f  below for the po
6990: 73 73 69 62 6c 65 0a 09 61 72 67 75 6d 65 6e 74  ssible..argument
69a0: 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 20  s passed to the 
69b0: 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70 74 2e  callback script.
69c0: 20 56 61 6c 75 65 73 20 72 65 74 75 72 6e 65 64   Values returned
69d0: 20 66 72 6f 6d 20 74 68 65 0a 09 63 61 6c 6c 62   from the..callb
69e0: 61 63 6b 20 61 72 65 20 69 67 6e 6f 72 65 64 2e  ack are ignored.
69f0: 0a 20 20 20 20 3c 62 72 3e 0a 20 20 20 20 3c 64  .    <br>.    <d
6a00: 6c 3e 0a 09 3c 64 74 3e 0a 09 3c 73 74 72 6f 6e  l>..<dt>..<stron
6a10: 67 3e 65 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 3e  g>error</strong>
6a20: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 49 64 20 6d   <em>channelId m
6a30: 65 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64  essage</em>..</d
6a40: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 20 20 54 68  t>..<dd>..    Th
6a50: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62  is form of callb
6a60: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77  ack is invoked w
6a70: 68 65 6e 65 76 65 72 20 61 6e 20 65 72 72 6f 72  henever an error
6a80: 20 6f 63 63 75 72 73 20 64 75 72 69 6e 67 20 74   occurs during t
6a90: 68 65 0a 09 20 20 20 20 69 6e 69 74 69 61 6c 20  he..    initial 
6aa0: 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e 64  connection, hand
6ab0: 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f 70  shake, or I/O op
6ac0: 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20 3c 65  erations. The <e
6ad0: 6d 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 0a 09  m>message</em>..
6ae0: 20 20 20 20 61 72 67 75 6d 65 6e 74 20 63 61 6e      argument can
6af0: 20 62 65 20 66 72 6f 6d 20 74 68 65 20 54 63 6c   be from the Tcl
6b00: 5f 45 72 72 6e 6f 4d 73 67 2c 20 4f 70 65 6e 53  _ErrnoMsg, OpenS
6b10: 53 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 20  SL function..   
6b20: 20 3c 63 6f 64 65 3e 45 52 52 5f 72 65 61 73 6f   <code>ERR_reaso
6b30: 6e 5f 65 72 72 6f 72 5f 73 74 72 69 6e 67 28 29  n_error_string()
6b40: 3c 2f 63 6f 64 65 3e 2c 20 6f 72 20 61 20 63 75  </code>, or a cu
6b50: 73 74 6f 6d 20 6d 65 73 73 61 67 65 2e 0a 09 3c  stom message...<
6b60: 2f 64 64 3e 0a 09 3c 62 72 3e 0a 09 3c 64 74 3e  /dd>..<br>..<dt>
6b70: 0a 09 20 20 20 20 3c 73 74 72 6f 6e 67 3e 69 6e  ..    <strong>in
6b80: 66 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  fo</strong> <em>
6b90: 63 68 61 6e 6e 65 6c 49 64 20 6d 61 6a 6f 72 20  channelId major 
6ba0: 6d 69 6e 6f 72 20 6d 65 73 73 61 67 65 20 74 79  minor message ty
6bb0: 70 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09  pe</em>..</dt>..
6bc0: 3c 64 64 3e 0a 09 20 20 20 20 20 54 68 69 73 20  <dd>..     This 
6bd0: 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b  form of callback
6be0: 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74   is invoked by t
6bf0: 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74  he OpenSSL funct
6c00: 69 6f 6e 0a 09 20 20 20 20 3c 63 6f 64 65 3e 53  ion..    <code>S
6c10: 53 4c 5f 73 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c  SL_set_info_call
6c20: 62 61 63 6b 28 29 3c 2f 63 6f 64 65 3e 20 64 75  back()</code> du
6c30: 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c  ring the initial
6c40: 20 63 6f 6e 6e 65 63 74 69 6f 6e 0a 09 20 20 20   connection..   
6c50: 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 20 6f   and handshake o
6c60: 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 65 20 3c  perations. The <
6c70: 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 20 61 72 67  em>type</em> arg
6c80: 75 6d 65 6e 74 20 69 73 20 6e 65 77 20 66 6f 72  ument is new for
6c90: 0a 09 20 20 20 20 54 4c 53 20 31 2e 38 2e 20 54  ..    TLS 1.8. T
6ca0: 68 65 20 61 72 67 75 6d 65 6e 74 73 20 61 72 65  he arguments are
6cb0: 3a 0a 09 3c 62 72 3e 0a 09 3c 75 6c 3e 0a 09 3c  :..<br>..<ul>..<
6cc0: 6c 69 3e 50 6f 73 73 69 62 6c 65 20 76 61 6c 75  li>Possible valu
6cd0: 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61 6a 6f 72  es for <em>major
6ce0: 3c 2f 65 6d 3e 20 61 72 65 3a 0a 09 20 20 20 20  </em> are:..    
6cf0: 3c 63 6f 64 65 3e 68 61 6e 64 73 68 61 6b 65 2c  <code>handshake,
6d00: 20 61 6c 65 72 74 2c 20 63 6f 6e 6e 65 63 74 2c   alert, connect,
6d10: 20 61 63 63 65 70 74 3c 2f 63 6f 64 65 3e 2e 3c   accept</code>.<
6d20: 2f 6c 69 3e 0a 09 3c 6c 69 3e 50 6f 73 73 69 62  /li>..<li>Possib
6d30: 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 3c 65  le values for <e
6d40: 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65  m>minor</em> are
6d50: 3a 0a 09 20 20 20 20 3c 63 6f 64 65 3e 73 74 61  :..    <code>sta
6d60: 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61 64 2c 20  rt, done, read, 
6d70: 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 69  write, loop, exi
6d80: 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09  t</code>.</li>..
6d90: 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 6d 65 73 73  <li>The <em>mess
6da0: 61 67 65 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e  age</em> argumen
6db0: 74 20 69 73 20 61 20 64 65 73 63 72 69 70 74 69  t is a descripti
6dc0: 76 65 20 73 74 72 69 6e 67 20 77 68 69 63 68 20  ve string which 
6dd0: 6d 61 79 0a 09 20 20 20 20 62 65 20 67 65 6e 65  may..    be gene
6de0: 72 61 74 65 64 20 65 69 74 68 65 72 20 62 79 20  rated either by 
6df0: 3c 63 6f 64 65 3e 53 53 4c 5f 73 74 61 74 65 5f  <code>SSL_state_
6e00: 73 74 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63  string_long()</c
6e10: 6f 64 65 3e 20 6f 72 20 62 79 0a 09 20 20 20 20  ode> or by..    
6e20: 3c 63 6f 64 65 3e 53 53 4c 5f 61 6c 65 72 74 5f  <code>SSL_alert_
6e30: 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67  desc_string_long
6e40: 28 29 3c 2f 63 6f 64 65 3e 2c 20 64 65 70 65 6e  ()</code>, depen
6e50: 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f 6e 74  ding on the cont
6e60: 65 78 74 2e 3c 2f 6c 69 3e 0a 09 3c 6c 69 3e 46  ext.</li>..<li>F
6e70: 6f 72 20 61 6c 65 72 74 73 2c 20 74 68 65 20 70  or alerts, the p
6e80: 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20 66  ossible values f
6e90: 6f 72 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e  or <em>type</em>
6ea0: 20 61 72 65 3a 0a 09 20 20 20 20 3c 63 6f 64 65   are:..    <code
6eb0: 3e 77 61 72 6e 69 6e 67 2c 20 66 61 74 61 6c 2c  >warning, fatal,
6ec0: 20 61 6e 64 20 75 6e 6b 6e 6f 77 6e 3c 2f 63 6f   and unknown</co
6ed0: 64 65 3e 2e 20 46 6f 72 20 6f 74 68 65 72 73 2c  de>. For others,
6ee0: 0a 09 20 20 20 20 3c 63 6f 64 65 3e 69 6e 66 6f  ..    <code>info
6ef0: 3c 2f 63 6f 64 65 3e 20 69 73 20 75 73 65 64 2e  </code> is used.
6f00: 3c 2f 6c 69 3e 0a 09 3c 2f 75 6c 3e 0a 09 3c 2f  </li>..</ul>..</
6f10: 64 64 3e 0a 09 3c 64 74 3e 0a 09 3c 73 74 72 6f  dd>..<dt>..<stro
6f20: 6e 67 3e 6d 65 73 73 61 67 65 3c 2f 73 74 72 6f  ng>message</stro
6f30: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 49  ng> <em>channelI
6f40: 64 20 64 69 72 65 63 74 69 6f 6e 20 76 65 72 73  d direction vers
6f50: 69 6f 6e 20 63 6f 6e 74 65 6e 74 5f 74 79 70 65  ion content_type
6f60: 20 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 3c   message</em>..<
6f70: 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 20 20  /dt>..<dd>..    
6f80: 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c  This form of cal
6f90: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64  lback is invoked
6fa0: 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20   by the OpenSSL 
6fb0: 66 75 6e 63 74 69 6f 6e 0a 09 20 20 20 20 3c 63  function..    <c
6fc0: 6f 64 65 3e 53 53 4c 5f 73 65 74 5f 6d 73 67 5f  ode>SSL_set_msg_
6fd0: 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 63 6f 64 65  callback()</code
6fe0: 3e 20 77 68 65 6e 65 76 65 72 20 61 20 6d 65 73  > whenever a mes
6ff0: 73 61 67 65 20 69 73 20 73 65 6e 74 20 6f 72 0a  sage is sent or.
7000: 09 20 20 20 20 72 65 63 65 69 76 65 64 20 64 75  .    received du
7010: 72 69 6e 67 20 74 68 65 20 69 6e 69 74 69 61 6c  ring the initial
7020: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c 20 68 61 6e   connection, han
7030: 64 73 68 61 6b 65 2c 20 6f 72 20 49 2f 4f 20 6f  dshake, or I/O o
7040: 70 65 72 61 74 69 6f 6e 73 2e 0a 09 20 20 20 20  perations...    
7050: 49 74 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c  It is only avail
7060: 61 62 6c 65 20 77 68 65 6e 20 4f 70 65 6e 53 53  able when OpenSS
7070: 4c 20 69 73 20 63 6f 6d 70 6c 69 65 64 20 77 69  L is complied wi
7080: 74 68 20 74 68 65 0a 09 20 20 20 20 3c 65 6d 3e  th the..    <em>
7090: 65 6e 61 62 6c 65 2d 73 73 6c 2d 74 72 61 63 65  enable-ssl-trace
70a0: 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e 2e 20 41 72  </em> option. Ar
70b0: 67 75 6d 65 6e 74 73 20 61 72 65 3a 20 3c 65 6d  guments are: <em
70c0: 3e 64 69 72 65 63 74 69 6f 6e 3c 2f 65 6d 3e 0a  >direction</em>.
70d0: 09 20 20 20 20 69 73 20 3c 62 3e 53 65 6e 74 3c  .    is <b>Sent<
70e0: 2f 62 3e 20 6f 72 20 3c 62 3e 52 65 63 65 69 76  /b> or <b>Receiv
70f0: 65 64 3c 2f 62 3e 2c 20 3c 65 6d 3e 76 65 72 73  ed</b>, <em>vers
7100: 69 6f 6e 3c 2f 65 6d 3e 20 69 73 20 74 68 65 20  ion</em> is the 
7110: 70 72 6f 74 6f 63 6f 6c 0a 09 20 20 20 20 76 65  protocol..    ve
7120: 72 73 69 6f 6e 2c 20 3c 65 6d 3e 63 6f 6e 74 65  rsion, <em>conte
7130: 6e 74 5f 74 79 70 65 3c 2f 65 6d 3e 20 69 73 20  nt_type</em> is 
7140: 74 68 65 20 6d 65 73 73 61 67 65 20 63 6f 6e 74  the message cont
7150: 65 6e 74 20 74 79 70 65 2c 20 61 6e 64 0a 09 20  ent type, and.. 
7160: 20 20 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f     <em>message</
7170: 65 6d 3e 20 69 73 20 6d 6f 72 65 20 69 6e 66 6f  em> is more info
7180: 20 66 72 6f 6d 20 74 68 65 20 3c 63 6f 64 65 3e   from the <code>
7190: 53 53 4c 5f 74 72 61 63 65 3c 2f 63 6f 64 65 3e  SSL_trace</code>
71a0: 20 41 50 49 2e 0a 09 20 20 20 20 54 68 69 73 20   API...    This 
71b0: 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e 65 77 20  callback is new 
71c0: 66 6f 72 20 54 4c 53 20 31 2e 38 2e 0a 09 3c 2f  for TLS 1.8...</
71d0: 64 64 3e 0a 09 3c 62 72 3e 0a 09 3c 64 74 3e 0a  dd>..<br>..<dt>.
71e0: 09 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e  .<strong>session
71f0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68  </strong> <em>ch
7200: 61 6e 6e 65 6c 49 64 20 73 65 73 73 69 6f 6e 5f  annelId session_
7210: 69 64 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69  id ticket lifeti
7220: 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09  me</em>..</dt>..
7230: 3c 64 64 3e 0a 09 20 20 20 20 54 68 69 73 20 66  <dd>..    This f
7240: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
7250: 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68  is invoked by th
7260: 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69  e OpenSSL functi
7270: 6f 6e 0a 09 20 20 20 20 3c 63 6f 64 65 3e 53 53  on..    <code>SS
7280: 4c 5f 43 54 58 5f 73 65 73 73 5f 73 65 74 5f 6e  L_CTX_sess_set_n
7290: 65 77 5f 63 62 28 29 3c 2f 63 6f 64 65 3e 20 77  ew_cb()</code> w
72a0: 68 65 6e 65 76 65 72 20 61 20 6e 65 77 20 73 65  henever a new se
72b0: 73 73 69 6f 6e 20 69 64 20 69 73 0a 09 20 20 20  ssion id is..   
72c0: 20 73 65 6e 74 20 62 79 20 74 68 65 20 73 65 72   sent by the ser
72d0: 76 65 72 20 64 75 72 69 6e 67 20 74 68 65 20 69  ver during the i
72e0: 6e 69 74 69 61 6c 20 63 6f 6e 6e 65 63 74 69 6f  nitial connectio
72f0: 6e 20 61 6e 64 20 68 61 6e 64 73 68 61 6b 65 2c  n and handshake,
7300: 20 62 75 74 0a 09 20 20 20 20 63 61 6e 20 61 6c   but..    can al
7310: 73 6f 20 62 65 20 72 65 63 65 69 76 65 64 20 6c  so be received l
7320: 61 74 65 72 20 69 66 20 74 68 65 20 3c 62 3e 2d  ater if the <b>-
7330: 70 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c 2f  post_handshake</
7340: 62 3e 20 6f 70 74 69 6f 6e 20 69 73 0a 09 20 20  b> option is..  
7350: 20 20 75 73 65 64 2e 20 41 72 67 75 6d 65 6e 74    used. Argument
7360: 73 20 61 72 65 3a 20 3c 65 6d 3e 73 65 73 73 69  s are: <em>sessi
7370: 6f 6e 5f 69 64 3c 2f 65 6d 3e 20 69 73 20 74 68  on_id</em> is th
7380: 65 20 63 75 72 72 65 6e 74 0a 09 20 20 20 20 73  e current..    s
7390: 65 73 73 69 6f 6e 20 69 64 65 6e 74 69 66 69 65  ession identifie
73a0: 72 2c 20 3c 65 6d 3e 74 69 63 6b 65 74 3c 2f 65  r, <em>ticket</e
73b0: 6d 3e 20 69 73 20 74 68 65 20 73 65 73 73 69 6f  m> is the sessio
73c0: 6e 20 74 69 63 6b 65 74 20 69 6e 66 6f 2c 20 61  n ticket info, a
73d0: 6e 64 0a 09 20 20 20 20 3c 65 6d 3e 6c 69 66 65  nd..    <em>life
73e0: 74 69 6d 65 3c 2f 65 6d 3e 20 69 73 20 74 68 65  time</em> is the
73f0: 20 74 68 65 20 74 69 63 6b 65 74 20 6c 69 66 65   the ticket life
7400: 74 69 6d 65 20 69 6e 20 73 65 63 6f 6e 64 73 2e  time in seconds.
7410: 0a 09 20 20 20 20 54 68 69 73 20 63 61 6c 6c 62  ..    This callb
7420: 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72 20 54  ack is new for T
7430: 4c 53 20 31 2e 38 2e 0a 09 3c 2f 64 64 3e 0a 20  LS 1.8...</dd>. 
7440: 20 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64     </dl>.    </d
7450: 64 3e 0a 3c 2f 64 6c 3e 0a 3c 62 72 3e 0a 3c 64  d>.</dl>.<br>.<d
7460: 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f  l>.    <dt><stro
7470: 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74  ng>-password</st
7480: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61  rong> <em>callba
7490: 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  ck</em></dt>.   
74a0: 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74   <dd>..Invokes t
74b0: 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d  he specified <em
74c0: 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73  >callback</em> s
74d0: 63 72 69 70 74 20 77 68 65 6e 20 4f 70 65 6e 53  cript when OpenS
74e0: 53 4c 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62 74  SL needs to..obt
74f0: 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e 20  ain a password. 
7500: 53 65 65 20 62 65 6c 6f 77 20 66 6f 72 20 74 68  See below for th
7510: 65 20 70 6f 73 73 69 62 6c 65 20 61 72 67 75 6d  e possible argum
7520: 65 6e 74 73 20 70 61 73 73 65 64 20 74 6f 0a 09  ents passed to..
7530: 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 63 72  the callback scr
7540: 69 70 74 2e 20 53 65 65 20 62 65 6c 6f 77 20 66  ipt. See below f
7550: 6f 72 20 76 61 6c 69 64 20 72 65 74 75 72 6e 20  or valid return 
7560: 76 61 6c 75 65 73 2e 0a 09 3c 62 72 3e 0a 09 3c  values...<br>..<
7570: 64 6c 3e 0a 09 20 20 20 20 3c 64 74 3e 0a 09 20  dl>..    <dt>.. 
7580: 20 20 20 3c 73 74 72 6f 6e 67 3e 70 61 73 73 77     <strong>passw
7590: 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ord</strong> <em
75a0: 3e 72 77 66 6c 61 67 20 73 69 7a 65 3c 2f 65 6d  >rwflag size</em
75b0: 3e 0a 09 20 20 20 20 3c 2f 64 74 3e 0a 09 20 20  >..    </dt>..  
75c0: 20 20 3c 64 64 3e 0a 09 09 49 6e 76 6f 6b 65 64    <dd>...Invoked
75d0: 20 77 68 65 6e 20 6c 6f 61 64 69 6e 67 20 6f 72   when loading or
75e0: 20 73 74 6f 72 69 6e 67 20 61 20 50 45 4d 20 63   storing a PEM c
75f0: 65 72 74 69 66 69 63 61 74 65 20 77 69 74 68 20  ertificate with 
7600: 65 6e 63 72 79 70 74 69 6f 6e 2e 0a 09 09 57 68  encryption....Wh
7610: 65 72 65 20 3c 65 6d 3e 72 77 66 6c 61 67 3c 2f  ere <em>rwflag</
7620: 65 6d 3e 20 69 73 20 30 20 66 6f 72 20 72 65 61  em> is 0 for rea
7630: 64 69 6e 67 2f 64 65 63 72 79 70 74 69 6f 6e 20  ding/decryption 
7640: 6f 72 20 31 20 66 6f 72 0a 09 09 77 72 69 74 69  or 1 for...writi
7650: 6e 67 2f 65 6e 63 72 79 70 74 69 6f 6e 20 28 63  ng/encryption (c
7660: 61 6e 20 70 72 6f 6d 70 74 20 75 73 65 72 20 74  an prompt user t
7670: 6f 20 63 6f 6e 66 69 72 6d 29 20 61 6e 64 20 3c  o confirm) and <
7680: 65 6d 3e 73 69 7a 65 3c 2f 65 6d 3e 20 69 73 0a  em>size</em> is.
7690: 09 09 74 68 65 20 6d 61 78 20 70 61 73 73 77 6f  ..the max passwo
76a0: 72 64 20 6c 65 6e 67 74 68 20 69 6e 20 62 79 74  rd length in byt
76b0: 65 73 2e 20 54 68 65 20 63 61 6c 6c 62 61 63 6b  es. The callback
76c0: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 74   should return t
76d0: 68 65 0a 09 09 70 61 73 73 77 6f 72 64 20 61 73  he...password as
76e0: 20 61 20 73 74 72 69 6e 67 2e 20 42 6f 74 68 20   a string. Both 
76f0: 61 72 67 75 6d 65 6e 74 73 20 61 72 65 20 6e 65  arguments are ne
7700: 77 20 66 6f 72 20 54 4c 53 20 31 2e 38 2e 0a 09  w for TLS 1.8...
7710: 20 20 20 20 3c 2f 64 64 3e 0a 09 3c 2f 64 6c 3e      </dd>..</dl>
7720: 0a 20 20 20 20 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e  .    </dd>.</dl>
7730: 0a 3c 62 72 3e 0a 3c 64 6c 3e 0a 20 20 20 20 3c  .<br>.<dl>.    <
7740: 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 76 61 6c 69  dt><strong>-vali
7750: 64 61 74 65 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72  datecommand</str
7760: 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63  ong> <em>callbac
7770: 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  k</em></dt>.    
7780: 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68  <dd>..Invokes th
7790: 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e  e specified <em>
77a0: 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63  callback</em> sc
77b0: 72 69 70 74 20 64 75 72 69 6e 67 20 68 61 6e 64  ript during hand
77c0: 73 68 61 6b 65 20 69 6e 0a 09 6f 72 64 65 72 20  shake in..order 
77d0: 74 6f 20 76 61 6c 69 64 61 74 65 20 74 68 65 20  to validate the 
77e0: 70 72 6f 76 69 64 65 64 20 76 61 6c 75 65 28 73  provided value(s
77f0: 29 2e 20 53 65 65 20 62 65 6c 6f 77 20 66 6f 72  ). See below for
7800: 20 74 68 65 20 70 6f 73 73 69 62 6c 65 0a 09 61   the possible..a
7810: 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65 64 20  rguments passed 
7820: 74 6f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20  to the callback 
7830: 73 63 72 69 70 74 2e 20 49 66 20 6e 6f 74 20 73  script. If not s
7840: 70 65 63 69 66 69 65 64 2c 20 4f 70 65 6e 53 53  pecified, OpenSS
7850: 4c 0a 09 77 69 6c 6c 20 61 63 63 65 70 74 20 76  L..will accept v
7860: 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65  alid certificate
7870: 73 20 61 6e 64 20 65 78 74 65 6e 73 69 6f 6e 73  s and extensions
7880: 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20 74 68 65  ...To reject the
7890: 20 76 61 6c 75 65 20 61 6e 64 20 61 62 6f 72 74   value and abort
78a0: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c   the connection,
78b0: 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 73 68   the callback sh
78c0: 6f 75 6c 64 20 72 65 74 75 72 6e 20 30 2e 0a 09  ould return 0...
78d0: 54 6f 20 61 63 63 65 70 74 20 74 68 65 20 76 61  To accept the va
78e0: 6c 75 65 20 61 6e 64 20 63 6f 6e 74 69 6e 75 65  lue and continue
78f0: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2c   the connection,
7900: 20 69 74 20 73 68 6f 75 6c 64 20 72 65 74 75 72   it should retur
7910: 6e 20 31 2e 0a 09 54 6f 20 72 65 6a 65 63 74 20  n 1...To reject 
7920: 74 68 65 20 76 61 6c 75 65 2c 20 62 75 74 20 63  the value, but c
7930: 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f 6e 6e  ontinue the conn
7940: 65 63 74 69 6f 6e 2c 20 69 74 20 73 68 6f 75 6c  ection, it shoul
7950: 64 20 72 65 74 75 72 6e 20 32 2e 0a 09 3c 62 72  d return 2...<br
7960: 3e 0a 09 3c 64 6c 3e 0a 09 20 20 20 20 3c 64 74  >..<dl>..    <dt
7970: 3e 0a 09 09 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e  >...<strong>alpn
7980: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68  </strong> <em>ch
7990: 61 6e 6e 65 6c 49 64 20 70 72 6f 74 6f 63 6f 6c  annelId protocol
79a0: 20 6d 61 74 63 68 3c 2f 65 6d 3e 0a 09 09 3c 2f   match</em>...</
79b0: 64 74 3e 0a 09 20 20 20 20 3c 64 64 3e 0a 09 09  dt>..    <dd>...
79c0: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69  For servers, thi
79d0: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
79e0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68  ck is invoked wh
79f0: 65 6e 20 74 68 65 20 63 6c 69 65 6e 74 20 41 4c  en the client AL
7a00: 50 4e 0a 09 09 65 78 74 65 6e 73 69 6f 6e 20 69  PN...extension i
7a10: 73 20 72 65 63 65 69 76 65 64 2e 20 49 66 20 3c  s received. If <
7a20: 65 6d 3e 6d 61 74 63 68 3c 2f 65 6d 3e 20 69 73  em>match</em> is
7a30: 20 74 72 75 65 2c 20 3c 65 6d 3e 70 72 6f 74 6f   true, <em>proto
7a40: 63 6f 6c 3c 2f 65 6d 3e 0a 09 09 69 73 20 74 68  col</em>...is th
7a50: 65 20 66 69 72 73 74 20 3c 62 3e 2d 61 6c 70 6e  e first <b>-alpn
7a60: 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20 73 70 65 63  </b> option spec
7a70: 69 66 69 65 64 20 70 72 6f 74 6f 63 6f 6c 20 63  ified protocol c
7a80: 6f 6d 6d 6f 6e 20 74 6f 20 62 6f 74 68 0a 09 09  ommon to both...
7a90: 74 68 65 20 63 6c 69 65 6e 74 20 61 6e 64 20 73  the client and s
7aa0: 65 72 76 65 72 2e 20 49 66 20 6e 6f 74 2c 20 74  erver. If not, t
7ab0: 68 65 20 66 69 72 73 74 20 63 6c 69 65 6e 74 20  he first client 
7ac0: 73 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f 63  specified protoc
7ad0: 6f 6c 20 69 73 0a 09 09 75 73 65 64 2e 20 49 74  ol is...used. It
7ae0: 20 69 73 20 63 61 6c 6c 65 64 20 61 66 74 65 72   is called after
7af0: 20 74 68 65 20 68 65 6c 6c 6f 20 61 6e 64 20 41   the hello and A
7b00: 4c 50 4e 20 63 61 6c 6c 62 61 63 6b 73 2e 0a 09  LPN callbacks...
7b10: 09 54 68 69 73 20 63 61 6c 6c 62 61 63 6b 20 69  .This callback i
7b20: 73 20 6e 65 77 20 66 6f 72 20 54 4c 53 20 31 2e  s new for TLS 1.
7b30: 38 2e 0a 09 20 20 20 20 3c 2f 64 64 3e 0a 09 20  8...    </dd>.. 
7b40: 20 20 20 3c 62 72 3e 0a 09 20 20 20 20 3c 64 74     <br>..    <dt
7b50: 3e 0a 09 09 3c 73 74 72 6f 6e 67 3e 68 65 6c 6c  >...<strong>hell
7b60: 6f 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  o</strong> <em>c
7b70: 68 61 6e 6e 65 6c 49 64 20 73 65 72 76 65 72 6e  hannelId servern
7b80: 61 6d 65 3c 2f 65 6d 3e 0a 09 20 20 20 20 3c 2f  ame</em>..    </
7b90: 64 74 3e 0a 09 20 20 20 20 3c 64 64 3e 0a 09 09  dt>..    <dd>...
7ba0: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69  For servers, thi
7bb0: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
7bc0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 64 75  ck is invoked du
7bd0: 72 69 6e 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c  ring client hell
7be0: 6f 0a 09 09 6d 65 73 73 61 67 65 20 70 72 6f 63  o...message proc
7bf0: 65 73 73 69 6e 67 2e 20 54 68 65 20 70 75 72 70  essing. The purp
7c00: 6f 73 65 20 69 73 20 73 6f 20 74 68 65 20 73 65  ose is so the se
7c10: 72 76 65 72 20 63 61 6e 20 73 65 6c 65 63 74 20  rver can select 
7c20: 74 68 65 0a 09 09 61 70 70 72 6f 70 72 69 61 74  the...appropriat
7c30: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 74 6f  e certificate to
7c40: 20 70 72 65 73 65 6e 74 20 74 6f 20 74 68 65 20   present to the 
7c50: 63 6c 69 65 6e 74 2c 20 61 6e 64 20 74 6f 20 6d  client, and to m
7c60: 61 6b 65 20 6f 74 68 65 72 0a 09 09 63 6f 6e 66  ake other...conf
7c70: 69 67 75 72 61 74 69 6f 6e 20 61 64 6a 75 73 74  iguration adjust
7c80: 6d 65 6e 74 73 20 72 65 6c 65 76 61 6e 74 20 74  ments relevant t
7c90: 6f 20 74 68 61 74 20 73 65 72 76 65 72 20 6e 61  o that server na
7ca0: 6d 65 20 61 6e 64 20 69 74 73 0a 09 09 63 6f 6e  me and its...con
7cb0: 66 69 67 75 72 61 74 69 6f 6e 2e 20 49 74 20 69  figuration. It i
7cc0: 73 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 65 20  s called before 
7cd0: 74 68 65 20 53 4e 49 20 61 6e 64 20 41 4c 50 4e  the SNI and ALPN
7ce0: 20 63 61 6c 6c 62 61 63 6b 73 2e 0a 09 09 54 68   callbacks....Th
7cf0: 69 73 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 6e  is callback is n
7d00: 65 77 20 66 6f 72 20 54 4c 53 20 31 2e 38 2e 0a  ew for TLS 1.8..
7d10: 09 20 20 20 20 3c 2f 64 64 3e 0a 09 20 20 20 20  .    </dd>..    
7d20: 3c 62 72 3e 0a 09 20 20 20 20 3c 64 74 3e 0a 09  <br>..    <dt>..
7d30: 09 3c 73 74 72 6f 6e 67 3e 73 6e 69 3c 2f 73 74  .<strong>sni</st
7d40: 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65  rong> <em>channe
7d50: 6c 49 64 20 73 65 72 76 65 72 6e 61 6d 65 3c 2f  lId servername</
7d60: 65 6d 3e 0a 09 20 20 20 20 3c 2f 64 74 3e 0a 09  em>..    </dt>..
7d70: 20 20 20 20 3c 64 64 3e 0a 09 09 46 6f 72 20 73      <dd>...For s
7d80: 65 72 76 65 72 73 2c 20 74 68 69 73 20 66 6f 72  ervers, this for
7d90: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
7da0: 20 69 6e 76 6f 6b 65 64 20 77 68 65 6e 20 74 68   invoked when th
7db0: 65 20 53 65 72 76 65 72 20 4e 61 6d 65 0a 09 09  e Server Name...
7dc0: 49 6e 64 69 63 61 74 69 6f 6e 20 28 53 4e 49 29  Indication (SNI)
7dd0: 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65   extension is re
7de0: 63 65 69 76 65 64 2e 20 54 68 65 20 3c 65 6d 3e  ceived. The <em>
7df0: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a  servername</em>.
7e00: 09 09 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68  ..argument is th
7e10: 65 20 63 6c 69 65 6e 74 20 70 72 6f 76 69 64 65  e client provide
7e20: 64 20 73 65 72 76 65 72 20 6e 61 6d 65 20 69 6e  d server name in
7e30: 20 74 68 65 20 3c 62 3e 2d 73 65 72 76 65 72 6e   the <b>-servern
7e40: 61 6d 65 3c 2f 62 3e 0a 09 09 6f 70 74 69 6f 6e  ame</b>...option
7e50: 2e 20 54 68 65 20 70 75 72 70 6f 73 65 20 69 73  . The purpose is
7e60: 20 73 6f 20 77 68 65 6e 20 61 20 73 65 72 76 65   so when a serve
7e70: 72 20 73 75 70 70 6f 72 74 73 20 6d 75 6c 74 69  r supports multi
7e80: 70 6c 65 20 6e 61 6d 65 73 2c 20 74 68 65 0a 09  ple names, the..
7e90: 09 72 69 67 68 74 20 63 65 72 74 69 66 69 63 61  .right certifica
7ea0: 74 65 20 63 61 6e 20 62 65 20 75 73 65 64 2e 20  te can be used. 
7eb0: 49 74 20 69 73 20 63 61 6c 6c 65 64 20 61 66 74  It is called aft
7ec0: 65 72 20 74 68 65 20 68 65 6c 6c 6f 20 63 61 6c  er the hello cal
7ed0: 6c 62 61 63 6b 0a 09 09 62 75 74 20 62 65 66 6f  lback...but befo
7ee0: 72 65 20 74 68 65 20 41 4c 50 4e 20 63 61 6c 6c  re the ALPN call
7ef0: 62 61 63 6b 2e 0a 09 09 54 68 69 73 20 63 61 6c  back....This cal
7f00: 6c 62 61 63 6b 20 69 73 20 6e 65 77 20 66 6f 72  lback is new for
7f10: 20 54 4c 53 20 31 2e 38 2e 0a 09 20 20 20 20 3c   TLS 1.8...    <
7f20: 2f 64 64 3e 0a 09 20 20 20 20 3c 62 72 3e 0a 09  /dd>..    <br>..
7f30: 20 20 20 20 3c 64 74 3e 0a 09 09 3c 73 74 72 6f      <dt>...<stro
7f40: 6e 67 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f 6e  ng>verify</stron
7f50: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 49 64  g> <em>channelId
7f60: 20 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74   depth cert stat
7f70: 75 73 20 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 20  us error</em>.. 
7f80: 20 20 20 3c 2f 64 74 3e 0a 09 20 20 20 20 3c 64     </dt>..    <d
7f90: 64 3e 0a 09 09 54 68 69 73 20 66 6f 72 6d 20 6f  d>...This form o
7fa0: 66 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e  f callback is in
7fb0: 76 6f 6b 65 64 20 62 79 20 4f 70 65 6e 53 53 4c  voked by OpenSSL
7fc0: 20 77 68 65 6e 20 61 20 6e 65 77 20 63 65 72 74   when a new cert
7fd0: 69 66 69 63 61 74 65 0a 09 09 69 73 20 72 65 63  ificate...is rec
7fe0: 65 69 76 65 64 20 66 72 6f 6d 20 74 68 65 20 70  eived from the p
7ff0: 65 65 72 2e 20 49 74 20 61 6c 6c 6f 77 73 20 74  eer. It allows t
8000: 68 65 20 63 6c 69 65 6e 74 20 74 6f 20 63 68 65  he client to che
8010: 63 6b 20 74 68 65 0a 09 09 63 65 72 74 69 66 69  ck the...certifi
8020: 63 61 74 65 20 76 65 72 69 66 69 63 61 74 69 6f  cate verificatio
8030: 6e 20 72 65 73 75 6c 74 73 20 61 6e 64 20 63 68  n results and ch
8040: 6f 6f 73 65 20 77 68 65 74 68 65 72 20 74 6f 20  oose whether to 
8050: 63 6f 6e 74 69 6e 75 65 0a 09 09 6f 72 20 6e 6f  continue...or no
8060: 74 2e 20 49 74 20 69 73 20 63 61 6c 6c 65 64 20  t. It is called 
8070: 66 6f 72 20 65 61 63 68 20 63 65 72 74 69 66 69  for each certifi
8080: 63 61 74 65 20 69 6e 20 74 68 65 20 63 65 72 74  cate in the cert
8090: 69 66 69 63 61 74 65 20 63 68 61 69 6e 2e 0a 09  ificate chain...
80a0: 09 3c 75 6c 3e 0a 09 09 3c 6c 69 3e 54 68 65 20  .<ul>...<li>The 
80b0: 3c 65 6d 3e 64 65 70 74 68 3c 2f 65 6d 3e 20 61  <em>depth</em> a
80c0: 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 69  rgument is the i
80d0: 6e 74 65 67 65 72 20 64 65 70 74 68 20 6f 66 20  nteger depth of 
80e0: 74 68 65 0a 09 09 63 65 72 74 69 66 69 63 61 74  the...certificat
80f0: 65 20 69 6e 20 74 68 65 20 63 65 72 74 69 66 69  e in the certifi
8100: 63 61 74 65 20 63 68 61 69 6e 2c 20 77 68 65 72  cate chain, wher
8110: 65 20 30 20 69 73 20 74 68 65 20 70 65 65 72 20  e 0 is the peer 
8120: 63 65 72 74 69 66 69 63 61 74 65 0a 09 09 61 6e  certificate...an
8130: 64 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 20  d higher values 
8140: 67 6f 69 6e 67 20 75 70 20 74 6f 20 74 68 65 20  going up to the 
8150: 43 65 72 74 69 66 69 63 61 74 65 20 41 75 74 68  Certificate Auth
8160: 6f 72 69 74 79 20 28 43 41 29 2e 3c 2f 6c 69 3e  ority (CA).</li>
8170: 0a 09 09 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 63  ...<li>The <em>c
8180: 65 72 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e  ert</em> argumen
8190: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b  t is a list of k
81a0: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73  ey-value pairs s
81b0: 69 6d 69 6c 61 72 0a 09 09 74 6f 20 74 68 6f 73  imilar...to thos
81c0: 65 20 72 65 74 75 72 6e 65 64 20 62 79 0a 09 09  e returned by...
81d0: 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73  <a href="#tls::s
81e0: 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74  tatus"><strong>t
81f0: 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f  ls::status</stro
8200: 6e 67 3e 3c 2f 61 3e 2e 3c 2f 6c 69 3e 0a 09 09  ng></a>.</li>...
8210: 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 73 74 61 74  <li>The <em>stat
8220: 75 73 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74  us</em> argument
8230: 20 69 73 20 74 68 65 20 62 6f 6f 6c 65 61 6e 20   is the boolean 
8240: 76 61 6c 69 64 69 74 79 20 6f 66 20 74 68 65 0a  validity of the.
8250: 09 09 63 75 72 72 65 6e 74 20 63 65 72 74 69 66  ..current certif
8260: 69 63 61 74 65 20 77 68 65 72 65 20 30 20 69 73  icate where 0 is
8270: 20 69 6e 76 61 6c 69 64 20 61 6e 64 20 31 20 69   invalid and 1 i
8280: 73 20 76 61 6c 69 64 2e 3c 2f 6c 69 3e 0a 09 09  s valid.</li>...
8290: 3c 6c 69 3e 54 68 65 20 3c 65 6d 3e 65 72 72 6f  <li>The <em>erro
82a0: 72 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 20  r</em> argument 
82b0: 69 73 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73  is the error mes
82c0: 73 61 67 65 2c 20 69 66 20 61 6e 79 2c 20 67 65  sage, if any, ge
82d0: 6e 65 72 61 74 65 64 0a 09 09 62 79 20 3c 63 6f  nerated...by <co
82e0: 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 54  de>X509_STORE_CT
82f0: 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f 63  X_get_error()</c
8300: 6f 64 65 3e 2e 3c 2f 6c 69 3e 0a 09 09 3c 2f 75  ode>.</li>...</u
8310: 6c 3e 0a 09 20 20 20 20 3c 2f 64 64 3e 0a 09 20  l>..    </dd>.. 
8320: 20 20 20 3c 62 72 3e 0a 09 3c 2f 64 6c 3e 0a 20     <br>..</dl>. 
8330: 20 20 20 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a     </dd>.</dl>..
8340: 3c 70 3e 0a 52 65 66 65 72 65 6e 63 65 20 69 6d  <p>.Reference im
8350: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 66  plementations of
8360: 20 74 68 65 73 65 20 63 61 6c 6c 62 61 63 6b 73   these callbacks
8370: 20 61 72 65 20 70 72 6f 76 69 64 65 64 20 69 6e   are provided in
8380: 20 74 68 65 0a 64 69 73 74 72 69 62 75 74 69 6f   the.distributio
8390: 6e 20 61 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  n as <strong>tls
83a0: 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f  ::callback</stro
83b0: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  ng>, <strong>tls
83c0: 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f  ::password</stro
83d0: 6e 67 3e 2c 0a 61 6e 64 20 3c 73 74 72 6f 6e 67  ng>,.and <strong
83e0: 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63  >tls::validate_c
83f0: 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20  ommand</strong> 
8400: 72 65 73 70 65 63 74 69 76 65 6c 79 2e 20 4e 6f  respectively. No
8410: 74 65 20 74 68 61 74 20 74 68 65 73 65 20 61 72  te that these ar
8420: 65 0a 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d  e.<em>sample</em
8430: 3e 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e  > implementation
8440: 73 20 6f 6e 6c 79 2e 20 49 6e 20 61 20 6d 6f 72  s only. In a mor
8450: 65 20 72 65 61 6c 69 73 74 69 63 20 64 65 70 6c  e realistic depl
8460: 6f 79 6d 65 6e 74 0a 79 6f 75 20 77 6f 75 6c 64  oyment.you would
8470: 20 73 70 65 63 69 66 79 20 79 6f 75 72 20 6f 77   specify your ow
8480: 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69 70  n callback scrip
8490: 74 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 20 63  ts on each TLS c
84a0: 68 61 6e 6e 65 6c 20 75 73 69 6e 67 20 74 68 65  hannel using the
84b0: 0a 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e  .<strong>-comman
84c0: 64 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72  d</strong>, <str
84d0: 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73  ong>-password</s
84e0: 74 72 6f 6e 67 3e 2c 20 61 6e 64 0a 3c 73 74 72  trong>, and.<str
84f0: 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 5f 63 6f  ong>-validate_co
8500: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 6f  mmand</strong> o
8510: 70 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 3c 70 3e  ptions..</p>.<p>
8520: 0a 54 68 65 20 64 65 66 61 75 6c 74 20 62 65 68  .The default beh
8530: 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 3c  avior when the <
8540: 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64 3c  strong>-command<
8550: 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 20 3c 73 74  /strong> and <st
8560: 72 6f 6e 67 3e 2d 76 61 6c 69 64 61 74 65 5f 63  rong>-validate_c
8570: 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 0a  ommand</strong>.
8580: 6f 70 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20  options are not 
8590: 73 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72  specified is for
85a0: 20 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20   TLS to process 
85b0: 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c  the associated l
85c0: 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73  ibrary callbacks
85d0: 0a 69 6e 74 65 72 6e 61 6c 6c 79 2e 20 54 68 65  .internally. The
85e0: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f   default behavio
85f0: 72 20 77 68 65 6e 20 74 68 65 20 3c 73 74 72 6f  r when the <stro
8600: 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73 74  ng>-password</st
8610: 72 6f 6e 67 3e 20 6f 70 74 69 6f 6e 20 69 73 20  rong> option is 
8620: 6e 6f 74 0a 73 70 65 63 69 66 69 65 64 20 69 73  not.specified is
8630: 20 66 6f 72 20 54 4c 53 20 74 6f 20 70 72 6f 63   for TLS to proc
8640: 65 73 73 20 74 68 65 20 61 73 73 6f 63 69 61 74  ess the associat
8650: 65 64 20 6c 69 62 72 61 72 79 20 63 61 6c 6c 62  ed library callb
8660: 61 63 6b 73 20 62 79 20 61 74 74 65 6d 70 74 69  acks by attempti
8670: 6e 67 0a 74 6f 20 63 61 6c 6c 20 3c 73 74 72 6f  ng.to call <stro
8680: 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64  ng>tls::password
8690: 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 54 68 65 20 64  </strong>..The d
86a0: 69 66 66 65 72 65 6e 63 65 20 62 65 74 77 65 65  ifference betwee
86b0: 6e 20 74 68 65 73 65 20 74 77 6f 20 62 65 68 61  n these two beha
86c0: 76 69 6f 72 73 20 69 73 20 61 20 63 6f 6e 73 65  viors is a conse
86d0: 71 75 65 6e 63 65 20 6f 66 20 6d 61 69 6e 74 61  quence of mainta
86e0: 69 6e 69 6e 67 0a 63 6f 6d 70 61 74 69 62 69 6c  ining.compatibil
86f0: 69 74 79 20 77 69 74 68 20 65 61 72 6c 69 65 72  ity with earlier
8700: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73   implementations
8710: 2e 0a 3c 2f 70 3e 0a 3c 70 3e 0a 3c 65 6d 3e 0a  ..</p>.<p>.<em>.
8720: 54 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 72  The use of the r
8730: 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63  eference callbac
8740: 6b 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  ks <strong>tls::
8750: 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67  callback</strong
8760: 3e 2c 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  >,.<strong>tls::
8770: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67  password</strong
8780: 3e 2c 20 61 6e 64 20 3c 73 74 72 6f 6e 67 3e 74  >, and <strong>t
8790: 6c 73 3a 3a 76 61 6c 69 64 61 74 65 5f 63 6f 6d  ls::validate_com
87a0: 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 0a 69 73  mand</strong>.is
87b0: 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64   not recommended
87c0: 2e 20 54 68 65 79 20 6d 61 79 20 62 65 20 72 65  . They may be re
87d0: 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72  moved from futur
87e0: 65 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d  e releases..</em
87f0: 3e 0a 3c 2f 70 3e 0a 3c 62 72 3e 0a 0a 3c 68 72  >.</p>.<br>..<hr
8800: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  >..<h3><a name="
8810: 44 45 42 55 47 22 3e 44 45 42 55 47 3c 2f 61 3e  DEBUG">DEBUG</a>
8820: 3c 2f 68 33 3e 0a 0a 3c 70 3e 46 6f 72 20 6d 6f  </h3>..<p>For mo
8830: 73 74 20 64 65 62 75 67 67 69 6e 67 20 6e 65 65  st debugging nee
8840: 64 73 2c 20 74 68 65 20 3c 62 3e 2d 63 61 6c 6c  ds, the <b>-call
8850: 62 61 63 6b 3c 2f 62 3e 20 6f 70 74 69 6f 6e 20  back</b> option 
8860: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70  can be used to p
8870: 72 6f 76 69 64 65 0a 73 75 66 66 69 63 69 65 6e  rovide.sufficien
8880: 74 20 69 6e 73 69 67 68 74 20 61 6e 64 20 69 6e  t insight and in
8890: 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65  formation on the
88a0: 20 54 4c 53 20 68 61 6e 64 73 68 61 6b 65 20 61   TLS handshake a
88b0: 6e 64 20 70 72 6f 67 72 65 73 73 2e 20 49 66 20  nd progress. If 
88c0: 66 75 72 74 68 65 72 0a 74 72 6f 75 62 6c 65 73  further.troubles
88d0: 68 6f 6f 74 69 6e 67 20 69 6e 73 69 67 68 74 20  hooting insight 
88e0: 69 73 20 6e 65 65 64 65 64 2c 20 74 68 65 20 63  is needed, the c
88f0: 6f 6d 70 69 6c 65 20 74 69 6d 65 20 6f 70 74 69  ompile time opti
8900: 6f 6e 20 3c 62 3e 2d 2d 65 6e 61 62 6c 65 2d 64  on <b>--enable-d
8910: 65 62 75 67 3c 2f 62 3e 0a 63 61 6e 20 62 65 20  ebug</b>.can be 
8920: 75 73 65 64 20 74 6f 20 67 65 74 20 64 65 74 61  used to get deta
8930: 69 6c 65 64 20 65 78 65 63 75 74 69 6f 6e 20 66  iled execution f
8940: 6c 6f 77 20 73 74 61 74 75 73 2e 3c 2f 70 3e 0a  low status.</p>.
8950: 0a 3c 70 3e 54 4c 53 20 6b 65 79 20 6c 6f 67 67  .<p>TLS key logg
8960: 69 6e 67 20 63 61 6e 20 62 65 20 65 6e 61 62 6c  ing can be enabl
8970: 65 64 20 62 79 20 73 65 74 74 69 6e 67 20 74 68  ed by setting th
8980: 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61  e environment va
8990: 72 69 61 62 6c 65 0a 3c 62 3e 53 53 4c 4b 45 59  riable.<b>SSLKEY
89a0: 4c 4f 47 46 49 4c 45 3c 2f 62 3e 20 74 6f 20 74  LOGFILE</b> to t
89b0: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66  he name of the f
89c0: 69 6c 65 20 74 6f 20 6c 6f 67 20 74 6f 2e 20 54  ile to log to. T
89d0: 68 65 6e 20 77 68 65 6e 65 76 65 72 20 54 4c 53  hen whenever TLS
89e0: 0a 6b 65 79 20 6d 61 74 65 72 69 61 6c 20 69 73  .key material is
89f0: 20 67 65 6e 65 72 61 74 65 64 20 6f 72 20 72 65   generated or re
8a00: 63 65 69 76 65 64 20 69 74 20 77 69 6c 6c 20 62  ceived it will b
8a10: 65 20 6c 6f 67 67 65 64 20 74 6f 20 74 68 65 20  e logged to the 
8a20: 66 69 6c 65 2e 20 54 68 69 73 0a 69 73 20 75 73  file. This.is us
8a30: 65 66 75 6c 20 66 6f 72 20 6c 6f 67 67 69 6e 67  eful for logging
8a40: 20 6b 65 79 20 64 61 74 61 20 66 6f 72 20 6e 65   key data for ne
8a50: 74 77 6f 72 6b 20 6c 6f 67 67 69 6e 67 20 74 6f  twork logging to
8a60: 6f 6c 73 20 74 6f 20 75 73 65 20 74 6f 0a 64 65  ols to use to.de
8a70: 63 72 79 70 74 20 74 68 65 20 64 61 74 61 2e 3c  crypt the data.<
8a80: 2f 70 3e 0a 0a 3c 70 3e 54 68 65 20 3c 73 74 72  /p>..<p>The <str
8a90: 6f 6e 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f  ong>tls::debug</
8aa0: 73 74 72 6f 6e 67 3e 20 76 61 72 69 61 62 6c 65  strong> variable
8ab0: 20 70 72 6f 76 69 64 65 73 20 73 6f 6d 65 20 61   provides some a
8ac0: 64 64 69 74 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f  dditional.contro
8ad0: 6c 20 6f 76 65 72 20 74 68 65 73 65 20 72 65 66  l over these ref
8ae0: 65 72 65 6e 63 65 20 63 61 6c 6c 62 61 63 6b 73  erence callbacks
8af0: 2e 20 49 74 73 20 76 61 6c 75 65 20 69 73 20 7a  . Its value is z
8b00: 65 72 6f 20 62 79 20 64 65 66 61 75 6c 74 2e 0a  ero by default..
8b10: 48 69 67 68 65 72 20 76 61 6c 75 65 73 20 70 72  Higher values pr
8b20: 6f 64 75 63 65 20 6d 6f 72 65 20 64 69 61 67 6e  oduce more diagn
8b30: 6f 73 74 69 63 20 6f 75 74 70 75 74 2c 20 61 6e  ostic output, an
8b40: 64 20 77 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63  d will also forc
8b50: 65 20 74 68 65 0a 76 65 72 69 66 79 20 6d 65 74  e the.verify met
8b60: 68 6f 64 20 69 6e 20 3c 73 74 72 6f 6e 67 3e 74  hod in <strong>t
8b70: 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74  ls::callback</st
8b80: 72 6f 6e 67 3e 20 74 6f 20 61 63 63 65 70 74 20  rong> to accept 
8b90: 74 68 65 0a 63 65 72 74 69 66 69 63 61 74 65 2c  the.certificate,
8ba0: 20 65 76 65 6e 20 77 68 65 6e 20 69 74 20 69 73   even when it is
8bb0: 20 69 6e 76 61 6c 69 64 20 69 66 20 74 68 65 20   invalid if the 
8bc0: 3c 62 3e 74 6c 73 3a 3a 76 61 6c 69 64 61 74 65  <b>tls::validate
8bd0: 5f 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 0a 63 61 6c  _command</b>.cal
8be0: 6c 62 61 63 6b 20 69 73 20 75 73 65 64 20 66 6f  lback is used fo
8bf0: 72 20 74 68 65 20 3c 62 3e 2d 76 61 6c 69 64 61  r the <b>-valida
8c00: 74 65 63 6f 6d 6d 61 6e 64 3c 2f 62 3e 20 6f 70  tecommand</b> op
8c10: 74 69 6f 6e 2e 3c 2f 70 3e 0a 0a 3c 70 3e 3c 65  tion.</p>..<p><e
8c20: 6d 3e 54 68 65 20 75 73 65 20 6f 66 20 74 68 65  m>The use of the
8c30: 20 76 61 72 69 61 62 6c 65 20 3c 73 74 72 6f 6e   variable <stron
8c40: 67 3e 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74  g>tls::debug</st
8c50: 72 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65 63  rong> is not rec
8c60: 6f 6d 6d 65 6e 64 65 64 2e 0a 49 74 20 6d 61 79  ommended..It may
8c70: 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d   be removed from
8c80: 20 66 75 74 75 72 65 20 72 65 6c 65 61 73 65 73   future releases
8c90: 2e 3c 2f 65 6d 3e 3c 2f 70 3e 0a 0a 3c 68 34 3e  .</em></p>..<h4>
8ca0: 3c 61 20 6e 61 6d 65 3d 22 44 45 42 55 47 5f 45  <a name="DEBUG_E
8cb0: 58 41 4d 50 4c 45 53 22 3e 44 65 62 75 67 20 45  XAMPLES">Debug E
8cc0: 78 61 6d 70 6c 65 73 3c 2f 61 3e 3c 2f 68 34 3e  xamples</a></h4>
8cd0: 0a 0a 3c 70 3e 54 68 65 73 65 20 65 78 61 6d 70  ..<p>These examp
8ce0: 6c 65 73 20 75 73 65 20 74 68 65 20 64 65 66 61  les use the defa
8cf0: 75 6c 74 20 55 6e 69 78 20 70 6c 61 74 66 6f 72  ult Unix platfor
8d00: 6d 20 53 53 4c 20 63 65 72 74 69 66 69 63 61 74  m SSL certificat
8d10: 65 73 2e 20 46 6f 72 20 73 74 61 6e 64 61 72 64  es. For standard
8d20: 0a 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 73 2c 20  .installations, 
8d30: 2d 63 61 64 69 72 20 61 6e 64 20 2d 63 61 66 69  -cadir and -cafi
8d40: 6c 65 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65  le should not be
8d50: 20 6e 65 65 64 65 64 2e 20 49 66 20 79 6f 75 72   needed. If your
8d60: 20 63 65 72 74 69 66 69 63 61 74 65 73 0a 61 72   certificates.ar
8d70: 65 20 69 6e 20 6e 6f 6e 2d 73 74 61 6e 64 61 72  e in non-standar
8d80: 64 20 6c 6f 63 61 74 69 6f 6e 73 2c 20 75 70 64  d locations, upd
8d90: 61 74 65 20 2d 63 61 64 69 72 20 6f 72 20 75 73  ate -cadir or us
8da0: 65 20 2d 63 61 66 69 6c 65 20 61 73 20 6e 65 65  e -cafile as nee
8db0: 64 65 64 2e 3c 2f 70 3e 0a 3c 62 72 3e 0a 0a 3c  ded.</p>.<br>..<
8dc0: 70 3e 45 78 61 6d 70 6c 65 20 23 31 3a 20 55 73  p>Example #1: Us
8dd0: 65 20 48 54 54 50 20 70 61 63 6b 61 67 65 3c 2f  e HTTP package</
8de0: 70 3e 0a 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70  p>.<pre><code>.p
8df0: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 68  ackage require h
8e00: 74 74 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75  ttp.package requ
8e10: 69 72 65 20 74 6c 73 0a 73 65 74 20 75 72 6c 20  ire tls.set url 
8e20: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63 6c  "https://www.tcl
8e30: 2e 74 6b 2f 22 0a 0a 68 74 74 70 3a 3a 72 65 67  .tk/"..http::reg
8e40: 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20  ister https 443 
8e50: 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63  [list ::tls::soc
8e60: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e  ket -autoservern
8e70: 61 6d 65 20 74 72 75 65 20 2d 72 65 71 75 69 72  ame true -requir
8e80: 65 20 74 72 75 65 20 2d 63 61 64 69 72 20 2f 65  e true -cadir /e
8e90: 74 63 2f 73 73 6c 2f 63 65 72 74 73 20 5c 0a 20  tc/ssl/certs \. 
8ea0: 20 20 20 2d 63 6f 6d 6d 61 6e 64 20 3a 3a 74 6c     -command ::tl
8eb0: 73 3a 3a 63 61 6c 6c 62 61 63 6b 20 2d 70 61 73  s::callback -pas
8ec0: 73 77 6f 72 64 20 3a 3a 74 6c 73 3a 3a 70 61 73  sword ::tls::pas
8ed0: 73 77 6f 72 64 20 2d 76 61 6c 69 64 61 74 65 63  sword -validatec
8ee0: 6f 6d 6d 61 6e 64 20 3a 3a 74 6c 73 3a 3a 76 61  ommand ::tls::va
8ef0: 6c 69 64 61 74 65 5f 63 6f 6d 6d 61 6e 64 5d 0a  lidate_command].
8f00: 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72 72  .# Check for err
8f10: 6f 72 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 68 74  or.set token [ht
8f20: 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c 5d  tp::geturl $url]
8f30: 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61 74  .if {[http::stat
8f40: 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 22 6f  us $token] ne "o
8f50: 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 5b  k"} {.    puts [
8f60: 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 20 25 73  format "Error %s
8f70: 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73 20  " [http::status 
8f80: 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 20 47 65  $token]].}..# Ge
8f90: 74 20 77 65 62 20 70 61 67 65 0a 73 65 74 20 64  t web page.set d
8fa0: 61 74 61 20 5b 68 74 74 70 3a 3a 64 61 74 61 20  ata [http::data 
8fb0: 24 74 6f 6b 65 6e 5d 0a 70 75 74 73 20 5b 73 74  $token].puts [st
8fc0: 72 69 6e 67 20 6c 65 6e 67 74 68 20 24 64 61 74  ring length $dat
8fd0: 61 5d 0a 0a 23 20 43 6c 65 61 6e 75 70 0a 3a 3a  a]..# Cleanup.::
8fe0: 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74  http::cleanup $t
8ff0: 6f 6b 65 6e 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72  oken.</code></pr
9000: 65 3e 0a 0a 3c 70 3e 45 78 61 6d 70 6c 65 20 23  e>..<p>Example #
9010: 32 3a 20 55 73 65 20 72 61 77 20 73 6f 63 6b 65  2: Use raw socke
9020: 74 3c 2f 70 3e 0a 3c 70 72 65 3e 3c 63 6f 64 65  t</p>.<pre><code
9030: 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  >.package requir
9040: 65 20 74 6c 73 0a 0a 73 65 74 20 75 72 6c 20 22  e tls..set url "
9050: 77 77 77 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67  www.tcl-lang.org
9060: 22 0a 73 65 74 20 70 6f 72 74 20 34 34 33 0a 0a  ".set port 443..
9070: 73 65 74 20 63 68 20 5b 74 6c 73 3a 3a 73 6f 63  set ch [tls::soc
9080: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e  ket -autoservern
9090: 61 6d 65 20 31 20 2d 73 65 72 76 65 72 6e 61 6d  ame 1 -servernam
90a0: 65 20 24 75 72 6c 20 2d 72 65 71 75 65 73 74 20  e $url -request 
90b0: 31 20 2d 72 65 71 75 69 72 65 20 31 20 5c 0a 20  1 -require 1 \. 
90c0: 20 20 20 2d 61 6c 70 6e 20 7b 68 74 74 70 2f 31     -alpn {http/1
90d0: 2e 31 7d 20 2d 63 61 64 69 72 20 2f 65 74 63 2f  .1} -cadir /etc/
90e0: 73 73 6c 2f 63 65 72 74 73 20 2d 63 6f 6d 6d 61  ssl/certs -comma
90f0: 6e 64 20 3a 3a 74 6c 73 3a 3a 63 61 6c 6c 62 61  nd ::tls::callba
9100: 63 6b 20 5c 0a 20 20 20 20 2d 70 61 73 73 77 6f  ck \.    -passwo
9110: 72 64 20 3a 3a 74 6c 73 3a 3a 70 61 73 73 77 6f  rd ::tls::passwo
9120: 72 64 20 2d 76 61 6c 69 64 61 74 65 63 6f 6d 6d  rd -validatecomm
9130: 61 6e 64 20 3a 3a 74 6c 73 3a 3a 76 61 6c 69 64  and ::tls::valid
9140: 61 74 65 5f 63 6f 6d 6d 61 6e 64 20 24 75 72 6c  ate_command $url
9150: 20 24 70 6f 72 74 5d 0a 63 68 61 6e 20 63 6f 6e   $port].chan con
9160: 66 69 67 75 72 65 20 24 63 68 20 2d 62 75 66 66  figure $ch -buff
9170: 65 72 73 69 7a 65 20 36 35 35 33 36 0a 74 6c 73  ersize 65536.tls
9180: 3a 3a 68 61 6e 64 73 68 61 6b 65 20 24 63 68 0a  ::handshake $ch.
9190: 0a 70 75 74 73 20 24 63 68 20 22 47 45 54 20 2f  .puts $ch "GET /
91a0: 20 48 54 54 50 2f 31 2e 31 22 0a 66 6c 75 73 68   HTTP/1.1".flush
91b0: 20 24 63 68 0a 61 66 74 65 72 20 35 30 30 0a 73   $ch.after 500.s
91c0: 65 74 20 64 61 74 61 20 5b 72 65 61 64 20 24 63  et data [read $c
91d0: 68 5d 0a 0a 61 72 72 61 79 20 73 65 74 20 73 74  h]..array set st
91e0: 61 74 75 73 20 5b 74 6c 73 3a 3a 73 74 61 74 75  atus [tls::statu
91f0: 73 20 24 63 68 5d 0a 61 72 72 61 79 20 73 65 74  s $ch].array set
9200: 20 63 6f 6e 6e 20 5b 74 6c 73 3a 3a 63 6f 6e 6e   conn [tls::conn
9210: 65 63 74 69 6f 6e 20 24 63 68 5d 0a 61 72 72 61  ection $ch].arra
9220: 79 20 73 65 74 20 63 68 61 6e 20 5b 63 68 61 6e  y set chan [chan
9230: 20 63 6f 6e 66 69 67 75 72 65 20 24 63 68 5d 0a   configure $ch].
9240: 63 6c 6f 73 65 20 24 63 68 0a 70 61 72 72 61 79  close $ch.parray
9250: 20 73 74 61 74 75 73 0a 70 61 72 72 61 79 20 63   status.parray c
9260: 6f 6e 6e 0a 70 61 72 72 61 79 20 63 68 61 6e 0a  onn.parray chan.
9270: 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e 0a 3c 62  </code></pre>.<b
9280: 72 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61  r>..<hr>..<h3><a
9290: 20 6e 61 6d 65 3d 22 48 54 54 50 53 20 45 58 41   name="HTTPS EXA
92a0: 4d 50 4c 45 22 3e 48 54 54 50 53 20 45 58 41 4d  MPLE">HTTPS EXAM
92b0: 50 4c 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70  PLE</a></h3>..<p
92c0: 3e 54 68 65 73 65 20 65 78 61 6d 70 6c 65 73 20  >These examples 
92d0: 75 73 65 20 74 68 65 20 64 65 66 61 75 6c 74 20  use the default 
92e0: 55 6e 69 78 20 70 6c 61 74 66 6f 72 6d 20 53 53  Unix platform SS
92f0: 4c 20 63 65 72 74 69 66 69 63 61 74 65 73 2e 20  L certificates. 
9300: 46 6f 72 20 73 74 61 6e 64 61 72 64 0a 69 6e 73  For standard.ins
9310: 74 61 6c 6c 61 74 69 6f 6e 73 2c 20 2d 63 61 64  tallations, -cad
9320: 69 72 20 61 6e 64 20 2d 63 61 66 69 6c 65 20 73  ir and -cafile s
9330: 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 6e 65 65  hould not be nee
9340: 64 65 64 2e 20 49 66 20 79 6f 75 72 20 63 65 72  ded. If your cer
9350: 74 69 66 69 63 61 74 65 73 0a 61 72 65 20 69 6e  tificates.are in
9360: 20 6e 6f 6e 2d 73 74 61 6e 64 61 72 64 20 6c 6f   non-standard lo
9370: 63 61 74 69 6f 6e 73 2c 20 75 70 64 61 74 65 20  cations, update 
9380: 2d 63 61 64 69 72 20 6f 72 20 75 73 65 20 2d 63  -cadir or use -c
9390: 61 66 69 6c 65 20 61 73 20 6e 65 65 64 65 64 2e  afile as needed.
93a0: 3c 2f 70 3e 0a 0a 3c 70 3e 45 78 61 6d 70 6c 65  </p>..<p>Example
93b0: 20 23 31 3a 20 47 65 74 20 77 65 62 20 70 61 67   #1: Get web pag
93c0: 65 3c 2f 70 3e 0a 3c 70 72 65 3e 3c 63 6f 64 65  e</p>.<pre><code
93d0: 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  >.package requir
93e0: 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72  e http.package r
93f0: 65 71 75 69 72 65 20 74 6c 73 0a 73 65 74 20 75  equire tls.set u
9400: 72 6c 20 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e  rl "https://www.
9410: 74 63 6c 2e 74 6b 2f 22 0a 0a 68 74 74 70 3a 3a  tcl.tk/"..http::
9420: 72 65 67 69 73 74 65 72 20 68 74 74 70 73 20 34  register https 4
9430: 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a  43 [list ::tls::
9440: 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72 76  socket -autoserv
9450: 65 72 6e 61 6d 65 20 74 72 75 65 20 2d 72 65 71  ername true -req
9460: 75 69 72 65 20 74 72 75 65 20 2d 63 61 64 69 72  uire true -cadir
9470: 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73 5d   /etc/ssl/certs]
9480: 0a 0a 23 20 43 68 65 63 6b 20 66 6f 72 20 65 72  ..# Check for er
9490: 72 6f 72 0a 73 65 74 20 74 6f 6b 65 6e 20 5b 68  ror.set token [h
94a0: 74 74 70 3a 3a 67 65 74 75 72 6c 20 24 75 72 6c  ttp::geturl $url
94b0: 5d 0a 69 66 20 7b 5b 68 74 74 70 3a 3a 73 74 61  ].if {[http::sta
94c0: 74 75 73 20 24 74 6f 6b 65 6e 5d 20 6e 65 20 22  tus $token] ne "
94d0: 6f 6b 22 7d 20 7b 0a 20 20 20 20 70 75 74 73 20  ok"} {.    puts 
94e0: 5b 66 6f 72 6d 61 74 20 22 45 72 72 6f 72 20 25  [format "Error %
94f0: 73 22 20 5b 68 74 74 70 3a 3a 73 74 61 74 75 73  s" [http::status
9500: 20 24 74 6f 6b 65 6e 5d 5d 0a 7d 0a 0a 23 20 47   $token]].}..# G
9510: 65 74 20 77 65 62 20 70 61 67 65 0a 73 65 74 20  et web page.set 
9520: 64 61 74 61 20 5b 68 74 74 70 3a 3a 64 61 74 61  data [http::data
9530: 20 24 74 6f 6b 65 6e 5d 0a 70 75 74 73 20 24 64   $token].puts $d
9540: 61 74 61 0a 0a 23 20 43 6c 65 61 6e 75 70 0a 3a  ata..# Cleanup.:
9550: 3a 68 74 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24  :http::cleanup $
9560: 74 6f 6b 65 6e 0a 3c 2f 63 6f 64 65 3e 3c 2f 70  token.</code></p
9570: 72 65 3e 0a 0a 3c 70 3e 45 78 61 6d 70 6c 65 20  re>..<p>Example 
9580: 23 32 3a 20 44 6f 77 6e 6c 6f 61 64 20 66 69 6c  #2: Download fil
9590: 65 3c 2f 70 3e 0a 3c 70 72 65 3e 3c 63 6f 64 65  e</p>.<pre><code
95a0: 3e 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  >.package requir
95b0: 65 20 68 74 74 70 0a 70 61 63 6b 61 67 65 20 72  e http.package r
95c0: 65 71 75 69 72 65 20 74 6c 73 0a 0a 73 65 74 20  equire tls..set 
95d0: 75 72 6c 20 22 68 74 74 70 73 3a 2f 2f 77 69 6b  url "https://wik
95e0: 69 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 67 2f 73  i.tcl-lang.org/s
95f0: 69 74 65 6d 61 70 2e 78 6d 6c 22 0a 73 65 74 20  itemap.xml".set 
9600: 66 69 6c 65 6e 61 6d 65 20 5b 66 69 6c 65 20 74  filename [file t
9610: 61 69 6c 20 24 75 72 6c 5d 0a 0a 68 74 74 70 3a  ail $url]..http:
9620: 3a 72 65 67 69 73 74 65 72 20 68 74 74 70 73 20  :register https 
9630: 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a  443 [list ::tls:
9640: 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73 65 72  :socket -autoser
9650: 76 65 72 6e 61 6d 65 20 74 72 75 65 20 2d 72 65  vername true -re
9660: 71 75 69 72 65 20 74 72 75 65 20 2d 63 61 64 69  quire true -cadi
9670: 72 20 2f 65 74 63 2f 73 73 6c 2f 63 65 72 74 73  r /etc/ssl/certs
9680: 5d 0a 0a 23 20 47 65 74 20 66 69 6c 65 0a 73 65  ]..# Get file.se
9690: 74 20 63 68 20 5b 6f 70 65 6e 20 24 66 69 6c 65  t ch [open $file
96a0: 6e 61 6d 65 20 77 62 5d 0a 73 65 74 20 74 6f 6b  name wb].set tok
96b0: 65 6e 20 5b 3a 3a 68 74 74 70 3a 3a 67 65 74 75  en [::http::getu
96c0: 72 6c 20 24 75 72 6c 20 2d 62 6c 6f 63 6b 73 69  rl $url -blocksi
96d0: 7a 65 20 36 35 35 33 36 20 2d 63 68 61 6e 6e 65  ze 65536 -channe
96e0: 6c 20 24 63 68 5d 0a 0a 23 20 43 6c 65 61 6e 75  l $ch]..# Cleanu
96f0: 70 0a 63 6c 6f 73 65 20 24 63 68 0a 3a 3a 68 74  p.close $ch.::ht
9700: 74 70 3a 3a 63 6c 65 61 6e 75 70 20 24 74 6f 6b  tp::cleanup $tok
9710: 65 6e 0a 3c 2f 63 6f 64 65 3e 3c 2f 70 72 65 3e  en.</code></pre>
9720: 0a 3c 62 72 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33  .<br>..<hr>..<h3
9730: 3e 3c 61 20 6e 61 6d 65 3d 22 53 50 45 43 49 41  ><a name="SPECIA
9740: 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53  L CONSIDERATIONS
9750: 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44  ">SPECIAL CONSID
9760: 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33  ERATIONS</a></h3
9770: 3e 0a 0a 3c 70 3e 54 68 65 20 63 61 70 61 62 69  >..<p>The capabi
9780: 6c 69 74 69 65 73 20 6f 66 20 74 68 69 73 20 70  lities of this p
9790: 61 63 6b 61 67 65 20 63 61 6e 20 76 61 72 79 20  ackage can vary 
97a0: 65 6e 6f 72 6d 6f 75 73 6c 79 20 62 61 73 65 64  enormously based
97b0: 20 75 70 6f 6e 20 68 6f 77 20 74 68 65 0a 6c 69   upon how the.li
97c0: 6e 6b 65 64 20 74 6f 20 4f 70 65 6e 53 53 4c 20  nked to OpenSSL 
97d0: 6c 69 62 72 61 72 79 20 77 61 73 20 63 6f 6e 66  library was conf
97e0: 69 67 75 72 65 64 20 61 6e 64 20 62 75 69 6c 74  igured and built
97f0: 2e 20 4e 65 77 20 76 65 72 73 69 6f 6e 73 20 6d  . New versions m
9800: 61 79 20 6f 62 73 6f 6c 65 74 65 0a 6f 6c 64 65  ay obsolete.olde
9810: 72 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69  r protocol versi
9820: 6f 6e 73 2c 20 61 64 64 20 6f 72 20 72 65 6d 6f  ons, add or remo
9830: 76 65 20 63 69 70 68 65 72 73 2c 20 63 68 61 6e  ve ciphers, chan
9840: 67 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65  ge default value
9850: 73 2c 20 65 74 63 2e 0a 55 73 65 20 74 68 65 20  s, etc..Use the 
9860: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f  <strong>tls::pro
9870: 74 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 20  tocols</strong> 
9880: 63 6f 6d 6d 61 6e 64 73 20 74 6f 20 6f 62 74 61  commands to obta
9890: 69 6e 20 74 68 65 20 73 75 70 70 6f 72 74 65 64  in the supported
98a0: 0a 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f  .protocol versio
98b0: 6e 73 2e 3c 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a 3c  ns.</p>..<hr>..<
98c0: 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 53 65 65 20  h3><a name="See 
98d0: 41 6c 73 6f 22 3e 53 65 65 20 41 6c 73 6f 3c 2f  Also">See Also</
98e0: 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73 74 72  a></h3>..<p><str
98f0: 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f  ong>socket</stro
9900: 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 66 69 6c  ng>, <strong>fil
9910: 65 65 76 65 6e 74 3c 2f 73 74 72 6f 6e 67 3e 2c  eevent</strong>,
9920: 20 3c 73 74 72 6f 6e 67 3e 68 74 74 70 3c 2f 73   <strong>http</s
9930: 74 72 6f 6e 67 3e 2c 0a 3c 61 20 68 72 65 66 3d  trong>,.<a href=
9940: 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 6f 70 65  "https://www.ope
9950: 6e 73 73 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72 6f  nssl.org/"><stro
9960: 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f  ng>OpenSSL</stro
9970: 6e 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68 72  ng></a></p>..<hr
9980: 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22  >..<h3><a name="
9990: 4b 45 59 57 4f 52 44 53 22 3e 4b 45 59 57 4f 52  KEYWORDS">KEYWOR
99a0: 44 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e  DS</a></h3>..<p>
99b0: 3c 73 74 72 6f 6e 67 3e 73 73 6c 3c 2f 73 74 72  <strong>ssl</str
99c0: 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e 67 3e 74 6c  ong>, <strong>tl
99d0: 73 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72  s</strong>, <str
99e0: 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f  ong>socket</stro
99f0: 6e 67 3e 2c 0a 3c 73 74 72 6f 6e 67 3e 63 65 72  ng>,.<strong>cer
9a00: 74 69 66 69 63 61 74 65 3c 2f 73 74 72 6f 6e 67  tificate</strong
9a10: 3e 2c 20 3c 73 74 72 6f 6e 67 3e 68 74 74 70 73  >, <strong>https
9a20: 3c 2f 73 74 72 6f 6e 67 3e 0a 0a 3c 68 72 3e 0a  </strong>..<hr>.
9a30: 0a 3c 70 72 65 3e 0a 43 6f 70 79 72 69 67 68 74  .<pre>.Copyright
9a40: 20 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74   © 1999 Mat
9a50: 74 20 4e 65 77 6d 61 6e 0a 43 6f 70 79 72 69 67  t Newman.Copyrig
9a60: 68 74 20 26 63 6f 70 79 3b 20 32 30 30 34 20 53  ht © 2004 S
9a70: 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 0a  tarfish Systems.
9a80: 43 6f 70 79 72 69 67 68 74 20 26 63 6f 70 79 3b  Copyright ©
9a90: 20 32 30 32 33 2d 32 30 32 34 20 42 72 69 61 6e   2023-2024 Brian
9aa0: 20 4f 27 48 61 67 61 6e 0a 3c 2f 70 72 65 3e 0a   O'Hagan.</pre>.
9ab0: 3c 2f 62 6f 64 79 3e 0a 3c 2f 68 74 6d 6c 3e 0a  </body>.</html>.