Hex Artifact Content

Artifact 3fa38151ef1fe0389e065ec9a305fa4418a02864129f2df2d73192dc81a0b7c1:


0000: 3c 21 64 6f 63 74 79 70 65 20 68 74 6d 6c 20 70  <!doctype html p
0010: 75 62 6c 69 63 20 22 2d 2f 2f 57 33 43 2f 2f 44  ublic "-//W3C//D
0020: 54 44 20 48 54 4d 4c 20 34 2e 30 20 54 72 61 6e  TD HTML 4.0 Tran
0030: 73 69 74 69 6f 6e 61 6c 2f 2f 45 4e 22 3e 0a 0a  sitional//EN">..
0040: 3c 68 74 6d 6c 3e 0a 0a 3c 68 65 61 64 3e 0a 3c  <html>..<head>.<
0050: 6d 65 74 61 20 68 74 74 70 2d 65 71 75 69 76 3d  meta http-equiv=
0060: 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 0a 63  "Content-Type".c
0070: 6f 6e 74 65 6e 74 3d 22 74 65 78 74 2f 68 74 6d  ontent="text/htm
0080: 6c 3b 20 63 68 61 72 73 65 74 3d 69 73 6f 2d 38  l; charset=iso-8
0090: 38 35 39 2d 31 22 3e 0a 3c 6d 65 74 61 20 6e 61  859-1">.<meta na
00a0: 6d 65 3d 22 43 6f 70 79 72 69 67 68 74 22 20 63  me="Copyright" c
00b0: 6f 6e 74 65 6e 74 3d 22 31 39 39 39 20 4d 61 74  ontent="1999 Mat
00c0: 74 20 4e 65 77 6d 61 6e 20 2f 20 32 30 30 34 20  t Newman / 2004 
00d0: 53 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73  Starfish Systems
00e0: 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c 53 20 28 53  ">.<title>TLS (S
00f0: 53 4c 29 20 54 63 6c 20 43 6f 6d 6d 61 6e 64 73  SL) Tcl Commands
0100: 3c 2f 74 69 74 6c 65 3e 0a 3c 2f 68 65 61 64 3e  </title>.</head>
0110: 0a 0a 3c 62 6f 64 79 20 62 67 63 6f 6c 6f 72 3d  ..<body bgcolor=
0120: 22 23 46 46 46 46 46 46 22 3e 0a 0a 3c 64 6c 3e  "#FFFFFF">..<dl>
0130: 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66  .    <dd><a href
0140: 3d 22 23 4e 41 4d 45 22 3e 4e 41 4d 45 3c 2f 61  ="#NAME">NAME</a
0150: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20  >.    <dl>.     
0160: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3c 2f 62     <dd><b>tls</b
0170: 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20 3c  > - binding to <
0180: 62 3e 4f 70 65 6e 53 53 4c 3c 2f 62 3e 20 74 6f  b>OpenSSL</b> to
0190: 6f 6c 6b 69 74 2e 3c 2f 64 64 3e 0a 20 20 20 20  olkit.</dd>.    
01a0: 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a  </dl>.    </dd>.
01b0: 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d      <dd><a href=
01c0: 22 23 53 59 4e 4f 50 53 49 53 22 3e 53 59 4e 4f  "#SYNOPSIS">SYNO
01d0: 50 53 49 53 3c 2f 61 3e 20 3c 2f 64 64 3e 0a 20  PSIS</a> </dd>. 
01e0: 20 20 20 3c 64 64 3e 3c 64 6c 3e 0a 20 20 20 20     <dd><dl>.    
01f0: 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 70          <dd><b>p
0200: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 54  ackage require T
0210: 63 6c 3c 2f 62 3e 20 3c 65 6d 3e 3f 38 2e 34 3f  cl</b> <em>?8.4?
0220: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20  </em></dd>.     
0230: 20 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 70 61         <dd><b>pa
0240: 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74 6c  ckage require tl
0250: 73 3c 2f 62 3e 3c 2f 64 64 3e 0a 20 20 20 20 20  s</b></dd>.     
0260: 20 20 20 20 20 20 20 3c 64 74 3e 26 6e 62 73 70         <dt>&nbsp
0270: 3b 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 20  ;</dt>.         
0280: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69     <dd><b>tls::i
0290: 6e 69 74 3c 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74  nit</b> <em>?opt
02a0: 69 6f 6e 73 3f 3c 2f 65 6d 3e 20 3c 2f 64 64 3e  ions?</em> </dd>
02b0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 64  .            <dd
02c0: 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c  ><b>tls::socket<
02d0: 2f 62 3e 20 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73  /b> <em>?options
02e0: 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e  ? host port</em>
02f0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20  </dd>.          
0300: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 6f    <dd><b>tls::so
0310: 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d 3e 20 3f 2d  cket</b> <em> ?-
0320: 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20  server command? 
0330: 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f  ?options? port</
0340: 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  em></dd>.       
0350: 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a       <dd><b>tls:
0360: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c  :handshake</b> <
0370: 65 6d 3e 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  em> channel</em>
0380: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20  </dd>.          
0390: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 73 74    <dd><b>tls::st
03a0: 61 74 75 73 20 3c 2f 62 3e 20 3c 65 6d 3e 3f 2d  atus </b> <em>?-
03b0: 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f  local? channel</
03c0: 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  em></dd>.       
03d0: 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a       <dd><b>tls:
03e0: 3a 63 6f 6e 6e 65 63 74 69 6f 6e 20 3c 2f 62 3e  :connection </b>
03f0: 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d   <em>channel</em
0400: 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20  ></dd>.         
0410: 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69     <dd><b>tls::i
0420: 6d 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68  mport</b> <em>ch
0430: 61 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c  annel ?options?<
0440: 2f 65 6d 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  /em></dd>.      
0450: 20 20 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73        <dd><b>tls
0460: 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c  ::unimport</b> <
0470: 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c  em>channel</em><
0480: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20  /dd>.           
0490: 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e   <dt>&nbsp;</dt>
04a0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 64 64  .            <dd
04b0: 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70 68 65 72 73  ><b>tls::ciphers
04c0: 20 3c 2f 62 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63   </b> <em>protoc
04d0: 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73 75  ol ?verbose? ?su
04e0: 70 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f 64  pported?</em></d
04f0: 64 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c  d>.            <
0500: 64 64 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f  dd><b>tls::proto
0510: 63 6f 6c 73 3c 2f 62 3e 3c 2f 64 64 3e 0a 20 20  cols</b></dd>.  
0520: 20 20 20 20 20 20 20 20 20 20 3c 64 64 3e 3c 62            <dd><b
0530: 3e 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 62  >tls::version</b
0540: 3e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  ></dd>.        <
0550: 2f 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20  /dl>.    </dd>. 
0560: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22     <dd><a href="
0570: 23 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41  #COMMANDS">COMMA
0580: 4e 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20  NDS</a></dd>.   
0590: 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43   <dd><a href="#C
05a0: 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22  ALLBACK OPTIONS"
05b0: 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e  >CALLBACK OPTION
05c0: 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c  S</a></dd>.    <
05d0: 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 54  dd><a href="#HTT
05e0: 50 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50  PS EXAMPLE">HTTP
05f0: 53 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64  S EXAMPLE</a></d
0600: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72  d>.    <dd><a hr
0610: 65 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53  ef="#SEE ALSO">S
0620: 50 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41  PECIAL CONSIDERA
0630: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20  TIONS</a></dd>. 
0640: 20 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22     <dd><a href="
0650: 23 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41  #SEE ALSO">SEE A
0660: 4c 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64  LSO</a></dd>.</d
0670: 6c 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61  l>..<hr>..<h3><a
0680: 20 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d   name="NAME">NAM
0690: 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c  E</a></h3>..<p><
06a0: 73 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f  strong>tls</stro
06b0: 6e 67 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f  ng> - binding to
06c0: 20 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c   <strong>OpenSSL
06d0: 3c 2f 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69  </strong>.toolki
06e0: 74 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e  t.</p>..<h3><a n
06f0: 61 6d 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53  ame="SYNOPSIS">S
0700: 59 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e  YNOPSIS</a></h3>
0710: 0a 0a 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20  ..<p><b>package 
0720: 72 65 71 75 69 72 65 20 54 63 6c 20 38 2e 34 3c  require Tcl 8.4<
0730: 2f 62 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61  /b><br>.<b>packa
0740: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f  ge require tls</
0750: 62 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20 68  b><br>.<br>.<a h
0760: 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6e 69 74 22  ref="#tls::init"
0770: 3e 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62  ><b>tls::init</b
0780: 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f  > <i>?options?</
0790: 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72  i></a><br>.<a hr
07a0: 65 66 3d 22 23 74 6c 73 3a 3a 73 6f 63 6b 65 74  ef="#tls::socket
07b0: 22 3e 3c 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74  "><b>tls::socket
07c0: 3c 2f 62 3e 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73  </b> <i>?options
07d0: 3f 20 68 6f 73 74 20 70 6f 72 74 3c 2f 69 3e 3c  ? host port</i><
07e0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
07f0: 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c  s::socket"><b>tl
0800: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 69  s::socket</b> <i
0810: 3e 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61 6e  >?-server comman
0820: 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f 72  d? ?options? por
0830: 74 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61  t</i></a><br>.<a
0840: 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 73 74 61   href="#tls::sta
0850: 74 75 73 22 3e 3c 62 3e 74 6c 73 3a 3a 73 74 61  tus"><b>tls::sta
0860: 74 75 73 3c 2f 62 3e 20 3c 69 3e 3f 2d 6c 6f 63  tus</b> <i>?-loc
0870: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c  al? channel</i><
0880: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
0890: 22 23 74 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f  "#tls::connectio
08a0: 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 63 6f 6e 6e 65  n"><b>tls::conne
08b0: 63 74 69 6f 6e 3c 2f 62 3e 20 3c 69 3e 63 68 61  ction</b> <i>cha
08c0: 6e 6e 65 6c 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e  nnel</i></a><br>
08d0: 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a  .<a href="#tls::
08e0: 68 61 6e 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c  handshake"><b>tl
08f0: 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e  s::handshake</b>
0900: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c   <i>channel</i><
0910: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
0920: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c  "#tls::import"><
0930: 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62  b>tls::import</b
0940: 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 20 3f 6f 70  > <i>channel ?op
0950: 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 62  tions?</i></a><b
0960: 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c 73  r>.<a href="#tls
0970: 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74  ::unimport"><b>t
0980: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 3c 2f 62 3e  ls::unimport</b>
0990: 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c   <i>channel</i><
09a0: 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20  /a><br>.<br>.<a 
09b0: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68  href="#tls::ciph
09c0: 65 72 73 22 3e 3c 62 3e 74 6c 73 3a 3a 63 69 70  ers"><b>tls::cip
09d0: 68 65 72 73 3c 2f 62 3e 20 3c 69 3e 70 72 6f 74  hers</b> <i>prot
09e0: 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 20 3f  ocol ?verbose? ?
09f0: 73 75 70 70 6f 72 74 65 64 3f 3c 2f 69 3e 3c 2f  supported?</i></
0a00: 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22  a><br>.<a href="
0a10: 23 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22  #tls::protocols"
0a20: 3e 3c 62 3e 74 6c 73 3a 3a 70 72 6f 74 6f 63 6f  ><b>tls::protoco
0a30: 6c 73 3c 2f 62 3e 3c 2f 61 3e 0a 3c 61 20 68 72  ls</b></a>.<a hr
0a40: 65 66 3d 22 23 74 6c 73 3a 3a 76 65 72 73 69 6f  ef="#tls::versio
0a50: 6e 22 3e 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69  n"><b>tls::versi
0a60: 6f 6e 3c 2f 62 3e 3c 2f 61 3e 0a 3c 2f 70 3e 0a  on</b></a>.</p>.
0a70: 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 45  .<h3><a name="DE
0a80: 53 43 52 49 50 54 49 4f 4e 22 3e 44 45 53 43 52  SCRIPTION">DESCR
0a90: 49 50 54 49 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a  IPTION</a></h3>.
0aa0: 0a 3c 70 3e 54 68 69 73 20 65 78 74 65 6e 73 69  .<p>This extensi
0ab0: 6f 6e 20 70 72 6f 76 69 64 65 73 20 61 20 67 65  on provides a ge
0ac0: 6e 65 72 69 63 20 62 69 6e 64 69 6e 67 20 74 6f  neric binding to
0ad0: 20 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f   <a.href="http:/
0ae0: 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67  /www.openssl.org
0af0: 2f 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20  /">OpenSSL</a>, 
0b00: 75 74 69 6c 69 7a 69 6e 67 20 74 68 65 0a 3c 73  utilizing the.<s
0b10: 74 72 6f 6e 67 3e 54 63 6c 5f 53 74 61 63 6b 43  trong>Tcl_StackC
0b20: 68 61 6e 6e 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a  hannel</strong>.
0b30: 41 50 49 20 66 6f 72 20 54 63 6c 20 38 2e 34 20  API for Tcl 8.4 
0b40: 61 6e 64 20 68 69 67 68 65 72 2e 20 54 68 65 20  and higher. The 
0b50: 73 6f 63 6b 65 74 73 20 62 65 68 61 76 65 20 65  sockets behave e
0b60: 78 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 0a  xactly the same.
0b70: 61 73 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61  as channels crea
0b80: 74 65 64 20 75 73 69 6e 67 20 54 63 6c 27 73 20  ted using Tcl's 
0b90: 62 75 69 6c 74 2d 69 6e 20 3c 73 74 72 6f 6e 67  built-in <strong
0ba0: 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e  >socket</strong>
0bb0: 0a 63 6f 6d 6d 61 6e 64 20 77 69 74 68 20 61 64  .command with ad
0bc0: 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73  ditional options
0bd0: 20 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67   for controlling
0be0: 20 74 68 65 20 53 53 4c 20 73 65 73 73 69 6f 6e   the SSL session
0bf0: 2e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e  ..</p>..<h3><a n
0c00: 61 6d 65 3d 22 43 4f 4d 4d 41 4e 44 53 22 3e 43  ame="COMMANDS">C
0c10: 4f 4d 4d 41 4e 44 53 3c 2f 61 3e 3c 2f 68 33 3e  OMMANDS</a></h3>
0c20: 0a 0a 3c 70 3e 54 79 70 69 63 61 6c 6c 79 20 6f  ..<p>Typically o
0c30: 6e 65 20 77 6f 75 6c 64 20 75 73 65 20 74 68 65  ne would use the
0c40: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f   <strong>tls::so
0c50: 63 6b 65 74 20 3c 2f 73 74 72 6f 6e 67 3e 63 6f  cket </strong>co
0c60: 6d 6d 61 6e 64 0a 77 68 69 63 68 20 70 72 6f 76  mmand.which prov
0c70: 69 64 65 73 20 63 6f 6d 70 61 74 69 62 69 6c 69  ides compatibili
0c80: 74 79 20 77 69 74 68 20 74 68 65 20 6e 61 74 69  ty with the nati
0c90: 76 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67 3e 73  ve Tcl <strong>s
0ca0: 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 63  ocket</strong>.c
0cb0: 6f 6d 6d 61 6e 64 2e 20 49 6e 20 73 75 63 68 20  ommand. In such 
0cc0: 63 61 73 65 73 20 3c 73 74 72 6f 6e 67 3e 74 6c  cases <strong>tl
0cd0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e  s::import</stron
0ce0: 67 3e 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65  g> should not be
0cf0: 0a 75 73 65 64 20 64 69 72 65 63 74 6c 79 2e 3c  .used directly.<
0d00: 2f 70 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64  /p>..<dl>.    <d
0d10: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a  t><a name="tls::
0d20: 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6e  init"><b>tls::in
0d30: 69 74 20 3c 2f 62 3e 3c 69 3e 3f 6f 70 74 69 6f  it </b><i>?optio
0d40: 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e  ns?</i></a></dt>
0d50: 0a 20 20 20 20 3c 64 64 3e 4f 70 74 69 6f 6e 61  .    <dd>Optiona
0d60: 6c 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 73 65  l function to se
0d70: 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 70  t the default op
0d80: 74 69 6f 6e 73 20 75 73 65 64 20 62 79 0a 09 3c  tions used by..<
0d90: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b  strong>tls::sock
0da0: 65 74 3c 2f 73 74 72 6f 6e 67 3e 2e 20 49 66 20  et</strong>. If 
0db0: 79 6f 75 20 63 61 6c 6c 20 3c 73 74 72 6f 6e 67  you call <strong
0dc0: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74  >tls::import</st
0dd0: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 64 69  rong>.        di
0de0: 72 65 63 74 6c 79 20 74 68 69 73 20 72 6f 75 74  rectly this rout
0df0: 69 6e 65 20 68 61 73 20 6e 6f 20 65 66 66 65 63  ine has no effec
0e00: 74 2e 20 41 6e 79 20 6f 66 20 74 68 65 20 6f 70  t. Any of the op
0e10: 74 69 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 68  tions.        th
0e20: 61 74 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  at <strong>tls::
0e30: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20  socket</strong> 
0e40: 61 63 63 65 70 74 73 20 63 61 6e 20 62 65 20 73  accepts can be s
0e50: 65 74 0a 20 20 20 20 20 20 20 20 75 73 69 6e 67  et.        using
0e60: 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 2c 20 74   this command, t
0e70: 68 6f 75 67 68 20 79 6f 75 20 73 68 6f 75 6c 64  hough you should
0e80: 20 6c 69 6d 69 74 20 79 6f 75 72 20 6f 70 74 69   limit your opti
0e90: 6f 6e 73 0a 20 20 20 20 20 20 20 20 74 6f 20 6f  ons.        to o
0ea0: 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20  nly TLS related 
0eb0: 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c  ones.</dd>.    <
0ec0: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20  dt>&nbsp;</dt>. 
0ed0: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22     <dt><a name="
0ee0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e  tls::socket"><b>
0ef0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c 2f 62 3e  tls::socket </b>
0f00: 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 20 20  <em>?options?.  
0f10: 20 20 20 20 20 20 68 6f 73 74 20 70 6f 72 74 3c        host port<
0f20: 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  /em></a></dt>.  
0f30: 20 20 3c 64 74 3e 3c 62 3e 74 6c 73 3a 3a 73 6f    <dt><b>tls::so
0f40: 63 6b 65 74 3c 2f 62 3e 3c 65 6d 3e 20 3f 2d 73  cket</b><em> ?-s
0f50: 65 72 76 65 72 20 63 6f 6d 6d 61 6e 64 3f 20 3f  erver command? ?
0f60: 6f 70 74 69 6f 6e 73 3f 20 70 6f 72 74 3c 2f 65  options? port</e
0f70: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  m></dt>.    <dd>
0f80: 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 72  This is a helper
0f90: 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 75   function that u
0fa0: 74 69 6c 69 7a 65 73 20 74 68 65 20 75 6e 64 65  tilizes the unde
0fb0: 72 6c 79 69 6e 67 0a 20 20 20 20 20 20 20 20 63  rlying.        c
0fc0: 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f 6e 67  ommands (<strong
0fd0: 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74  >tls::import</st
0fe0: 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68 61 76  rong>). It behav
0ff0: 65 73 0a 20 20 20 20 20 20 20 20 65 78 61 63 74  es.        exact
1000: 6c 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 74  ly the same as t
1010: 68 65 20 6e 61 74 69 76 65 20 54 63 6c 20 3c 73  he native Tcl <s
1020: 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c 2f 73 74  trong>socket</st
1030: 72 6f 6e 67 3e 0a 20 20 20 20 20 20 20 20 63 6f  rong>.        co
1040: 6d 6d 61 6e 64 20 65 78 63 65 70 74 20 74 68 61  mmand except tha
1050: 74 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 63 61  t the options ca
1060: 6e 20 69 6e 63 6c 75 64 65 20 61 6e 79 20 6f 66  n include any of
1070: 20 74 68 65 0a 20 20 20 20 20 20 20 20 61 70 70   the.        app
1080: 6c 69 63 61 62 6c 65 20 3c 61 20 68 72 65 66 3d  licable <a href=
1090: 22 23 74 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c  "#tls::import"><
10a0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72  strong>tls:impor
10b0: 74 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 20  t</strong></a>. 
10c0: 20 20 20 20 20 20 20 6f 70 74 69 6f 6e 73 20 77         options w
10d0: 69 74 68 20 6f 6e 65 20 61 64 64 69 74 69 6f 6e  ith one addition
10e0: 61 6c 20 6f 70 74 69 6f 6e 3a 0a 3c 62 6c 6f 63  al option:.<bloc
10f0: 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c 3e  kquote>.    <dl>
1100: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
1110: 72 6f 6e 67 3e 2d 61 75 74 6f 73 65 72 76 65 72  rong>-autoserver
1120: 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  name</strong> <e
1130: 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>bool</em></dt>
1140: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 41 75 74  .        <dd>Aut
1150: 6f 6d 61 74 69 63 61 6c 6c 79 20 73 65 6e 64 20  omatically send 
1160: 74 68 65 20 2d 73 65 72 76 65 72 6e 61 6d 65 20  the -servername 
1170: 61 73 20 74 68 65 20 3c 65 6d 3e 68 6f 73 74 3c  as the <em>host<
1180: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 0a 20 20  /em> argument.  
1190: 20 20 20 20 20 20 20 20 20 20 28 64 65 66 61 75            (defau
11a0: 6c 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c  lt is <em>false<
11b0: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 3c  /em>)</dd>.    <
11c0: 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75 6f 74  /dl>.</blockquot
11d0: 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e  e>..    <dt><a n
11e0: 61 6d 65 3d 22 74 6c 73 3a 3a 69 6d 70 6f 72 74  ame="tls::import
11f0: 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74  "><b>tls::import
1200: 20 3c 2f 62 3e 3c 69 3e 63 68 61 6e 6e 65 6c 0a   </b><i>channel.
1210: 20 20 20 20 20 20 20 20 3f 6f 70 74 69 6f 6e 73          ?options
1220: 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20  ?</i></a></dt>. 
1230: 20 20 20 3c 64 64 3e 53 53 4c 2d 65 6e 61 62 6c     <dd>SSL-enabl
1240: 65 20 61 20 72 65 67 75 6c 61 72 20 54 63 6c 20  e a regular Tcl 
1250: 63 68 61 6e 6e 65 6c 20 2d 20 69 74 20 6e 65 65  channel - it nee
1260: 64 20 6e 6f 74 20 62 65 20 61 0a 20 20 20 20 20  d not be a.     
1270: 20 20 20 73 6f 63 6b 65 74 2c 20 62 75 74 20 6d     socket, but m
1280: 75 73 74 20 70 72 6f 76 69 64 65 20 62 69 2d 64  ust provide bi-d
1290: 69 72 65 63 74 69 6f 6e 61 6c 20 66 6c 6f 77 2e  irectional flow.
12a0: 20 41 6c 73 6f 0a 20 20 20 20 20 20 20 20 73 65   Also.        se
12b0: 74 74 69 6e 67 20 73 65 73 73 69 6f 6e 20 70 61  tting session pa
12c0: 72 61 6d 65 74 65 72 73 20 66 6f 72 20 53 53 4c  rameters for SSL
12d0: 20 68 61 6e 64 73 68 61 6b 65 2e 3c 2f 64 64 3e   handshake.</dd>
12e0: 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20  ..<blockquote>. 
12f0: 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20     <dl>.        
1300: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 61 6c 70  <dt><strong>-alp
1310: 6e 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c  n</strong> <em>l
1320: 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ist</em></dt>.  
1330: 20 20 20 20 20 20 3c 64 64 3e 4c 69 73 74 20 6f        <dd>List o
1340: 66 20 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 6f  f protocols to o
1350: 66 66 65 72 20 64 75 72 69 6e 67 20 41 70 70 6c  ffer during Appl
1360: 69 63 61 74 69 6f 6e 2d 4c 61 79 65 72 0a 09 20  ication-Layer.. 
1370: 20 20 20 50 72 6f 74 6f 63 6f 6c 20 4e 65 67 6f     Protocol Nego
1380: 74 69 61 74 69 6f 6e 20 28 41 4c 50 4e 29 2e 20  tiation (ALPN). 
1390: 46 6f 72 20 65 78 61 6d 70 6c 65 3a 20 68 32 2c  For example: h2,
13a0: 20 68 74 74 70 2f 31 2e 31 2c 20 65 74 63 2e 3c   http/1.1, etc.<
13b0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
13c0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 64 69 72 3c  ><strong>-cadir<
13d0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 69 72  /strong> <em>dir
13e0: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20  </em></dt>.     
13f0: 20 20 20 3c 64 64 3e 53 70 65 63 69 66 79 20 74     <dd>Specify t
1400: 68 65 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e  he directory con
1410: 74 61 69 6e 69 6e 67 20 74 68 65 20 43 41 20 63  taining the CA c
1420: 65 72 74 69 66 69 63 61 74 65 73 2e 20 54 68 65  ertificates. The
1430: 0a 09 20 20 20 20 64 65 66 61 75 6c 74 20 64 69  ..    default di
1440: 72 65 63 74 6f 72 79 20 69 73 20 70 6c 61 74 66  rectory is platf
1450: 6f 72 6d 20 73 70 65 63 69 66 69 63 20 61 6e 64  orm specific and
1460: 20 63 61 6e 20 62 65 20 73 65 74 20 61 74 0a 09   can be set at..
1470: 20 20 20 20 63 6f 6d 70 69 6c 65 20 74 69 6d 65      compile time
1480: 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 6f 76  . This can be ov
1490: 65 72 72 69 64 64 65 6e 20 76 69 61 20 74 68 65  erridden via the
14a0: 20 3c 62 3e 53 53 4c 5f 43 45 52 54 5f 44 49 52   <b>SSL_CERT_DIR
14b0: 3c 2f 62 3e 0a 09 20 20 20 20 65 6e 76 69 72 6f  </b>..    enviro
14c0: 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e 3c  nment variable.<
14d0: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
14e0: 3e 3c 73 74 72 6f 6e 67 3e 2d 63 61 66 69 6c 65  ><strong>-cafile
14f0: 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69   </strong><em>fi
1500: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  lename</em></dt>
1510: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70 65  .        <dd>Spe
1520: 63 69 66 79 20 74 68 65 20 63 65 72 74 69 66 69  cify the certifi
1530: 63 61 74 65 20 61 75 74 68 6f 72 69 74 79 20 28  cate authority (
1540: 43 41 29 20 66 69 6c 65 20 74 6f 20 75 73 65 2e  CA) file to use.
1550: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
1560: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74 66  t><strong>-certf
1570: 69 6c 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ile</strong> <em
1580: 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f  >filename</em></
1590: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
15a0: 53 70 65 63 69 66 79 20 74 68 65 20 66 69 6c 65  Specify the file
15b0: 6e 61 6d 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20  name containing 
15c0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 20  the certificate 
15d0: 74 6f 20 75 73 65 2e 20 54 68 65 0a 09 20 20 20  to use. The..   
15e0: 20 64 65 66 61 75 6c 74 20 6e 61 6d 65 20 69 73   default name is
15f0: 20 3c 62 3e 63 65 72 74 2e 70 65 6d 3c 2f 62 3e   <b>cert.pem</b>
1600: 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 6f 76  . This can be ov
1610: 65 72 72 69 64 64 65 6e 20 76 69 61 0a 09 20 20  erridden via..  
1620: 20 20 74 68 65 20 3c 62 3e 53 53 4c 5f 43 45 52    the <b>SSL_CER
1630: 54 5f 46 49 4c 45 3c 2f 62 3e 20 65 6e 76 69 72  T_FILE</b> envir
1640: 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 2e  onment variable.
1650: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
1660: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65 72 74 3c  t><strong>-cert<
1670: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c  /strong> <em>fil
1680: 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  ename</em></dt>.
1690: 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70 65 63          <dd>Spec
16a0: 69 66 79 20 74 68 65 20 63 6f 6e 74 65 6e 74 73  ify the contents
16b0: 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61 74   of a certificat
16c0: 65 20 74 6f 20 75 73 65 2c 20 61 73 20 61 20 44  e to use, as a D
16d0: 45 52 0a 09 20 20 20 20 65 6e 63 6f 64 65 64 20  ER..    encoded 
16e0: 62 69 6e 61 72 79 20 76 61 6c 75 65 20 28 58 2e  binary value (X.
16f0: 35 30 39 20 44 45 52 29 2e 3c 2f 64 64 3e 0a 20  509 DER).</dd>. 
1700: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
1710: 6e 67 3e 2d 63 69 70 68 65 72 3c 2f 73 74 72 6f  ng>-cipher</stro
1720: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f  ng> <em>string</
1730: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
1740: 20 3c 64 64 3e 4c 69 73 74 20 6f 66 20 63 69 70   <dd>List of cip
1750: 68 65 72 73 20 74 6f 20 75 73 65 2e 20 53 74 72  hers to use. Str
1760: 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28  ing is a colon (
1770: 22 3a 22 29 20 73 65 70 61 72 61 74 65 64 20 6c  ":") separated l
1780: 69 73 74 0a 09 20 20 20 20 6f 66 20 63 69 70 68  ist..    of ciph
1790: 65 72 73 20 6f 72 20 63 69 70 68 65 72 20 73 75  ers or cipher su
17a0: 69 74 65 73 2e 20 43 69 70 68 65 72 20 73 75 69  ites. Cipher sui
17b0: 74 65 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69  tes can be combi
17c0: 6e 65 64 0a 09 20 20 20 20 75 73 69 6e 67 20 74  ned..    using t
17d0: 68 65 20 3c 62 3e 2b 3c 2f 62 3e 20 63 68 61 72  he <b>+</b> char
17e0: 61 63 74 65 72 2e 20 50 72 65 66 69 78 65 73 20  acter. Prefixes 
17f0: 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 70  can be used to p
1800: 65 72 6d 61 6e 65 6e 74 6c 79 0a 09 20 20 20 20  ermanently..    
1810: 72 65 6d 6f 76 65 20 28 22 21 22 29 2c 20 64 65  remove ("!"), de
1820: 6c 65 74 65 20 28 22 2d 22 29 2c 20 6f 72 20 6d  lete ("-"), or m
1830: 6f 76 65 20 61 20 63 79 70 68 65 72 20 74 6f 20  ove a cypher to 
1840: 74 68 65 20 65 6e 64 20 6f 66 0a 09 20 20 20 20  the end of..    
1850: 74 68 65 20 6c 69 73 74 20 28 22 2b 22 29 2e 20  the list ("+"). 
1860: 4b 65 79 77 6f 72 64 73 20 3c 62 3e 40 53 54 52  Keywords <b>@STR
1870: 45 4e 47 54 48 3c 2f 62 3e 20 28 73 6f 72 74 20  ENGTH</b> (sort 
1880: 62 79 20 61 6c 67 6f 72 69 74 68 6d 0a 09 20 20  by algorithm..  
1890: 20 20 6b 65 79 20 6c 65 6e 67 74 68 29 2c 20 3c    key length), <
18a0: 62 3e 40 53 45 43 4c 45 56 45 4c 3d 3c 2f 62 3e  b>@SECLEVEL=</b>
18b0: 3c 69 3e 6e 3c 2f 69 3e 20 28 73 65 74 20 73 65  <i>n</i> (set se
18c0: 63 75 72 69 74 79 20 6c 65 76 65 6c 20 74 6f 0a  curity level to.
18d0: 09 20 20 20 20 6e 29 2c 20 61 6e 64 20 3c 62 3e  .    n), and <b>
18e0: 44 45 46 41 55 4c 54 3c 2f 62 3e 20 28 75 73 65  DEFAULT</b> (use
18f0: 20 64 65 66 61 75 6c 74 20 63 69 70 68 65 72 20   default cipher 
1900: 6c 69 73 74 2c 20 61 74 20 73 74 61 72 74 20 6f  list, at start o
1910: 6e 6c 79 29 0a 09 20 20 20 20 63 61 6e 20 61 6c  nly)..    can al
1920: 73 6f 20 62 65 20 73 70 65 63 69 66 69 65 64 2e  so be specified.
1930: 20 53 65 65 20 4f 70 65 6e 53 53 4c 20 64 6f 63   See OpenSSL doc
1940: 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 74  umentation for t
1950: 68 65 20 66 75 6c 6c 0a 09 20 20 20 20 6c 69 73  he full..    lis
1960: 74 20 6f 66 20 76 61 6c 69 64 20 76 61 6c 75 65  t of valid value
1970: 73 2e 20 28 54 4c 53 20 31 2e 32 20 61 6e 64 20  s. (TLS 1.2 and 
1980: 65 61 72 6c 69 65 72 20 6f 6e 6c 79 29 3c 2f 64  earlier only)</d
1990: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c  d>.        <dt><
19a0: 73 74 72 6f 6e 67 3e 2d 63 69 70 68 65 72 73 75  strong>-ciphersu
19b0: 69 74 65 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  ites</strong> <e
19c0: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64  m>string</em></d
19d0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 4c  t>.        <dd>L
19e0: 69 73 74 20 6f 66 20 63 69 70 68 65 72 20 73 75  ist of cipher su
19f0: 69 74 65 73 20 74 6f 20 75 73 65 2e 20 53 74 72  ites to use. Str
1a00: 69 6e 67 20 69 73 20 61 20 63 6f 6c 6f 6e 20 28  ing is a colon (
1a10: 22 3a 22 29 0a 09 20 20 20 20 73 65 70 61 72 61  ":")..    separa
1a20: 74 65 64 20 6c 69 73 74 20 6f 66 20 63 69 70 68  ted list of ciph
1a30: 65 72 20 73 75 69 74 65 20 6e 61 6d 65 73 2e 20  er suite names. 
1a40: 28 54 4c 53 20 31 2e 33 20 6f 6e 6c 79 29 3c 2f  (TLS 1.3 only)</
1a50: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e  dd>.        <dt>
1a60: 3c 73 74 72 6f 6e 67 3e 2d 63 6f 6d 6d 61 6e 64  <strong>-command
1a70: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61  </strong> <em>ca
1a80: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e  llback</em></dt>
1a90: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 43 61 6c  .        <dd>Cal
1aa0: 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20  lback to invoke 
1ab0: 61 74 20 73 65 76 65 72 61 6c 20 70 6f 69 6e 74  at several point
1ac0: 73 20 64 75 72 69 6e 67 20 74 68 65 20 68 61 6e  s during the han
1ad0: 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 54 68 69  dshake...    Thi
1ae0: 73 20 69 73 20 75 73 65 64 20 74 6f 20 70 61 73  s is used to pas
1af0: 73 20 65 72 72 6f 72 73 20 61 6e 64 20 74 72 61  s errors and tra
1b00: 63 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e  cing information
1b10: 2c 20 61 6e 64 0a 09 20 20 20 20 69 74 20 63 61  , and..    it ca
1b20: 6e 20 61 6c 6c 6f 77 20 54 63 6c 20 73 63 72 69  n allow Tcl scri
1b30: 70 74 73 20 74 6f 20 70 65 72 66 6f 72 6d 20 74  pts to perform t
1b40: 68 65 69 72 20 6f 77 6e 20 63 65 72 74 69 66 69  heir own certifi
1b50: 63 61 74 65 0a 09 20 20 20 20 76 61 6c 69 64 61  cate..    valida
1b60: 74 69 6f 6e 20 69 6e 20 70 6c 61 63 65 20 6f 66  tion in place of
1b70: 20 74 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c   the default val
1b80: 69 64 61 74 69 6f 6e 20 70 72 6f 76 69 64 65 64  idation provided
1b90: 20 62 79 0a 09 20 20 20 20 4f 70 65 6e 53 53 4c   by..    OpenSSL
1ba0: 2e 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22 23  . See <a href="#
1bb0: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53  CALLBACK OPTIONS
1bc0: 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f  ">CALLBACK OPTIO
1bd0: 4e 53 3c 2f 61 3e 0a 09 20 20 20 20 66 6f 72 20  NS</a>..    for 
1be0: 66 75 72 74 68 65 72 20 64 69 73 63 75 73 73 69  further discussi
1bf0: 6f 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  on.</dd>.       
1c00: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 64 68   <dt><strong>-dh
1c10: 70 61 72 61 6d 73 20 3c 2f 73 74 72 6f 6e 67 3e  params </strong>
1c20: 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d  <em>filename</em
1c30: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
1c40: 64 64 3e 53 70 65 63 69 66 79 20 74 68 65 20 44  dd>Specify the D
1c50: 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 70 61  iffie-Hellman pa
1c60: 72 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c 2f  rameters file.</
1c70: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e  dd>.        <dt>
1c80: 3c 73 74 72 6f 6e 67 3e 2d 6b 65 79 66 69 6c 65  <strong>-keyfile
1c90: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 66 69  </strong> <em>fi
1ca0: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  lename</em></dt>
1cb0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 53 70 65  .        <dd>Spe
1cc0: 63 69 66 79 20 74 68 65 20 70 72 69 76 61 74 65  cify the private
1cd0: 20 6b 65 79 20 66 69 6c 65 2e 20 28 64 65 66 61   key file. (defa
1ce0: 75 6c 74 20 69 73 0a 20 20 20 20 20 20 20 20 20  ult is.         
1cf0: 20 20 20 76 61 6c 75 65 20 6f 66 20 2d 63 65 72     value of -cer
1d00: 74 66 69 6c 65 29 3c 2f 64 64 3e 0a 20 20 20 20  tfile)</dd>.    
1d10: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
1d20: 2d 6b 65 79 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  -key</strong> <e
1d30: 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c  m>filename</em><
1d40: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
1d50: 3e 53 70 65 63 69 66 79 20 74 68 65 20 70 72 69  >Specify the pri
1d60: 76 61 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20  vate key to use 
1d70: 61 73 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64  as a DER encoded
1d80: 20 76 61 6c 75 65 20 28 50 4b 43 53 23 31 20 44   value (PKCS#1 D
1d90: 45 52 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  ER)</dd>.       
1da0: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 6d 6f   <dt><strong>-mo
1db0: 64 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  del</strong> <em
1dc0: 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64  >channel</em></d
1dd0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 46  t>.        <dd>F
1de0: 6f 72 63 65 20 74 68 69 73 20 63 68 61 6e 6e 65  orce this channe
1df0: 6c 20 74 6f 20 73 68 61 72 65 20 74 68 65 20 73  l to share the s
1e00: 61 6d 65 20 3c 65 6d 3e 3c 73 74 72 6f 6e 67 3e  ame <em><strong>
1e10: 53 53 4c 5f 43 54 58 3c 2f 73 74 72 6f 6e 67 3e  SSL_CTX</strong>
1e20: 3c 2f 65 6d 3e 0a 20 20 20 20 20 20 20 20 20 20  </em>.          
1e30: 20 20 73 74 72 75 63 74 75 72 65 20 61 73 20 74    structure as t
1e40: 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65 6d  he specified <em
1e50: 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 2c 20 61  >channel</em>, a
1e60: 6e 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 74  nd.            t
1e70: 68 65 72 65 66 6f 72 65 20 73 68 61 72 65 20 63  herefore share c
1e80: 61 6c 6c 62 61 63 6b 73 20 65 74 63 2e 3c 2f 64  allbacks etc.</d
1e90: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c  d>.        <dt><
1ea0: 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64  strong>-password
1eb0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61  </strong> <em>ca
1ec0: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e  llback</em></dt>
1ed0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 43 61 6c  .        <dd>Cal
1ee0: 6c 62 61 63 6b 20 74 6f 20 69 6e 76 6f 6b 65 20  lback to invoke 
1ef0: 77 68 65 6e 20 4f 70 65 6e 53 53 4c 20 6e 65 65  when OpenSSL nee
1f00: 64 73 20 74 6f 20 6f 62 74 61 69 6e 20 61 20 70  ds to obtain a p
1f10: 61 73 73 77 6f 72 64 2c 0a 09 20 20 20 20 74 79  assword,..    ty
1f20: 70 69 63 61 6c 6c 79 20 74 6f 20 75 6e 6c 6f 63  pically to unloc
1f30: 6b 20 74 68 65 20 70 72 69 76 61 74 65 20 6b 65  k the private ke
1f40: 79 20 6f 66 20 61 20 63 65 72 74 69 66 69 63 61  y of a certifica
1f50: 74 65 2e 20 54 68 65 0a 20 20 20 20 20 20 20 20  te. The.        
1f60: 20 20 20 20 63 61 6c 6c 62 61 63 6b 20 73 68 6f      callback sho
1f70: 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73 74 72  uld return a str
1f80: 69 6e 67 20 77 68 69 63 68 20 72 65 70 72 65 73  ing which repres
1f90: 65 6e 74 73 20 74 68 65 20 70 61 73 73 77 6f 72  ents the passwor
1fa0: 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 6f  d.            to
1fb0: 20 62 65 20 75 73 65 64 2e 20 53 65 65 20 3c 61   be used. See <a
1fc0: 20 68 72 65 66 3d 22 23 43 41 4c 4c 42 41 43 4b   href="#CALLBACK
1fd0: 20 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41   OPTIONS">CALLBA
1fe0: 43 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 0a 09  CK OPTIONS</a>..
1ff0: 20 20 20 20 66 6f 72 20 66 75 72 74 68 65 72 20      for further 
2000: 64 69 73 63 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e  discussion.</dd>
2010: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70  ..<dt><strong>-p
2020: 6f 73 74 5f 68 61 6e 64 73 68 61 6b 65 3c 2f 73  ost_handshake</s
2030: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c  trong> <em>bool<
2040: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 41  /em></dt>..<dd>A
2050: 6c 6c 6f 77 20 70 6f 73 74 2d 68 61 6e 64 73 68  llow post-handsh
2060: 61 6b 65 20 74 69 63 6b 65 74 20 75 70 64 61 74  ake ticket updat
2070: 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  es.</dd>.       
2080: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65   <dt><strong>-re
2090: 71 75 65 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c  quest </strong><
20a0: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  em>bool</em></dt
20b0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 52 65  >.        <dd>Re
20c0: 71 75 65 73 74 20 61 20 63 65 72 74 69 66 69 63  quest a certific
20d0: 61 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75  ate from peer du
20e0: 72 69 6e 67 20 53 53 4c 20 68 61 6e 64 73 68 61  ring SSL handsha
20f0: 6b 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20  ke..            
2100: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
2110: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  true</em>)</dd>.
2120: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
2130: 6f 6e 67 3e 2d 72 65 71 75 69 72 65 3c 2f 73 74  ong>-require</st
2140: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f  rong> <em>bool</
2150: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
2160: 20 3c 64 64 3e 52 65 71 75 69 72 65 20 61 20 76   <dd>Require a v
2170: 61 6c 69 64 20 63 65 72 74 69 66 69 63 61 74 65  alid certificate
2180: 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72 69 6e   from peer durin
2190: 67 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e  g SSL handshake.
21a0: 0a 09 20 20 20 20 49 66 20 74 68 69 73 20 69 73  ..    If this is
21b0: 20 73 65 74 20 74 6f 20 74 72 75 65 2c 20 74 68   set to true, th
21c0: 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75  en <strong>-requ
21d0: 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 20 6d 75 73  est</strong> mus
21e0: 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 6c  t.            al
21f0: 73 6f 20 62 65 20 73 65 74 20 74 6f 20 74 72 75  so be set to tru
2200: 65 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  e. (default is <
2210: 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f  em>false</em>)</
2220: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e  dd>.        <dt>
2230: 3c 73 74 72 6f 6e 67 3e 2d 73 65 63 75 72 69 74  <strong>-securit
2240: 79 6c 65 76 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20  ylevel</strong> 
2250: 3c 65 6d 3e 69 6e 74 65 67 65 72 3c 2f 65 6d 3e  <em>integer</em>
2260: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
2270: 64 3e 53 65 74 20 73 65 63 75 72 69 74 79 20 6c  d>Set security l
2280: 65 76 65 6c 2e 20 4d 75 73 74 20 62 65 20 30 20  evel. Must be 0 
2290: 74 6f 20 35 2e 20 54 68 65 20 73 65 63 75 72 69  to 5. The securi
22a0: 74 79 20 6c 65 76 65 6c 20 61 66 66 65 63 74 73  ty level affects
22b0: 0a 09 20 20 20 20 63 69 70 68 65 72 20 73 75 69  ..    cipher sui
22c0: 74 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 61 6c  te encryption al
22d0: 67 6f 72 69 74 68 6d 73 2c 20 73 75 70 70 6f 72  gorithms, suppor
22e0: 74 65 64 20 45 43 43 20 63 75 72 76 65 73 2c 0a  ted ECC curves,.
22f0: 09 20 20 20 20 73 75 70 70 6f 72 74 65 64 20 73  .    supported s
2300: 69 67 6e 61 74 75 72 65 20 61 6c 67 6f 72 69 74  ignature algorit
2310: 68 6d 73 2c 20 44 48 20 70 61 72 61 6d 65 74 65  hms, DH paramete
2320: 72 20 73 69 7a 65 73 2c 20 63 65 72 74 69 66 69  r sizes, certifi
2330: 63 61 74 65 0a 09 20 20 20 20 6b 65 79 20 73 69  cate..    key si
2340: 7a 65 73 20 61 6e 64 20 73 69 67 6e 61 74 75 72  zes and signatur
2350: 65 20 61 6c 67 6f 72 69 74 68 6d 73 2e 20 54 68  e algorithms. Th
2360: 65 20 64 65 66 61 75 6c 74 20 69 73 20 31 2e 0a  e default is 1..
2370: 09 20 20 20 20 4c 65 76 65 6c 20 33 20 61 6e 64  .    Level 3 and
2380: 20 68 69 67 68 65 72 20 64 69 73 61 62 6c 65 20   higher disable 
2390: 73 75 70 70 6f 72 74 20 66 6f 72 20 73 65 73 73  support for sess
23a0: 69 6f 6e 20 74 69 63 6b 65 74 73 20 61 6e 64 20  ion tickets and 
23b0: 6f 6e 6c 79 0a 09 20 20 20 20 61 63 63 65 70 74  only..    accept
23c0: 20 63 69 70 68 65 72 20 73 75 69 74 65 73 20 74   cipher suites t
23d0: 68 61 74 20 70 72 6f 76 69 64 65 20 66 6f 72 77  hat provide forw
23e0: 61 72 64 20 73 65 63 72 65 63 79 2e 3c 2f 64 64  ard secrecy.</dd
23f0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
2400: 74 72 6f 6e 67 3e 2d 73 65 72 76 65 72 3c 2f 73  trong>-server</s
2410: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c  trong> <em>bool<
2420: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
2430: 20 20 3c 64 64 3e 48 61 6e 64 73 68 61 6b 65 20    <dd>Handshake 
2440: 61 73 20 73 65 72 76 65 72 20 69 66 20 74 72 75  as server if tru
2450: 65 2c 20 65 6c 73 65 20 68 61 6e 64 73 68 61 6b  e, else handshak
2460: 65 20 61 73 0a 20 20 20 20 20 20 20 20 20 20 20  e as.           
2470: 20 63 6c 69 65 6e 74 2e 20 28 64 65 66 61 75 6c   client. (defaul
2480: 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f  t is <em>false</
2490: 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20  em>)</dd>.      
24a0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73    <dt><strong>-s
24b0: 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f 6e  ervername</stron
24c0: 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e  g> <em>host</em>
24d0: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
24e0: 64 3e 53 70 65 63 69 66 79 20 73 65 72 76 65 72  d>Specify server
24f0: 20 68 6f 73 74 6e 61 6d 65 2e 20 4f 6e 6c 79 20   hostname. Only 
2500: 61 76 61 69 6c 61 62 6c 65 20 69 66 20 74 68 65  available if the
2510: 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79   OpenSSL library
2520: 0a 09 20 20 20 20 74 68 65 20 70 61 63 6b 61 67  ..    the packag
2530: 65 20 69 73 20 6c 69 6e 6b 65 64 20 61 67 61 69  e is linked agai
2540: 6e 73 74 20 73 75 70 70 6f 72 74 73 20 74 68 65  nst supports the
2550: 20 54 4c 53 20 68 6f 73 74 6e 61 6d 65 20 65 78   TLS hostname ex
2560: 74 65 6e 73 69 6f 6e 0a 09 20 20 20 20 66 6f 72  tension..    for
2570: 20 27 53 65 72 76 65 72 20 4e 61 6d 65 20 49 6e   'Server Name In
2580: 64 69 63 61 74 69 6f 6e 27 20 28 53 4e 49 29 2e  dication' (SNI).
2590: 20 55 73 65 20 74 6f 20 6e 61 6d 65 20 74 68 65   Use to name the
25a0: 20 6c 6f 67 69 63 61 6c 20 68 6f 73 74 0a 09 20   logical host.. 
25b0: 20 20 20 77 65 20 61 72 65 20 74 61 6c 6b 69 6e     we are talkin
25c0: 67 20 74 6f 20 61 6e 64 20 65 78 70 65 63 74 69  g to and expecti
25d0: 6e 67 20 61 20 63 65 72 74 69 66 69 63 61 74 65  ng a certificate
25e0: 20 66 6f 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20   for.</dd>.     
25f0: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d     <dt><strong>-
2600: 73 65 73 73 69 6f 6e 5f 69 64 3c 2f 73 74 72 6f  session_id</stro
2610: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f  ng> <em>string</
2620: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
2630: 20 3c 64 64 3e 53 65 73 73 69 6f 6e 20 69 64 20   <dd>Session id 
2640: 74 6f 20 72 65 73 75 6d 65 20 73 65 73 73 69 6f  to resume sessio
2650: 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  n.</dd>.        
2660: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c  <dt><strong>-ssl
2670: 32 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62  2</strong> <em>b
2680: 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ool</em></dt>.  
2690: 20 20 20 20 20 20 3c 64 64 3e 45 6e 61 62 6c 65        <dd>Enable
26a0: 20 75 73 65 20 6f 66 20 53 53 4c 20 76 32 2e 20   use of SSL v2. 
26b0: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
26c0: 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e  false</em>)</dd>
26d0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
26e0: 72 6f 6e 67 3e 2d 73 73 6c 33 20 3c 2f 73 74 72  rong>-ssl3 </str
26f0: 6f 6e 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d  ong><em>bool</em
2700: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
2710: 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66  dd>Enable use of
2720: 20 53 53 4c 20 76 33 2e 20 28 64 65 66 61 75 6c   SSL v3. (defaul
2730: 74 20 69 73 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f  t is <em>false</
2740: 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20  em>)</dd>.      
2750: 20 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74    <dt>-<strong>t
2760: 6c 73 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ls1</strong> <em
2770: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >bool</em></dt>.
2780: 20 20 20 20 20 20 20 20 3c 64 64 3e 45 6e 61 62          <dd>Enab
2790: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31  le use of TLS v1
27a0: 2e 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65  . (default is <e
27b0: 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64  m>true</em>)</dd
27c0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 2d 3c  >.        <dt>-<
27d0: 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 31 3c 2f 73  strong>tls1.1</s
27e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c  trong> <em>bool<
27f0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
2800: 20 20 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65    <dd>Enable use
2810: 20 6f 66 20 54 4c 53 20 76 31 2e 31 20 28 64 65   of TLS v1.1 (de
2820: 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75  fault is <em>tru
2830: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20  e</em>)</dd>.   
2840: 20 20 20 20 20 3c 64 74 3e 2d 3c 73 74 72 6f 6e       <dt>-<stron
2850: 67 3e 74 6c 73 31 2e 32 3c 2f 73 74 72 6f 6e 67  g>tls1.2</strong
2860: 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  > <em>bool</em><
2870: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
2880: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54  >Enable use of T
2890: 4c 53 20 76 31 2e 32 20 28 64 65 66 61 75 6c 74  LS v1.2 (default
28a0: 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d   is <em>true</em
28b0: 3e 29 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  >)</dd>.        
28c0: 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73  <dt>-<strong>tls
28d0: 31 2e 33 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  1.3</strong> <em
28e0: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >bool</em></dt>.
28f0: 20 20 20 20 20 20 20 20 3c 64 64 3e 45 6e 61 62          <dd>Enab
2900: 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31  le use of TLS v1
2910: 2e 33 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c  .3 (default is <
2920: 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64  em>true</em>)</d
2930: 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62  d>.    </dl>.</b
2940: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20 20 20  lockquote>..    
2950: 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73  <dt><a name="tls
2960: 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e 3c 62 3e 74  ::unimport"><b>t
2970: 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 20 3c 2f 62  ls::unimport </b
2980: 3e 3c 69 3e 63 68 61 6e 6e 65 6c 3c 2f 69 3e 3c  ><i>channel</i><
2990: 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64  /a></dt>.    <dd
29a0: 3e 50 72 6f 76 69 64 65 64 20 66 6f 72 20 73 79  >Provided for sy
29b0: 6d 6d 65 74 72 79 20 74 6f 20 3c 73 74 72 6f 6e  mmetry to <stron
29c0: 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73  g>tls::import</s
29d0: 74 72 6f 6e 67 3e 2c 20 74 68 69 73 0a 20 20 20  trong>, this.   
29e0: 20 20 20 75 6e 73 74 61 63 6b 73 20 74 68 65 20     unstacks the 
29f0: 53 53 4c 2d 65 6e 61 62 6c 69 6e 67 20 6f 66 20  SSL-enabling of 
2a00: 61 20 72 65 67 75 6c 61 72 20 54 63 6c 20 63 68  a regular Tcl ch
2a10: 61 6e 6e 65 6c 2e 20 20 41 6e 20 65 72 72 6f 72  annel.  An error
2a20: 0a 20 20 20 20 20 20 69 73 20 74 68 72 6f 77 6e  .      is thrown
2a30: 20 69 66 20 54 4c 53 20 69 73 20 6e 6f 74 20 74   if TLS is not t
2a40: 68 65 20 74 6f 70 20 73 74 61 63 6b 65 64 20 63  he top stacked c
2a50: 68 61 6e 6e 65 6c 20 74 79 70 65 2e 3c 2f 64 64  hannel type.</dd
2a60: 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73 70 3b  >.    <dt>&nbsp;
2a70: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c 61  </dt>.    <dt><a
2a80: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68 61 6e 64   name="tls::hand
2a90: 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e 67 3e 74  shake"><strong>t
2aa0: 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 73  ls::handshake</s
2ab0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e  trong> <em>chann
2ac0: 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e  el</em></a></dt>
2ad0: 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63 65 73 20  .    <dd>Forces 
2ae0: 68 61 6e 64 73 68 61 6b 65 20 74 6f 20 74 61 6b  handshake to tak
2af0: 65 20 70 6c 61 63 65 2c 20 61 6e 64 20 72 65 74  e place, and ret
2b00: 75 72 6e 73 20 30 20 69 66 0a 20 20 20 20 20 20  urns 0 if.      
2b10: 20 20 68 61 6e 64 73 68 61 6b 65 20 69 73 20 73    handshake is s
2b20: 74 69 6c 6c 20 69 6e 20 70 72 6f 67 72 65 73 73  till in progress
2b30: 20 28 6e 6f 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c   (non-blocking),
2b40: 20 6f 72 20 31 20 69 66 0a 20 20 20 20 20 20 20   or 1 if.       
2b50: 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20 77   the handshake w
2b60: 61 73 20 73 75 63 63 65 73 73 66 75 6c 2e 20 49  as successful. I
2b70: 66 20 74 68 65 20 68 61 6e 64 73 68 61 6b 65 20  f the handshake 
2b80: 66 61 69 6c 65 64 0a 20 20 20 20 20 20 20 20 74  failed.        t
2b90: 68 69 73 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c  his routine will
2ba0: 20 74 68 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e   throw an error.
2bb0: 3c 2f 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e  </dd>.    <dt>&n
2bc0: 62 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  bsp;</dt>.    <d
2bd0: 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a  t><a name="tls::
2be0: 73 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e  status"><strong>
2bf0: 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72  tls::status</str
2c00: 6f 6e 67 3e 0a 20 20 20 20 3c 65 6d 3e 3f 2d 6c  ong>.    <em>?-l
2c10: 6f 63 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65  ocal? channel</e
2c20: 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20  m></a></dt>.    
2c30: 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20  <dd>Returns the 
2c40: 63 75 72 72 65 6e 74 20 73 74 61 74 75 73 20 6f  current status o
2c50: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
2c60: 65 20 66 6f 72 20 61 6e 20 53 53 4c 0a 09 63 68  e for an SSL..ch
2c70: 61 6e 6e 65 6c 2e 20 54 68 65 20 72 65 73 75 6c  annel. The resul
2c80: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b  t is a list of k
2c90: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 64  ey-value pairs d
2ca0: 65 73 63 72 69 62 69 6e 67 0a 09 74 68 65 20 63  escribing..the c
2cb0: 65 72 74 69 66 69 63 61 74 65 2e 20 49 66 20 74  ertificate. If t
2cc0: 68 65 20 72 65 73 75 6c 74 20 69 73 20 61 6e 20  he result is an 
2cd0: 65 6d 70 74 79 20 6c 69 73 74 20 74 68 65 6e 20  empty list then 
2ce0: 74 68 65 0a 20 20 20 20 20 20 20 20 53 53 4c 20  the.        SSL 
2cf0: 68 61 6e 64 73 68 61 6b 65 20 68 61 73 20 6e 6f  handshake has no
2d00: 74 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 64 2e  t yet completed.
2d10: 20 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f   If <em>-local</
2d20: 65 6d 3e 20 69 73 0a 09 73 70 65 63 69 66 69 65  em> is..specifie
2d30: 64 2c 20 74 68 65 6e 20 74 68 65 20 6c 6f 63 61  d, then the loca
2d40: 6c 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73  l certificate is
2d50: 20 75 73 65 64 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f   used.</dd>.<blo
2d60: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c  ckquote>..<b>SSL
2d70: 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20   Status</b>.    
2d80: 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  <dl>.        <dt
2d90: 3e 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73  ><strong>alpn</s
2da0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f  trong> <em>proto
2db0: 63 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  col</em></dt>.  
2dc0: 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20 70 72        <dd>The pr
2dd0: 6f 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20  otocol selected 
2de0: 61 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f  after Applicatio
2df0: 6e 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c  n-Layer Protocol
2e00: 0a 09 20 20 20 20 4e 65 67 6f 74 69 61 74 69 6f  ..    Negotiatio
2e10: 6e 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 20  n (ALPN).</dd>. 
2e20: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
2e30: 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e  ng>cipher</stron
2e40: 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65  g> <em>cipher</e
2e50: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
2e60: 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74 20  <dd>The current 
2e70: 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 62 65  cipher in use be
2e80: 74 77 65 65 6e 20 74 68 65 20 63 6c 69 65 6e 74  tween the client
2e90: 20 61 6e 64 0a 20 20 20 20 20 20 20 20 20 20 20   and.           
2ea0: 20 73 65 72 76 65 72 20 63 68 61 6e 6e 65 6c 73   server channels
2eb0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  .</dd>.        <
2ec0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 65 65 72 6e  dt><strong>peern
2ed0: 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ame</strong> <em
2ee0: 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >name</em></dt>.
2ef0: 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20          <dd>The 
2f00: 70 65 65 72 6e 61 6d 65 20 66 72 6f 6d 20 74 68  peername from th
2f10: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f  e certificate.</
2f20: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e  dd>.        <dt>
2f30: 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f 63 6f 6c  <strong>protocol
2f40: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65  </strong> <em>ve
2f50: 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  rsion</em></dt>.
2f60: 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20          <dd>The 
2f70: 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e  protocol version
2f80: 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f   used for the co
2f90: 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20 20 20 53  nnection:..    S
2fa0: 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c 53 31 2c  SL2, SSL3, TLS1,
2fb0: 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31 2e 32 2c   TLS1.1, TLS1.2,
2fc0: 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75 6e 6b 6e   TLS1.3, or unkn
2fd0: 6f 77 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  own.</dd>.      
2fe0: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 62    <dt><strong>sb
2ff0: 69 74 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  its</strong> <em
3000: 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  >n</em></dt>.   
3010: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 6e 75 6d       <dd>The num
3020: 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64  ber of bits used
3030: 20 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e   for the session
3040: 20 6b 65 79 2e 3c 2f 64 64 3e 0a 20 20 20 20 20   key.</dd>.     
3050: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73     <dt><strong>s
3060: 69 67 6e 61 74 75 72 65 48 61 73 68 41 6c 67 6f  ignatureHashAlgo
3070: 72 69 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c  rithm</strong> <
3080: 65 6d 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d  em>algorithm</em
3090: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
30a0: 64 64 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65  dd>The signature
30b0: 20 68 61 73 68 20 61 6c 67 6f 72 69 74 68 6d 2e   hash algorithm.
30c0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
30d0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74  t><strong>signat
30e0: 75 72 65 5f 74 79 70 65 3c 2f 73 74 72 6f 6e 67  ure_type</strong
30f0: 3e 20 3c 65 6d 3e 74 79 70 65 3c 2f 65 6d 3e 3c  > <em>type</em><
3100: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
3110: 3e 54 68 65 20 73 69 67 6e 61 74 75 72 65 20 74  >The signature t
3120: 79 70 65 20 76 61 6c 75 65 2e 3c 2f 64 64 3e 0a  ype value.</dd>.
3130: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
3140: 6f 6e 67 3e 76 65 72 69 66 69 63 61 74 69 6f 6e  ong>verification
3150: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 72 65  </strong> <em>re
3160: 73 75 6c 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  sult</em></dt>. 
3170: 20 20 20 20 20 20 20 3c 64 64 3e 43 65 72 74 69         <dd>Certi
3180: 66 69 63 61 74 65 20 76 65 72 69 66 69 63 61 74  ficate verificat
3190: 69 6f 6e 20 72 65 73 75 6c 74 2e 3c 2f 64 64 3e  ion result.</dd>
31a0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
31b0: 72 6f 6e 67 3e 63 61 5f 6e 61 6d 65 73 3c 2f 73  rong>ca_names</s
31c0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69 73 74 3c  trong> <em>list<
31d0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
31e0: 20 20 3c 64 64 3e 4c 69 73 74 20 6f 66 20 74 68    <dd>List of th
31f0: 65 20 43 65 72 74 69 66 69 63 61 74 65 20 41 75  e Certificate Au
3200: 74 68 6f 72 69 74 69 65 73 20 75 73 65 64 20 74  thorities used t
3210: 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 65 72  o create the cer
3220: 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20  tificate.</dd>. 
3230: 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b     </dl>.</block
3240: 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f  quote>.<blockquo
3250: 74 65 3e 0a 09 3c 62 3e 43 65 72 74 69 66 69 63  te>..<b>Certific
3260: 61 74 65 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20  ate Status</b>. 
3270: 20 20 20 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20     <dl>.        
3280: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 61 6c 6c 3c  <dt><strong>all<
3290: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72  /strong> <em>str
32a0: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ing</em></dt>.  
32b0: 20 20 20 20 20 20 3c 64 64 3e 44 75 6d 70 20 6f        <dd>Dump o
32c0: 66 20 61 6c 6c 20 63 65 72 74 69 66 69 63 61 74  f all certificat
32d0: 65 20 69 6e 66 6f 2e 3c 2f 64 64 3e 0a 0a 20 20  e info.</dd>..  
32e0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
32f0: 67 3e 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e  g>version</stron
3300: 67 3e 20 3c 65 6d 3e 76 61 6c 75 65 3c 2f 65 6d  g> <em>value</em
3310: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
3320: 64 64 3e 54 68 65 20 63 65 72 74 69 66 69 63 61  dd>The certifica
3330: 74 65 20 76 65 72 73 69 6f 6e 2e 3c 2f 64 64 3e  te version.</dd>
3340: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
3350: 72 6f 6e 67 3e 73 65 72 69 61 6c 4e 75 6d 62 65  rong>serialNumbe
3360: 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e  r</strong> <em>n
3370: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20  </em></dt>.     
3380: 20 20 20 3c 64 64 3e 54 68 65 20 73 65 72 69 61     <dd>The seria
3390: 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20  l number of the 
33a0: 63 65 72 74 69 66 69 63 61 74 65 20 61 73 20 68  certificate as h
33b0: 65 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a  ex string.</dd>.
33c0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
33d0: 6f 6e 67 3e 73 69 67 6e 61 74 75 72 65 3c 2f 73  ong>signature</s
33e0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 61 6c 67 6f 72  trong> <em>algor
33f0: 69 74 68 6d 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  ithm</em></dt>. 
3400: 20 20 20 20 20 20 20 3c 64 64 3e 43 69 70 68 65         <dd>Ciphe
3410: 72 20 61 6c 67 6f 72 69 74 68 6d 20 75 73 65 64  r algorithm used
3420: 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65   for certificate
3430: 20 73 69 67 6e 61 74 75 72 65 2e 3c 2f 64 64 3e   signature.</dd>
3440: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
3450: 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f 73 74 72  rong>issuer</str
3460: 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e  ong> <em>dn</em>
3470: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
3480: 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73  d>The distinguis
3490: 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66  hed name (DN) of
34a0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
34b0: 20 69 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 20 20   issuer.</dd>.  
34c0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
34d0: 67 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72  g>notBefore</str
34e0: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65  ong> <em>date</e
34f0: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
3500: 3c 64 64 3e 54 68 65 20 62 65 67 69 6e 20 64 61  <dd>The begin da
3510: 74 65 20 66 6f 72 20 74 68 65 20 76 61 6c 69 64  te for the valid
3520: 69 74 79 20 6f 66 20 74 68 65 20 63 65 72 74 69  ity of the certi
3530: 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20  ficate.</dd>.   
3540: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
3550: 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72 6f 6e  >notAfter</stron
3560: 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65 6d 3e  g> <em>date</em>
3570: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
3580: 64 3e 54 68 65 20 65 78 70 69 72 61 74 69 6f 6e  d>The expiration
3590: 20 64 61 74 65 20 66 6f 72 20 74 68 65 20 63 65   date for the ce
35a0: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a  rtificate.</dd>.
35b0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
35c0: 6f 6e 67 3e 73 75 62 6a 65 63 74 3c 2f 73 74 72  ong>subject</str
35d0: 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f 65 6d 3e  ong> <em>dn</em>
35e0: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
35f0: 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69 73  d>The distinguis
3600: 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f 66  hed name (DN) of
3610: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
3620: 20 73 75 62 6a 65 63 74 2e 0a 09 20 20 20 20 46   subject...    F
3630: 69 65 6c 64 73 20 69 6e 63 6c 75 64 65 3a 20 43  ields include: C
3640: 6f 6d 6d 6f 6e 20 4e 61 6d 65 20 28 43 4e 29 2c  ommon Name (CN),
3650: 20 4f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 28 4f   Organization (O
3660: 29 2c 20 4c 6f 63 61 6c 69 74 79 0a 09 20 20 20  ), Locality..   
3670: 20 6f 72 20 43 69 74 79 20 28 4c 29 2c 20 53 74   or City (L), St
3680: 61 74 65 20 6f 72 20 50 72 6f 76 69 6e 63 65 20  ate or Province 
3690: 28 53 29 2c 20 61 6e 64 20 43 6f 75 6e 74 72 79  (S), and Country
36a0: 20 4e 61 6d 65 20 28 43 29 2e 3c 2f 64 64 3e 0a   Name (C).</dd>.
36b0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
36c0: 6f 6e 67 3e 69 73 73 75 65 72 55 6e 69 71 75 65  ong>issuerUnique
36d0: 49 44 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  ID</strong> <em>
36e0: 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e  string</em></dt>
36f0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65  .        <dd>The
3700: 20 69 73 73 75 65 72 20 75 6e 69 71 75 65 20 69   issuer unique i
3710: 64 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  d.</dd>.        
3720: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a  <dt><strong>subj
3730: 65 63 74 55 6e 69 71 75 65 49 44 3c 2f 73 74 72  ectUniqueID</str
3740: 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c  ong> <em>string<
3750: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
3760: 20 20 3c 64 64 3e 54 68 65 20 73 75 62 6a 65 63    <dd>The subjec
3770: 74 20 75 6e 69 71 75 65 20 69 64 2e 3c 2f 64 64  t unique id.</dd
3780: 3e 0a 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c  >..        <dt><
3790: 73 74 72 6f 6e 67 3e 6e 75 6d 5f 65 78 74 65 6e  strong>num_exten
37a0: 73 69 6f 6e 73 3c 2f 73 74 72 6f 6e 67 3e 20 3c  sions</strong> <
37b0: 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  em>n</em></dt>. 
37c0: 20 20 20 20 20 20 20 3c 64 64 3e 4e 75 6d 62 65         <dd>Numbe
37d0: 72 20 6f 66 20 63 65 72 74 69 66 69 63 61 74 65  r of certificate
37e0: 20 65 78 74 65 6e 73 69 6f 6e 73 2e 3c 2f 64 64   extensions.</dd
37f0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
3800: 74 72 6f 6e 67 3e 65 78 74 65 6e 73 69 6f 6e 73  trong>extensions
3810: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6c 69  </strong> <em>li
3820: 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  st</em></dt>.   
3830: 20 20 20 20 20 3c 64 64 3e 4c 69 73 74 20 6f 66       <dd>List of
3840: 20 63 65 72 74 69 66 69 63 61 74 65 20 65 78 74   certificate ext
3850: 65 6e 73 69 6f 6e 20 6e 61 6d 65 73 2e 3c 2f 64  ension names.</d
3860: 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c  d>.        <dt><
3870: 73 74 72 6f 6e 67 3e 61 75 74 68 6f 72 69 74 79  strong>authority
3880: 4b 65 79 49 64 65 6e 74 69 66 69 65 72 3c 2f 73  KeyIdentifier</s
3890: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e  trong> <em>strin
38a0: 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  g</em></dt>.    
38b0: 20 20 20 20 3c 64 64 3e 28 41 4b 49 29 20 4b 65      <dd>(AKI) Ke
38c0: 79 20 69 64 65 6e 74 69 66 69 65 72 20 6f 66 20  y identifier of 
38d0: 74 68 65 20 49 73 73 75 69 6e 67 20 43 41 20 63  the Issuing CA c
38e0: 65 72 74 69 66 69 63 61 74 65 20 74 68 61 74 20  ertificate that 
38f0: 73 69 67 6e 65 64 0a 09 20 20 20 20 74 68 65 20  signed..    the 
3900: 53 53 4c 20 63 65 72 74 69 66 69 63 61 74 65 2e  SSL certificate.
3910: 20 54 68 69 73 20 76 61 6c 75 65 20 6d 61 74 63   This value matc
3920: 68 65 73 20 74 68 65 20 53 4b 49 20 76 61 6c 75  hes the SKI valu
3930: 65 20 6f 66 20 74 68 65 0a 09 20 20 20 20 49 6e  e of the..    In
3940: 74 65 72 6d 65 64 69 61 74 65 20 43 41 20 63 65  termediate CA ce
3950: 72 74 69 66 69 63 61 74 65 2e 3c 2f 64 64 3e 0a  rtificate.</dd>.
3960: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
3970: 6f 6e 67 3e 73 75 62 6a 65 63 74 4b 65 79 49 64  ong>subjectKeyId
3980: 65 6e 74 69 66 69 65 72 3c 2f 73 74 72 6f 6e 67  entifier</strong
3990: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d  > <em>string</em
39a0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
39b0: 64 64 3e 28 53 4b 49 29 20 48 61 73 68 20 6f 66  dd>(SKI) Hash of
39c0: 20 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20   the public key 
39d0: 69 6e 73 69 64 65 20 74 68 65 20 63 65 72 74 69  inside the certi
39e0: 66 69 63 61 74 65 2e 20 55 73 65 64 20 74 6f 0a  ficate. Used to.
39f0: 09 20 20 20 69 64 65 6e 74 69 66 79 20 63 65 72  .   identify cer
3a00: 74 69 66 69 63 61 74 65 73 20 74 68 61 74 20 63  tificates that c
3a10: 6f 6e 74 61 69 6e 20 61 20 70 61 72 74 69 63 75  ontain a particu
3a20: 6c 61 72 20 70 75 62 6c 69 63 20 6b 65 79 2e 3c  lar public key.<
3a30: 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  /dd>.        <dt
3a40: 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a 65 63 74  ><strong>subject
3a50: 41 6c 74 4e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e  AltName</strong>
3a60: 20 3c 65 6d 3e 6c 69 73 74 3c 2f 65 6d 3e 3c 2f   <em>list</em></
3a70: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
3a80: 4c 69 73 74 20 6f 66 20 61 6c 6c 20 6f 66 20 74  List of all of t
3a90: 68 65 20 61 6c 74 65 72 6e 61 74 69 76 65 20 64  he alternative d
3aa0: 6f 6d 61 69 6e 20 6e 61 6d 65 73 2c 20 73 75 62  omain names, sub
3ab0: 20 64 6f 6d 61 69 6e 73 2c 0a 09 20 20 20 20 61   domains,..    a
3ac0: 6e 64 20 49 50 20 61 64 64 72 65 73 73 65 73 20  nd IP addresses 
3ad0: 74 68 61 74 20 61 72 65 20 73 65 63 75 72 65 64  that are secured
3ae0: 20 62 79 20 74 68 65 20 63 65 72 74 69 66 69 63   by the certific
3af0: 61 74 65 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20  ate.</dd>.      
3b00: 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 6f 63    <dt><strong>oc
3b10: 73 70 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  sp</strong> <em>
3b20: 6c 69 73 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  list</em></dt>. 
3b30: 20 20 20 20 20 20 20 3c 64 64 3e 4c 69 73 74 20         <dd>List 
3b40: 6f 66 20 61 6c 6c 20 4f 43 53 50 20 55 52 4c 73  of all OCSP URLs
3b50: 2e 3c 2f 64 64 3e 0a 0a 09 3c 64 74 3e 3c 73 74  .</dd>...<dt><st
3b60: 72 6f 6e 67 3e 63 65 72 74 69 66 69 63 61 74 65  rong>certificate
3b70: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 65  </strong> <em>ce
3b80: 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  rt</em></dt>.   
3b90: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 50 45 4d       <dd>The PEM
3ba0: 20 65 6e 63 6f 64 65 64 20 63 65 72 74 69 66 69   encoded certifi
3bb0: 63 61 74 65 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20  cate.</dd>..    
3bc0: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
3bd0: 73 69 67 6e 61 74 75 72 65 41 6c 67 6f 72 69 74  signatureAlgorit
3be0: 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  hm</strong> <em>
3bf0: 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c 2f  algorithm</em></
3c00: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
3c10: 43 69 70 68 65 72 20 61 6c 67 6f 72 69 74 68 6d  Cipher algorithm
3c20: 20 75 73 65 64 20 66 6f 72 20 63 65 72 74 69 66   used for certif
3c30: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 2e  icate signature.
3c40: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
3c50: 74 3e 3c 73 74 72 6f 6e 67 3e 73 69 67 6e 61 74  t><strong>signat
3c60: 75 72 65 56 61 6c 75 65 3c 2f 73 74 72 6f 6e 67  ureValue</strong
3c70: 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d  > <em>string</em
3c80: 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c  ></dt>.        <
3c90: 64 64 3e 43 65 72 74 69 66 69 63 61 74 65 20 73  dd>Certificate s
3ca0: 69 67 6e 61 74 75 72 65 20 61 73 20 68 65 78 20  ignature as hex 
3cb0: 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 20 20 20  string.</dd>.   
3cc0: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
3cd0: 3e 73 69 67 6e 61 74 75 72 65 44 69 67 65 73 74  >signatureDigest
3ce0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65  </strong> <em>ve
3cf0: 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  rsion</em></dt>.
3d00: 20 20 20 20 20 20 20 20 3c 64 64 3e 43 65 72 74          <dd>Cert
3d10: 69 66 69 63 61 74 65 20 73 69 67 6e 69 6e 67 20  ificate signing 
3d20: 64 69 67 65 73 74 2e 3c 2f 64 64 3e 0a 20 20 20  digest.</dd>.   
3d30: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
3d40: 3e 70 75 62 6c 69 63 4b 65 79 41 6c 67 6f 72 69  >publicKeyAlgori
3d50: 74 68 6d 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  thm</strong> <em
3d60: 3e 61 6c 67 6f 72 69 74 68 6d 3c 2f 65 6d 3e 3c  >algorithm</em><
3d70: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
3d80: 3e 43 65 72 74 69 66 69 63 61 74 65 20 73 69 67  >Certificate sig
3d90: 6e 61 74 75 72 65 20 70 75 62 6c 69 63 20 6b 65  nature public ke
3da0: 79 20 61 6c 67 6f 72 69 74 68 6d 2e 3c 2f 64 64  y algorithm.</dd
3db0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
3dc0: 74 72 6f 6e 67 3e 70 75 62 6c 69 63 4b 65 79 3c  trong>publicKey<
3dd0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72  /strong> <em>str
3de0: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ing</em></dt>.  
3df0: 20 20 20 20 20 20 3c 64 64 3e 43 65 72 74 69 66        <dd>Certif
3e00: 69 63 61 74 65 20 73 69 67 6e 61 74 75 72 65 20  icate signature 
3e10: 70 75 62 6c 69 63 20 6b 65 79 20 61 73 20 68 65  public key as he
3e20: 78 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 20  x string.</dd>. 
3e30: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
3e40: 6e 67 3e 62 69 74 73 3c 2f 73 74 72 6f 6e 67 3e  ng>bits</strong>
3e50: 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e   <em>n</em></dt>
3e60: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 4e 75 6d  .        <dd>Num
3e70: 62 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64  ber of bits used
3e80: 20 66 6f 72 20 63 65 72 74 69 66 69 63 61 74 65   for certificate
3e90: 20 73 69 67 6e 61 74 75 72 65 20 6b 65 79 3c 2f   signature key</
3ea0: 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e  dd>.        <dt>
3eb0: 3c 73 74 72 6f 6e 67 3e 73 65 6c 66 5f 73 69 67  <strong>self_sig
3ec0: 6e 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ned</strong> <em
3ed0: 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f 64  >boolean</em></d
3ee0: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 49  t>.        <dd>I
3ef0: 73 20 63 65 72 74 69 66 69 63 61 74 65 20 73 69  s certificate si
3f00: 67 6e 61 74 75 72 65 20 73 65 6c 66 20 73 69 67  gnature self sig
3f10: 6e 65 64 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 20  ned.</dd>..     
3f20: 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73     <dt><strong>s
3f30: 68 61 31 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67  ha1_hash</strong
3f40: 3e 20 3c 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c  > <em>hash</em><
3f50: 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64  /dt>.        <dd
3f60: 3e 54 68 65 20 53 48 41 31 20 68 61 73 68 20 6f  >The SHA1 hash o
3f70: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
3f80: 65 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e  e as hex string.
3f90: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
3fa0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 68 61 32 35 36  t><strong>sha256
3fb0: 5f 68 61 73 68 3c 2f 73 74 72 6f 6e 67 3e 20 3c  _hash</strong> <
3fc0: 65 6d 3e 68 61 73 68 3c 2f 65 6d 3e 3c 2f 64 74  em>hash</em></dt
3fd0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68  >.        <dd>Th
3fe0: 65 20 53 48 41 32 35 36 20 68 61 73 68 20 6f 66  e SHA256 hash of
3ff0: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
4000: 20 61 73 20 68 65 78 20 73 74 72 69 6e 67 2e 3c   as hex string.<
4010: 2f 64 64 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c  /dd>.    </dl>.<
4020: 2f 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 20 20  /blockquote>..  
4030: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
4040: 6c 73 3a 3a 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e  ls::connection">
4050: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 6f 6e  <strong>tls::con
4060: 6e 65 63 74 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e  nection</strong>
4070: 0a 20 20 20 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c  .    <em>channel
4080: 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20  </em></a></dt>. 
4090: 20 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74     <dd>Returns t
40a0: 68 65 20 63 75 72 72 65 6e 74 20 63 6f 6e 6e 65  he current conne
40b0: 63 74 69 6f 6e 20 73 74 61 74 75 73 20 6f 66 20  ction status of 
40c0: 61 6e 20 53 53 4c 20 63 68 61 6e 6e 65 6c 2e 20  an SSL channel. 
40d0: 54 68 65 0a 20 20 20 20 20 20 20 20 72 65 73 75  The.        resu
40e0: 6c 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20  lt is a list of 
40f0: 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20  key-value pairs 
4100: 64 65 73 63 72 69 62 69 6e 67 20 74 68 65 0a 20  describing the. 
4110: 20 20 20 20 20 20 20 63 6f 6e 6e 65 63 74 65 64         connected
4120: 20 70 65 65 72 2e 3c 2f 64 64 3e 0a 3c 62 6c 6f   peer.</dd>.<blo
4130: 63 6b 71 75 6f 74 65 3e 0a 09 3c 62 3e 53 53 4c  ckquote>..<b>SSL
4140: 20 53 74 61 74 75 73 3c 2f 62 3e 0a 20 20 20 20   Status</b>.    
4150: 3c 64 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74  <dl>.        <dt
4160: 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 74 65 3c 2f  ><strong>state</
4170: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 61 74  strong> <em>stat
4180: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  e</em></dt>.    
4190: 20 20 20 20 3c 64 64 3e 53 74 61 74 65 20 6f 66      <dd>State of
41a0: 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e   the connection.
41b0: 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dd>.        <d
41c0: 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 72 76 65 72  t><strong>server
41d0: 6e 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  name</strong> <e
41e0: 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  m>name</em></dt>
41f0: 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65  .        <dd>The
4200: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 6f 6e   name of the con
4210: 6e 65 63 74 65 64 20 74 6f 20 73 65 72 76 65 72  nected to server
4220: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  .</dd>.        <
4230: 64 74 3e 3c 73 74 72 6f 6e 67 3e 70 72 6f 74 6f  dt><strong>proto
4240: 63 6f 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  col</strong> <em
4250: 3e 76 65 72 73 69 6f 6e 3c 2f 65 6d 3e 3c 2f 64  >version</em></d
4260: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54  t>.        <dd>T
4270: 68 65 20 70 72 6f 74 6f 63 6f 6c 20 76 65 72 73  he protocol vers
4280: 69 6f 6e 20 75 73 65 64 20 66 6f 72 20 74 68 65  ion used for the
4290: 20 63 6f 6e 6e 65 63 74 69 6f 6e 3a 0a 09 20 20   connection:..  
42a0: 20 20 53 53 4c 32 2c 20 53 53 4c 33 2c 20 54 4c    SSL2, SSL3, TL
42b0: 53 31 2c 20 54 4c 53 31 2e 31 2c 20 54 4c 53 31  S1, TLS1.1, TLS1
42c0: 2e 32 2c 20 54 4c 53 31 2e 33 2c 20 6f 72 20 75  .2, TLS1.3, or u
42d0: 6e 6b 6e 6f 77 6e 2e 3c 2f 64 64 3e 0a 20 20 20  nknown.</dd>.   
42e0: 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67       <dt><strong
42f0: 3e 72 65 6e 65 67 6f 74 69 61 74 69 6f 6e 3c 2f  >renegotiation</
4300: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 61 74  strong> <em>stat
4310: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  e</em></dt>.    
4320: 20 20 20 20 3c 64 64 3e 57 68 65 74 68 65 72 20      <dd>Whether 
4330: 70 72 6f 74 6f 63 6f 6c 20 72 65 6e 65 67 6f 74  protocol renegot
4340: 69 61 74 69 6f 6e 20 69 73 20 73 75 70 70 6f 72  iation is suppor
4350: 74 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e  ted or not.</dd>
4360: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
4370: 72 6f 6e 67 3e 73 65 63 75 72 69 74 79 6c 65 76  rong>securitylev
4380: 65 6c 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  el</strong> <em>
4390: 6c 65 76 65 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  level</em></dt>.
43a0: 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68 65 20          <dd>The 
43b0: 73 65 63 75 72 69 74 79 20 6c 65 76 65 6c 20 75  security level u
43c0: 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74 69 6f  sed for selectio
43d0: 6e 20 6f 66 20 63 69 70 68 65 72 73 2c 20 6b 65  n of ciphers, ke
43e0: 79 20 73 69 7a 65 2c 20 65 74 63 2e 3c 2f 64 64  y size, etc.</dd
43f0: 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73  >.        <dt><s
4400: 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 5f 72 65  trong>session_re
4410: 75 73 65 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  used</strong> <e
4420: 6d 3e 62 6f 6f 6c 65 61 6e 3c 2f 65 6d 3e 3c 2f  m>boolean</em></
4430: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
4440: 57 68 65 74 68 65 72 20 74 68 65 20 73 65 73 73  Whether the sess
4450: 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 72 65 75  ion has been reu
4460: 73 65 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e  sed or not.</dd>
4470: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
4480: 72 6f 6e 67 3e 69 73 5f 73 65 72 76 65 72 3c 2f  rong>is_server</
4490: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c  strong> <em>bool
44a0: 65 61 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ean</em></dt>.  
44b0: 20 20 20 20 20 20 3c 64 64 3e 57 68 65 74 68 65        <dd>Whethe
44c0: 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e  r the connection
44d0: 20 63 6f 6e 66 69 67 75 72 65 64 20 61 73 20 61   configured as a
44e0: 20 73 65 72 76 65 72 20 6f 72 20 63 6c 69 65 6e   server or clien
44f0: 74 20 28 66 61 6c 73 65 29 2e 3c 2f 64 64 3e 0a  t (false).</dd>.
4500: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
4510: 6f 6e 67 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 3c  ong>compression<
4520: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64  /strong> <em>mod
4530: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  e</em></dt>.    
4540: 20 20 20 20 3c 64 64 3e 43 6f 6d 70 72 65 73 73      <dd>Compress
4550: 69 6f 6e 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e  ion method.</dd>
4560: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
4570: 72 6f 6e 67 3e 65 78 70 61 6e 73 69 6f 6e 3c 2f  rong>expansion</
4580: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6d 6f 64 65  strong> <em>mode
4590: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20  </em></dt>.     
45a0: 20 20 20 3c 64 64 3e 45 78 70 61 6e 73 69 6f 6e     <dd>Expansion
45b0: 20 6d 65 74 68 6f 64 2e 3c 2f 64 64 3e 0a 20 20   method.</dd>.  
45c0: 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71    </dl>.</blockq
45d0: 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71 75 6f 74  uote>.<blockquot
45e0: 65 3e 0a 09 3c 62 3e 43 69 70 68 65 72 20 49 6e  e>..<b>Cipher In
45f0: 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c 64 6c 3e 0a  fo</b>.    <dl>.
4600: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
4610: 6f 6e 67 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f  ong>cipher</stro
4620: 6e 67 3e 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f  ng> <em>cipher</
4630: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
4640: 20 3c 64 64 3e 54 68 65 20 63 75 72 72 65 6e 74   <dd>The current
4650: 20 63 69 70 68 65 72 20 69 6e 20 75 73 65 20 66   cipher in use f
4660: 6f 72 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f  or the connectio
4670: 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  n.</dd>.        
4680: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 74 61 6e  <dt><strong>stan
4690: 64 61 72 64 5f 6e 61 6d 65 3c 2f 73 74 72 6f 6e  dard_name</stron
46a0: 67 3e 20 3c 65 6d 3e 6e 61 6d 65 3c 2f 65 6d 3e  g> <em>name</em>
46b0: 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64  </dt>.        <d
46c0: 64 3e 54 68 65 20 73 74 61 6e 64 61 72 64 20 52  d>The standard R
46d0: 46 43 20 6e 61 6d 65 20 6f 66 20 63 69 70 68 65  FC name of ciphe
46e0: 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  r.</dd>.        
46f0: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 62 69 74 73  <dt><strong>bits
4700: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 6e 3c  </strong> <em>n<
4710: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20  /em></dt>.      
4720: 20 20 3c 64 64 3e 54 68 65 20 6e 75 6d 62 65 72    <dd>The number
4730: 20 6f 66 20 70 72 6f 63 65 73 73 65 64 20 62 69   of processed bi
4740: 74 73 20 75 73 65 64 20 66 6f 72 20 63 69 70 68  ts used for ciph
4750: 65 72 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20  er.</dd>.       
4760: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 63   <dt><strong>sec
4770: 72 65 74 5f 62 69 74 73 3c 2f 73 74 72 6f 6e 67  ret_bits</strong
4780: 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64 74  > <em>n</em></dt
4790: 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 54 68  >.        <dd>Th
47a0: 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 65 63 72  e number of secr
47b0: 65 74 20 62 69 74 73 20 75 73 65 64 20 66 6f 72  et bits used for
47c0: 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e 0a 20 20   cipher.</dd>.  
47d0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
47e0: 67 3e 6d 69 6e 5f 76 65 72 73 69 6f 6e 3c 2f 73  g>min_version</s
47f0: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 76 65 72 73 69  trong> <em>versi
4800: 6f 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  on</em></dt>.   
4810: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 6d 69 6e       <dd>The min
4820: 69 6d 75 6d 20 70 72 6f 74 6f 63 6f 6c 20 76 65  imum protocol ve
4830: 72 73 69 6f 6e 20 66 6f 72 20 63 69 70 68 65 72  rsion for cipher
4840: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  .</dd>.        <
4850: 64 74 3e 3c 73 74 72 6f 6e 67 3e 69 64 3c 2f 73  dt><strong>id</s
4860: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 69 64 3c 2f 65  trong> <em>id</e
4870: 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20 20  m></dt>.        
4880: 3c 64 64 3e 54 68 65 20 4f 70 65 6e 53 53 4c 20  <dd>The OpenSSL 
4890: 63 69 70 68 65 72 20 69 64 2e 3c 2f 64 64 3e 0a  cipher id.</dd>.
48a0: 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72          <dt><str
48b0: 6f 6e 67 3e 64 65 73 63 72 69 70 74 69 6f 6e 3c  ong>description<
48c0: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 74 72  /strong> <em>str
48d0: 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ing</em></dt>.  
48e0: 20 20 20 20 20 20 3c 64 64 3e 41 20 74 65 78 74        <dd>A text
48f0: 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 20   description of 
4900: 74 68 65 20 63 69 70 68 65 72 2e 3c 2f 64 64 3e  the cipher.</dd>
4910: 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f  .    </dl>.</blo
4920: 63 6b 71 75 6f 74 65 3e 0a 3c 62 6c 6f 63 6b 71  ckquote>.<blockq
4930: 75 6f 74 65 3e 0a 09 3c 62 3e 53 65 73 73 69 6f  uote>..<b>Sessio
4940: 6e 20 49 6e 66 6f 3c 2f 62 3e 0a 20 20 20 20 3c  n Info</b>.    <
4950: 64 6c 3e 0a 20 20 20 20 20 20 20 20 3c 64 74 3e  dl>.        <dt>
4960: 3c 73 74 72 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74  <strong>alpn</st
4970: 72 6f 6e 67 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63  rong> <em>protoc
4980: 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  ol</em></dt>.   
4990: 20 20 20 20 20 3c 64 64 3e 54 68 65 20 70 72 6f       <dd>The pro
49a0: 74 6f 63 6f 6c 20 73 65 6c 65 63 74 65 64 20 61  tocol selected a
49b0: 66 74 65 72 20 41 70 70 6c 69 63 61 74 69 6f 6e  fter Application
49c0: 2d 4c 61 79 65 72 20 50 72 6f 74 6f 63 6f 6c 0a  -Layer Protocol.
49d0: 09 20 20 20 20 4e 65 67 6f 74 69 61 74 69 6f 6e  .    Negotiation
49e0: 20 28 41 4c 50 4e 29 2e 3c 2f 64 64 3e 0a 20 20   (ALPN).</dd>.  
49f0: 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e        <dt><stron
4a00: 67 3e 72 65 73 75 6d 61 62 6c 65 3c 2f 73 74 72  g>resumable</str
4a10: 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 65 61 6e  ong> <em>boolean
4a20: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20  </em></dt>.     
4a30: 20 20 20 3c 64 64 3e 43 61 6e 20 74 68 65 20 73     <dd>Can the s
4a40: 65 73 73 69 6f 6e 20 62 65 20 72 65 73 75 6d 65  ession be resume
4a50: 64 20 6f 72 20 6e 6f 74 2e 3c 2f 64 64 3e 0a 20  d or not.</dd>. 
4a60: 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f         <dt><stro
4a70: 6e 67 3e 73 74 61 72 74 5f 74 69 6d 65 3c 2f 73  ng>start_time</s
4a80: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e  trong> <em>secon
4a90: 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  ds</em></dt>.   
4aa0: 20 20 20 20 20 3c 64 64 3e 54 69 6d 65 20 73 69       <dd>Time si
4ab0: 6e 63 65 20 73 65 73 73 69 6f 6e 20 73 74 61 72  nce session star
4ac0: 74 65 64 20 69 6e 20 73 65 63 6f 6e 64 73 20 73  ted in seconds s
4ad0: 69 6e 63 65 20 65 70 6f 63 68 2e 3c 2f 64 64 3e  ince epoch.</dd>
4ae0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
4af0: 72 6f 6e 67 3e 74 69 6d 65 6f 75 74 3c 2f 73 74  rong>timeout</st
4b00: 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e 64  rong> <em>second
4b10: 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20  s</em></dt>.    
4b20: 20 20 20 20 3c 64 64 3e 4d 61 78 20 64 75 72 61      <dd>Max dura
4b30: 74 69 6f 6e 20 6f 66 20 73 65 73 73 69 6f 6e 20  tion of session 
4b40: 69 6e 20 73 65 63 6f 6e 64 73 20 62 65 66 6f 72  in seconds befor
4b50: 65 20 74 69 6d 65 2d 6f 75 74 2e 3c 2f 64 64 3e  e time-out.</dd>
4b60: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
4b70: 72 6f 6e 67 3e 6c 69 66 65 74 69 6d 65 3c 2f 73  rong>lifetime</s
4b80: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 63 6f 6e  trong> <em>secon
4b90: 64 73 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20  ds</em></dt>.   
4ba0: 20 20 20 20 20 3c 64 64 3e 53 65 73 73 69 6f 6e       <dd>Session
4bb0: 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69 6d 65   ticket lifetime
4bc0: 20 68 69 6e 74 20 69 6e 20 73 65 63 6f 6e 64 73   hint in seconds
4bd0: 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20 3c  .</dd>.        <
4be0: 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73 69  dt><strong>sessi
4bf0: 6f 6e 5f 69 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c  on_id</strong> <
4c00: 65 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f  em>string</em></
4c10: 64 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e  dt>.        <dd>
4c20: 55 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 69  Unique session i
4c30: 64 20 66 6f 72 20 75 73 65 20 69 6e 20 72 65 73  d for use in res
4c40: 75 6d 69 6e 67 20 74 68 65 20 73 65 73 73 69 6f  uming the sessio
4c50: 6e 2e 3c 2f 64 64 3e 0a 20 20 20 20 20 20 20 20  n.</dd>.        
4c60: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 65 73 73  <dt><strong>sess
4c70: 69 6f 6e 5f 74 69 63 6b 65 74 3c 2f 73 74 72 6f  ion_ticket</stro
4c80: 6e 67 3e 20 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f  ng> <em>string</
4c90: 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 20 20 20  em></dt>.       
4ca0: 20 3c 64 64 3e 55 6e 69 71 75 65 20 73 65 73 73   <dd>Unique sess
4cb0: 69 6f 6e 20 74 69 63 6b 65 74 20 66 6f 72 20 75  ion ticket for u
4cc0: 73 65 20 69 6e 20 72 65 73 75 6d 69 6e 67 20 74  se in resuming t
4cd0: 68 65 20 73 65 73 73 69 6f 6e 2e 3c 2f 64 64 3e  he session.</dd>
4ce0: 0a 20 20 20 20 20 20 20 20 3c 64 74 3e 3c 73 74  .        <dt><st
4cf0: 72 6f 6e 67 3e 74 69 63 6b 65 74 5f 61 70 70 5f  rong>ticket_app_
4d00: 64 61 74 61 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65  data</strong> <e
4d10: 6d 3e 73 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64  m>string</em></d
4d20: 74 3e 0a 20 20 20 20 20 20 20 20 3c 64 64 3e 55  t>.        <dd>U
4d30: 6e 69 71 75 65 20 73 65 73 73 69 6f 6e 20 74 69  nique session ti
4d40: 63 6b 65 74 20 61 70 70 6c 69 63 61 74 69 6f 6e  cket application
4d50: 20 64 61 74 61 2e 3c 2f 64 64 3e 0a 20 20 20 20   data.</dd>.    
4d60: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
4d70: 6d 61 73 74 65 72 5f 6b 65 79 3c 2f 73 74 72 6f  master_key</stro
4d80: 6e 67 3e 20 3c 65 6d 3e 62 69 6e 61 72 79 5f 73  ng> <em>binary_s
4d90: 74 72 69 6e 67 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  tring</em></dt>.
4da0: 20 20 20 20 20 20 20 20 3c 64 64 3e 55 6e 69 71          <dd>Uniq
4db0: 75 65 20 73 65 73 73 69 6f 6e 20 6d 61 73 74 65  ue session maste
4dc0: 72 20 6b 65 79 2e 3c 2f 64 64 3e 0a 20 20 20 20  r key.</dd>.    
4dd0: 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e      <dt><strong>
4de0: 73 65 73 73 69 6f 6e 5f 63 61 63 68 65 5f 6d 6f  session_cache_mo
4df0: 64 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  de</strong> <em>
4e00: 6d 6f 64 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20  mode</em></dt>. 
4e10: 20 20 20 20 20 20 20 3c 64 64 3e 53 65 72 76 65         <dd>Serve
4e20: 72 20 63 61 63 68 65 20 6d 6f 64 65 20 28 63 6c  r cache mode (cl
4e30: 69 65 6e 74 2c 20 73 65 72 76 65 72 2c 20 6f 72  ient, server, or
4e40: 20 62 6f 74 68 29 2e 3c 2f 64 64 3e 0a 20 20 20   both).</dd>.   
4e50: 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75   </dl>.</blockqu
4e60: 6f 74 65 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 61  ote>..    <dt><a
4e70: 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 63 69 70 68   name="tls::ciph
4e80: 65 72 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73  ers"><strong>tls
4e90: 3a 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e  ::ciphers</stron
4ea0: 67 3e 0a 20 20 20 20 3c 65 6d 3e 70 72 6f 74 6f  g>.    <em>proto
4eb0: 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 20 3f 73  col ?verbose? ?s
4ec0: 75 70 70 6f 72 74 65 64 3f 3c 2f 65 6d 3e 3c 2f  upported?</em></
4ed0: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  a></dt>.    <dd>
4ee0: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f  Returns a list o
4ef0: 66 20 73 75 70 70 6f 72 74 65 64 20 63 69 70 68  f supported ciph
4f00: 65 72 73 20 61 76 61 69 6c 61 62 6c 65 20 66 6f  ers available fo
4f10: 72 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  r <em>protocol</
4f20: 65 6d 3e 2c 0a 20 20 20 20 20 20 20 20 77 68 65  em>,.        whe
4f30: 72 65 20 70 72 6f 74 6f 63 6f 6c 20 6d 75 73 74  re protocol must
4f40: 20 62 65 20 6f 6e 65 20 6f 66 20 3c 62 3e 73 73   be one of <b>ss
4f50: 6c 32 2c 20 73 73 6c 33 2c 20 74 6c 73 31 2c 20  l2, ssl3, tls1, 
4f60: 74 6c 73 31 2e 31 2c 0a 09 74 6c 73 31 2e 32 2c  tls1.1,..tls1.2,
4f70: 3c 2f 62 3e 20 6f 72 20 3c 62 3e 74 6c 73 31 2e  </b> or <b>tls1.
4f80: 33 3c 2f 62 3e 2e 20 49 66 20 3c 65 6d 3e 76 65  3</b>. If <em>ve
4f90: 72 62 6f 73 65 3c 2f 65 6d 3e 20 69 73 20 73 70  rbose</em> is sp
4fa0: 65 63 69 66 69 65 64 20 61 73 0a 09 74 72 75 65  ecified as..true
4fb0: 20 74 68 65 6e 20 61 20 76 65 72 62 6f 73 65 2c   then a verbose,
4fc0: 20 68 75 6d 61 6e 20 72 65 61 64 61 62 6c 65 20   human readable 
4fd0: 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e 65 64  list is returned
4fe0: 20 77 69 74 68 0a 09 61 64 64 69 74 69 6f 6e 61   with..additiona
4ff0: 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e  l information on
5000: 20 74 68 65 20 63 69 70 68 65 72 2e 20 49 66 20   the cipher. If 
5010: 3c 65 6d 3e 73 75 70 70 6f 72 74 65 64 3c 2f 65  <em>supported</e
5020: 6d 3e 0a 09 69 73 20 73 70 65 63 69 66 69 65 64  m>..is specified
5030: 20 61 73 20 74 72 75 65 2c 20 74 68 65 6e 20 6f   as true, then o
5040: 6e 6c 79 20 74 68 65 20 63 69 70 68 65 72 73 20  nly the ciphers 
5050: 73 75 70 70 6f 72 74 65 64 20 66 6f 72 20 70 72  supported for pr
5060: 6f 74 6f 63 6f 6c 0a 09 77 69 6c 6c 20 62 65 20  otocol..will be 
5070: 6c 69 73 74 65 64 2e 3c 2f 64 64 3e 0a 0a 20 20  listed.</dd>..  
5080: 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74    <dt><a name="t
5090: 6c 73 3a 3a 70 72 6f 74 6f 63 6f 6c 73 22 3e 3c  ls::protocols"><
50a0: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 72 6f 74  strong>tls::prot
50b0: 6f 63 6f 6c 73 3c 2f 73 74 72 6f 6e 67 3e 3c 2f  ocols</strong></
50c0: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  a></dt>.    <dd>
50d0: 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f  Returns a list o
50e0: 66 20 73 75 70 70 6f 72 74 65 64 20 70 72 6f 74  f supported prot
50f0: 6f 63 6f 6c 73 2e 20 56 61 6c 69 64 20 76 61 6c  ocols. Valid val
5100: 75 65 73 20 61 72 65 3a 0a 09 3c 62 3e 73 73 6c  ues are:..<b>ssl
5110: 32 3c 2f 62 3e 2c 20 3c 62 3e 73 73 6c 33 3c 2f  2</b>, <b>ssl3</
5120: 62 3e 2c 20 3c 62 3e 74 6c 73 31 3c 2f 62 3e 2c  b>, <b>tls1</b>,
5130: 20 3c 62 3e 74 6c 73 31 2e 31 3c 2f 62 3e 2c 20   <b>tls1.1</b>, 
5140: 3c 62 3e 74 6c 73 31 2e 32 3c 2f 62 3e 2c 0a 09  <b>tls1.2</b>,..
5150: 61 6e 64 20 3c 62 3e 74 6c 73 31 2e 33 3c 2f 62  and <b>tls1.3</b
5160: 3e 2e 20 45 78 61 63 74 20 6c 69 73 74 20 64 65  >. Exact list de
5170: 70 65 6e 64 73 20 6f 6e 20 4f 70 65 6e 53 53 4c  pends on OpenSSL
5180: 20 76 65 72 73 69 6f 6e 20 61 6e 64 0a 09 63 6f   version and..co
5190: 6d 70 69 6c 65 20 74 69 6d 65 20 66 6c 61 67 73  mpile time flags
51a0: 2e 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 64 74 3e  .</dd>..    <dt>
51b0: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 76 65  <a name="tls::ve
51c0: 72 73 69 6f 6e 22 3e 3c 73 74 72 6f 6e 67 3e 74  rsion"><strong>t
51d0: 6c 73 3a 3a 76 65 72 73 69 6f 6e 3c 2f 73 74 72  ls::version</str
51e0: 6f 6e 67 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20  ong></a></dt>.  
51f0: 20 20 3c 64 64 3e 52 65 74 75 72 6e 73 20 74 68    <dd>Returns th
5200: 65 20 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f  e OpenSSL versio
5210: 6e 20 73 74 72 69 6e 67 2e 3c 2f 64 64 3e 0a 3c  n string.</dd>.<
5220: 2f 64 6c 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d  /dl>..<h3><a nam
5230: 65 3d 22 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49  e="CALLBACK OPTI
5240: 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50  ONS">CALLBACK OP
5250: 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a  TIONS</a></h3>..
5260: 3c 70 3e 0a 41 73 20 69 6e 64 69 63 61 74 65 64  <p>.As indicated
5270: 20 61 62 6f 76 65 2c 20 69 6e 64 69 76 69 64 75   above, individu
5280: 61 6c 20 63 68 61 6e 6e 65 6c 73 20 63 61 6e 20  al channels can 
5290: 62 65 20 67 69 76 65 6e 20 74 68 65 69 72 20 6f  be given their o
52a0: 77 6e 20 63 61 6c 6c 62 61 63 6b 73 0a 74 6f 20  wn callbacks.to 
52b0: 68 61 6e 64 6c 65 20 69 6e 74 65 72 6d 65 64 69  handle intermedi
52c0: 61 74 65 20 70 72 6f 63 65 73 73 69 6e 67 20 62  ate processing b
52d0: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69  y the OpenSSL li
52e0: 62 72 61 72 79 2c 20 75 73 69 6e 67 20 74 68 65  brary, using the
52f0: 0a 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65  .<em>-command</e
5300: 6d 3e 20 61 6e 64 20 3c 65 6d 3e 2d 70 61 73 73  m> and <em>-pass
5310: 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e  word</em> option
5320: 73 20 70 61 73 73 65 64 20 74 6f 20 65 69 74 68  s passed to eith
5330: 65 72 20 6f 66 0a 3c 73 74 72 6f 6e 67 3e 74 6c  er of.<strong>tl
5340: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e  s::socket</stron
5350: 67 3e 20 6f 72 20 3c 73 74 72 6f 6e 67 3e 74 6c  g> or <strong>tl
5360: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e  s::import</stron
5370: 67 3e 2e 0a 3c 2f 70 3e 0a 0a 3c 62 6c 6f 63 6b  g>..</p>..<block
5380: 71 75 6f 74 65 3e 0a 3c 64 6c 3e 0a 0a 20 20 20  quote>.<dl>..   
5390: 20 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 6f   <dt><strong>-co
53a0: 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c  mmand</strong> <
53b0: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e  em>callback</em>
53c0: 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 0a 09  </dt>.    <dd>..
53d0: 49 6e 76 6f 6b 65 73 20 74 68 65 20 73 70 65 63  Invokes the spec
53e0: 69 66 69 65 64 20 3c 65 6d 3e 63 61 6c 6c 62 61  ified <em>callba
53f0: 63 6b 3c 2f 65 6d 3e 20 73 63 72 69 70 74 20 61  ck</em> script a
5400: 74 0a 09 73 65 76 65 72 61 6c 20 70 6f 69 6e 74  t..several point
5410: 73 20 64 75 72 69 6e 67 20 74 68 65 20 4f 70 65  s during the Ope
5420: 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 0a  nSSL handshake..
5430: 09 45 78 63 65 70 74 20 61 73 20 69 6e 64 69 63  .Except as indic
5440: 61 74 65 64 20 62 65 6c 6f 77 2c 20 76 61 6c 75  ated below, valu
5450: 65 73 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d  es returned from
5460: 20 74 68 65 0a 09 63 61 6c 6c 62 61 63 6b 20 61   the..callback a
5470: 72 65 20 69 67 6e 6f 72 65 64 2e 0a 09 41 72 67  re ignored...Arg
5480: 75 6d 65 6e 74 73 20 61 70 70 65 6e 64 65 64 20  uments appended 
5490: 74 6f 20 74 68 65 20 73 63 72 69 70 74 20 75 70  to the script up
54a0: 6f 6e 20 63 61 6c 6c 62 61 63 6b 20 74 61 6b 65  on callback take
54b0: 20 6f 6e 65 20 6f 66 20 74 68 65 0a 09 66 6f 6c   one of the..fol
54c0: 6c 6f 77 69 6e 67 20 66 6f 72 6d 73 3a 0a 0a 09  lowing forms:...
54d0: 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a 09 3c 64 6c  <br>..<br>...<dl
54e0: 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72  >...<dt>..  <str
54f0: 6f 6e 67 3e 61 6c 70 6e 3c 2f 73 74 72 6f 6e 67  ong>alpn</strong
5500: 3e 20 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f  > <em>protocol</
5510: 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e  em>..</dt>..<dd>
5520: 0a 09 20 20 46 6f 72 20 73 65 72 76 65 72 73 2c  ..  For servers,
5530: 20 74 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61   this form of ca
5540: 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65  llback is invoke
5550: 64 20 77 68 65 6e 20 74 68 65 20 63 6c 69 65 6e  d when the clien
5560: 74 20 41 4c 50 4e 0a 09 20 20 68 65 61 64 65 72  t ALPN..  header
5570: 20 69 73 20 72 65 63 65 69 76 65 64 20 61 6e 64   is received and
5580: 20 74 68 65 20 66 69 72 73 74 20 3c 62 3e 2d 61   the first <b>-a
5590: 6c 70 6e 3c 2f 62 3e 20 73 70 65 63 69 66 69 65  lpn</b> specifie
55a0: 64 20 70 72 6f 74 6f 63 6f 6c 20 63 6f 6d 6d 6f  d protocol commo
55b0: 6e 0a 09 20 20 74 6f 20 74 68 65 20 62 6f 74 68  n..  to the both
55c0: 20 74 68 65 20 63 6c 69 65 6e 74 20 61 6e 64 20   the client and 
55d0: 73 65 72 76 65 72 20 69 73 20 73 65 6c 65 63 74  server is select
55e0: 65 64 2e 20 49 66 20 6e 6f 6e 65 2c 20 74 68 65  ed. If none, the
55f0: 20 66 69 72 73 74 0a 09 20 20 63 6c 69 65 6e 74   first..  client
5600: 20 73 70 65 63 69 66 69 65 64 20 70 72 6f 74 6f   specified proto
5610: 63 6f 6c 20 69 73 20 75 73 65 64 2e 0a 09 3c 2f  col is used...</
5620: 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 3c 21 2d 2d  dd>...<br>..<!--
5630: 09 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61  .This form of ca
5640: 6c 6c 62 61 63 6b 20 69 73 20 64 69 73 61 62 6c  llback is disabl
5650: 65 64 2e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73  ed....<dt>..  <s
5660: 74 72 6f 6e 67 3e 65 72 72 6f 72 3c 2f 73 74 72  trong>error</str
5670: 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c  ong> <em>channel
5680: 20 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 0a 09 3c   message</em>..<
5690: 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68  /dt>..<dd>..  Th
56a0: 65 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65  e <em>message</e
56b0: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 63 6f 6e 74  m> argument cont
56c0: 61 69 6e 73 20 61 6e 20 65 72 72 6f 72 20 6d 65  ains an error me
56d0: 73 73 61 67 65 20 67 65 6e 65 72 61 74 65 64 0a  ssage generated.
56e0: 09 20 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  .  by the OpenSS
56f0: 4c 20 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63  L function..  <c
5700: 6f 64 65 3e 45 52 52 5f 72 65 61 73 6f 6e 5f 65  ode>ERR_reason_e
5710: 72 72 6f 72 5f 73 74 72 69 6e 67 28 29 3c 2f 63  rror_string()</c
5720: 6f 64 65 3e 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c  ode>...</dd>...<
5730: 62 72 3e 0a 2d 2d 3e 0a 0a 09 3c 64 74 3e 0a 09  br>.-->...<dt>..
5740: 20 20 3c 73 74 72 6f 6e 67 3e 68 65 6c 6c 6f 3c    <strong>hello<
5750: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 72  /strong> <em>ser
5760: 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f  vername</em>..</
5770: 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 46 6f 72  dt>..<dd>..  For
5780: 20 73 65 72 76 65 72 73 2c 20 74 68 69 73 20 66   servers, this f
5790: 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20  orm of callback 
57a0: 69 73 20 69 6e 76 6f 6b 65 64 20 64 75 72 69 6e  is invoked durin
57b0: 67 20 63 6c 69 65 6e 74 20 68 65 6c 6c 6f 0a 09  g client hello..
57c0: 20 20 6d 65 73 73 61 67 65 20 70 72 6f 63 65 73    message proces
57d0: 73 69 6e 67 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c  sing...</dd>...<
57e0: 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73  br>...<dt>..  <s
57f0: 74 72 6f 6e 67 3e 69 6e 66 6f 3c 2f 73 74 72 6f  trong>info</stro
5800: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20  ng> <em>channel 
5810: 6d 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73 73  major minor mess
5820: 61 67 65 20 74 79 70 65 3c 2f 65 6d 3e 0a 09 3c  age type</em>..<
5830: 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68  /dt>..<dd>..  Th
5840: 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62  is form of callb
5850: 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62  ack is invoked b
5860: 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75  y the OpenSSL fu
5870: 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e  nction..  <code>
5880: 53 53 4c 5f 43 54 58 5f 73 65 74 5f 69 6e 66 6f  SSL_CTX_set_info
5890: 5f 63 61 6c 6c 62 61 63 6b 28 29 3c 2f 63 6f 64  _callback()</cod
58a0: 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54  e>...  <br>..  T
58b0: 68 65 20 3c 65 6d 3e 6d 61 6a 6f 72 3c 2f 65 6d  he <em>major</em
58c0: 3e 20 61 6e 64 20 3c 65 6d 3e 6d 69 6e 6f 72 3c  > and <em>minor<
58d0: 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74 73 20 61  /em> arguments a
58e0: 72 65 20 75 73 65 64 20 74 6f 0a 09 20 20 72 65  re used to..  re
58f0: 70 72 65 73 65 6e 74 20 74 68 65 20 73 74 61 74  present the stat
5900: 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 62 69  e information bi
5910: 74 6d 61 73 6b 2e 0a 09 20 20 3c 64 6c 3e 0a 09  tmask...  <dl>..
5920: 20 20 3c 64 74 3e 50 6f 73 73 69 62 6c 65 20 76    <dt>Possible v
5930: 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 61  alues for <em>ma
5940: 6a 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 3c 2f 64  jor</em> are:</d
5950: 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 6f 64 65 3e  t>..  <dd><code>
5960: 68 61 6e 64 73 68 61 6b 65 2c 20 61 6c 65 72 74  handshake, alert
5970: 2c 20 63 6f 6e 6e 65 63 74 2c 20 61 63 63 65 70  , connect, accep
5980: 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 64 3e 0a 09  t</code>.</dd>..
5990: 20 20 3c 64 74 3e 50 6f 73 73 69 62 6c 65 20 76    <dt>Possible v
59a0: 61 6c 75 65 73 20 66 6f 72 20 3c 65 6d 3e 6d 69  alues for <em>mi
59b0: 6e 6f 72 3c 2f 65 6d 3e 20 61 72 65 3a 3c 2f 64  nor</em> are:</d
59c0: 74 3e 0a 09 20 20 3c 64 64 3e 3c 63 6f 64 65 3e  t>..  <dd><code>
59d0: 73 74 61 72 74 2c 20 64 6f 6e 65 2c 20 72 65 61  start, done, rea
59e0: 64 2c 20 77 72 69 74 65 2c 20 6c 6f 6f 70 2c 20  d, write, loop, 
59f0: 65 78 69 74 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 64  exit</code>.</dd
5a00: 3e 0a 09 20 20 3c 2f 64 6c 3e 0a 09 20 20 54 68  >..  </dl>..  Th
5a10: 65 20 3c 65 6d 3e 6d 65 73 73 61 67 65 3c 2f 65  e <em>message</e
5a20: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61  m> argument is a
5a30: 20 64 65 73 63 72 69 70 74 69 76 65 20 73 74 72   descriptive str
5a40: 69 6e 67 20 77 68 69 63 68 20 6d 61 79 0a 09 20  ing which may.. 
5a50: 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 65 69   be generated ei
5a60: 74 68 65 72 20 62 79 0a 09 20 20 3c 63 6f 64 65  ther by..  <code
5a70: 3e 53 53 4c 5f 73 74 61 74 65 5f 73 74 72 69 6e  >SSL_state_strin
5a80: 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e 20  g_long()</code> 
5a90: 6f 72 20 62 79 0a 09 20 20 3c 63 6f 64 65 3e 53  or by..  <code>S
5aa0: 53 4c 5f 61 6c 65 72 74 5f 64 65 73 63 5f 73 74  SL_alert_desc_st
5ab0: 72 69 6e 67 5f 6c 6f 6e 67 28 29 3c 2f 63 6f 64  ring_long()</cod
5ac0: 65 3e 2c 0a 09 20 20 64 65 70 65 6e 64 69 6e 67  e>,..  depending
5ad0: 20 6f 6e 20 63 6f 6e 74 65 78 74 2e 0a 09 20 20   on context...  
5ae0: 3c 64 74 3e 46 6f 72 20 61 6c 65 72 74 73 2c 20  <dt>For alerts, 
5af0: 74 68 65 20 70 6f 73 73 69 62 6c 65 20 76 61 6c  the possible val
5b00: 75 65 73 20 66 6f 72 20 3c 65 6d 3e 74 79 70 65  ues for <em>type
5b10: 3c 2f 65 6d 3e 20 61 72 65 3a 3c 2f 64 74 3e 0a  </em> are:</dt>.
5b20: 09 20 20 3c 64 6c 3e 0a 09 20 20 3c 64 64 3e 3c  .  <dl>..  <dd><
5b30: 63 6f 64 65 3e 77 61 72 6e 69 6e 67 2c 20 66 61  code>warning, fa
5b40: 74 61 6c 2c 20 61 6e 64 20 75 6e 6b 6e 6f 77 6e  tal, and unknown
5b50: 3c 2f 63 6f 64 65 3e 2e 3c 2f 64 64 3e 0a 09 20  </code>.</dd>.. 
5b60: 20 3c 2f 64 6c 3e 0a 09 3c 2f 64 64 3e 0a 0a 09   </dl>..</dd>...
5b70: 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c  <br>...<dt>..  <
5b80: 73 74 72 6f 6e 67 3e 73 65 73 73 69 6f 6e 3c 2f  strong>session</
5b90: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 73 65 73 73  strong> <em>sess
5ba0: 69 6f 6e 5f 69 64 20 74 69 63 6b 65 74 20 6c 69  ion_id ticket li
5bb0: 66 65 74 69 6d 65 3c 2f 65 6d 3e 0a 09 3c 2f 64  fetime</em>..</d
5bc0: 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69 73  t>..<dd>..  This
5bd0: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63   form of callbac
5be0: 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79 20  k is invoked by 
5bf0: 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e 63  the OpenSSL func
5c00: 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 53 53  tion..  <code>SS
5c10: 4c 5f 43 54 58 5f 73 65 73 73 5f 73 65 74 5f 6e  L_CTX_sess_set_n
5c20: 65 77 5f 63 62 28 29 3c 2f 63 6f 64 65 3e 2e 0a  ew_cb()</code>..
5c30: 09 20 20 57 68 65 72 65 20 3c 65 6d 3e 73 65 73  .  Where <em>ses
5c40: 73 69 6f 6e 5f 69 64 3c 2f 65 6d 3e 20 69 73 20  sion_id</em> is 
5c50: 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 73 73  the current sess
5c60: 69 6f 6e 20 69 64 65 6e 74 69 66 69 65 72 2c 0a  ion identifier,.
5c70: 09 20 20 3c 65 6d 3e 74 69 63 6b 65 74 3c 2f 65  .  <em>ticket</e
5c80: 6d 3e 20 69 73 20 74 68 65 20 73 65 73 73 69 6f  m> is the sessio
5c90: 6e 20 74 69 63 6b 65 74 20 69 6e 66 6f 2c 20 61  n ticket info, a
5ca0: 6e 64 20 3c 65 6d 3e 6c 69 66 65 74 69 6d 65 3c  nd <em>lifetime<
5cb0: 2f 65 6d 3e 0a 09 20 20 69 73 20 74 68 65 20 74  /em>..  is the t
5cc0: 68 65 20 74 69 63 6b 65 74 20 6c 69 66 65 74 69  he ticket lifeti
5cd0: 6d 65 20 69 6e 20 73 65 63 6f 6e 64 73 2e 0a 09  me in seconds...
5ce0: 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 0a 09 3c  </dd>...<br>...<
5cf0: 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67 3e 73  dt>..  <strong>s
5d00: 6e 69 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  ni</strong> <em>
5d10: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 65 6d 3e 0a  servername</em>.
5d20: 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20  .</dt>..<dd>..  
5d30: 46 6f 72 20 73 65 72 76 65 72 73 2c 20 74 68 69  For servers, thi
5d40: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
5d50: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 77 68  ck is invoked wh
5d60: 65 6e 20 74 68 65 20 53 4e 49 20 68 65 61 64 65  en the SNI heade
5d70: 72 0a 09 20 20 66 72 6f 6d 20 74 68 65 20 63 6c  r..  from the cl
5d80: 69 65 6e 74 20 69 73 20 72 65 63 65 69 76 65 64  ient is received
5d90: 2e 20 57 68 65 72 65 20 3c 69 3e 73 65 72 76 65  . Where <i>serve
5da0: 72 6e 61 6d 65 3c 2f 69 3e 20 69 73 20 74 68 65  rname</i> is the
5db0: 20 63 6c 69 65 6e 74 0a 09 20 20 73 70 65 63 69   client..  speci
5dc0: 66 69 65 64 20 73 65 72 76 65 72 6e 61 6d 65 2e  fied servername.
5dd0: 20 54 68 69 73 20 69 73 20 75 73 65 64 20 77 68   This is used wh
5de0: 65 6e 20 61 20 73 65 72 76 65 72 20 73 75 70 70  en a server supp
5df0: 6f 72 74 73 20 6d 75 6c 74 69 70 6c 65 0a 09 20  orts multiple.. 
5e00: 20 6e 61 6d 65 73 2c 20 73 6f 20 74 68 65 20 72   names, so the r
5e10: 69 67 68 74 20 63 65 72 74 69 66 69 63 61 74 65  ight certificate
5e20: 20 63 61 6e 20 62 65 20 75 73 65 64 2e 0a 09 3c   can be used...<
5e30: 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72  /dd>...<br>..<br
5e40: 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72  >...<dt>..  <str
5e50: 6f 6e 67 3e 76 65 72 69 66 79 3c 2f 73 74 72 6f  ong>verify</stro
5e60: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20  ng> <em>channel 
5e70: 64 65 70 74 68 20 63 65 72 74 20 73 74 61 74 75  depth cert statu
5e80: 73 20 65 72 72 6f 72 3c 2f 65 6d 3e 0a 09 3c 2f  s error</em>..</
5e90: 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20 54 68 69  dt>..<dd>..  Thi
5ea0: 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61  s form of callba
5eb0: 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 62 79  ck is invoked by
5ec0: 20 4f 70 65 6e 53 53 4c 20 77 68 65 6e 20 61 20   OpenSSL when a 
5ed0: 6e 65 77 20 63 65 72 74 69 66 69 63 61 74 65 0a  new certificate.
5ee0: 09 20 20 69 73 20 72 65 63 65 69 76 65 64 20 66  .  is received f
5ef0: 72 6f 6d 20 74 68 65 20 70 65 65 72 2e 20 49 74  rom the peer. It
5f00: 20 61 6c 6c 6f 77 73 20 74 68 65 20 63 6c 69 65   allows the clie
5f10: 6e 74 20 74 6f 20 63 68 65 63 6b 20 74 68 65 0a  nt to check the.
5f20: 09 20 20 63 65 72 74 69 66 69 63 61 74 65 20 76  .  certificate v
5f30: 65 72 69 66 69 63 61 74 69 6f 6e 20 72 65 73 75  erification resu
5f40: 6c 74 20 61 6e 64 20 63 68 6f 6f 73 65 20 77 68  lt and choose wh
5f50: 65 74 68 65 72 20 74 6f 20 63 6f 6e 74 69 6e 75  ether to continu
5f60: 65 20 6f 72 20 6e 6f 74 2e 0a 09 20 20 3c 62 72  e or not...  <br
5f70: 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 64 65 70  >..  The <em>dep
5f80: 74 68 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e 74  th</em> argument
5f90: 20 69 73 20 61 6e 20 69 6e 74 65 67 65 72 20 72   is an integer r
5fa0: 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68 65 0a  epresenting the.
5fb0: 09 20 20 63 75 72 72 65 6e 74 20 64 65 70 74 68  .  current depth
5fc0: 20 6f 6e 20 74 68 65 20 63 65 72 74 69 66 69 63   on the certific
5fd0: 61 74 65 20 63 68 61 69 6e 2c 20 77 69 74 68 0a  ate chain, with.
5fe0: 09 20 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64 65  .  <code>0</code
5ff0: 3e 20 61 73 20 74 68 65 20 73 75 62 6a 65 63 74  > as the subject
6000: 20 63 65 72 74 69 66 69 63 61 74 65 20 61 6e 64   certificate and
6010: 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 0a 09   higher values..
6020: 20 20 64 65 6e 6f 74 69 6e 67 20 70 72 6f 67 72    denoting progr
6030: 65 73 73 69 76 65 6c 79 20 6d 6f 72 65 20 69 6e  essively more in
6040: 64 69 72 65 63 74 20 69 73 73 75 65 72 20 63 65  direct issuer ce
6050: 72 74 69 66 69 63 61 74 65 73 2e 0a 09 20 20 3c  rtificates...  <
6060: 62 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 63  br>..  The <em>c
6070: 65 72 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e  ert</em> argumen
6080: 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20 6b  t is a list of k
6090: 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20 73  ey-value pairs s
60a0: 69 6d 69 6c 61 72 0a 09 20 20 74 6f 20 74 68 6f  imilar..  to tho
60b0: 73 65 20 72 65 74 75 72 6e 65 64 20 62 79 0a 09  se returned by..
60c0: 20 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73 3a    <a href="#tls:
60d0: 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67  :status"><strong
60e0: 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74  >tls::status</st
60f0: 72 6f 6e 67 3e 3c 2f 61 3e 2e 0a 09 20 20 3c 62  rong></a>...  <b
6100: 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 73 74  r>..  The <em>st
6110: 61 74 75 73 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  atus</em> argume
6120: 6e 74 20 69 73 20 61 6e 20 69 6e 74 65 67 65 72  nt is an integer
6130: 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68   representing th
6140: 65 0a 09 20 20 63 75 72 72 65 6e 74 20 76 61 6c  e..  current val
6150: 69 64 69 74 79 20 6f 66 20 74 68 65 20 63 65 72  idity of the cer
6160: 74 69 66 69 63 61 74 65 2e 0a 09 20 20 41 20 76  tificate...  A v
6170: 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e 30 3c  alue of <code>0<
6180: 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 68 65  /code> means the
6190: 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73 20   certificate is 
61a0: 64 65 65 6d 65 64 20 69 6e 76 61 6c 69 64 2e 0a  deemed invalid..
61b0: 09 20 20 41 20 76 61 6c 75 65 20 6f 66 20 3c 63  .  A value of <c
61c0: 6f 64 65 3e 31 3c 2f 63 6f 64 65 3e 20 6d 65 61  ode>1</code> mea
61d0: 6e 73 20 74 68 65 20 63 65 72 74 69 66 69 63 61  ns the certifica
61e0: 74 65 20 69 73 20 64 65 65 6d 65 64 20 76 61 6c  te is deemed val
61f0: 69 64 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 54  id...  <br>..  T
6200: 68 65 20 3c 65 6d 3e 65 72 72 6f 72 3c 2f 65 6d  he <em>error</em
6210: 3e 20 61 72 67 75 6d 65 6e 74 20 73 75 70 70 6c  > argument suppl
6220: 69 65 73 20 74 68 65 20 6d 65 73 73 61 67 65 2c  ies the message,
6230: 20 69 66 20 61 6e 79 2c 20 67 65 6e 65 72 61 74   if any, generat
6240: 65 64 0a 09 20 20 62 79 20 3c 63 6f 64 65 3e 58  ed..  by <code>X
6250: 35 30 39 5f 53 54 4f 52 45 5f 43 54 58 5f 67 65  509_STORE_CTX_ge
6260: 74 5f 65 72 72 6f 72 28 29 3c 2f 63 6f 64 65 3e  t_error()</code>
6270: 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20 3c 62 72  ...  <br>..  <br
6280: 3e 0a 09 20 20 54 68 65 20 63 61 6c 6c 62 61 63  >..  The callbac
6290: 6b 20 6d 61 79 20 6f 76 65 72 72 69 64 65 20 6e  k may override n
62a0: 6f 72 6d 61 6c 20 76 61 6c 69 64 61 74 69 6f 6e  ormal validation
62b0: 20 70 72 6f 63 65 73 73 69 6e 67 20 62 79 20 65   processing by e
62c0: 78 70 6c 69 63 69 74 6c 79 0a 09 20 20 72 65 74  xplicitly..  ret
62d0: 75 72 6e 69 6e 67 20 6f 6e 65 20 6f 66 20 74 68  urning one of th
62e0: 65 20 61 62 6f 76 65 20 3c 65 6d 3e 73 74 61 74  e above <em>stat
62f0: 75 73 3c 2f 65 6d 3e 20 76 61 6c 75 65 73 2e 0a  us</em> values..
6300: 09 3c 2f 64 64 3e 0a 0a 09 3c 2f 64 6c 3e 0a 20  .</dd>...</dl>. 
6310: 20 20 20 3c 2f 64 64 3e 0a 0a 20 20 20 20 3c 62     </dd>..    <b
6320: 72 3e 0a 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72  r>..    <dt><str
6330: 6f 6e 67 3e 2d 70 61 73 73 77 6f 72 64 3c 2f 73  ong>-password</s
6340: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62  trong> <em>callb
6350: 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20  ack</em></dt>.  
6360: 20 20 3c 64 64 3e 0a 09 49 6e 76 6f 6b 65 73 20    <dd>..Invokes 
6370: 74 68 65 20 73 70 65 63 69 66 69 65 64 20 3c 65  the specified <e
6380: 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20  m>callback</em> 
6390: 73 63 72 69 70 74 20 77 68 65 6e 20 4f 70 65 6e  script when Open
63a0: 53 53 4c 20 6e 65 65 64 73 20 74 6f 0a 09 6f 62  SSL needs to..ob
63b0: 74 61 69 6e 20 61 20 70 61 73 73 77 6f 72 64 2e  tain a password.
63c0: 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 73    The callback s
63d0: 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61 20 73  hould return a s
63e0: 74 72 69 6e 67 20 77 68 69 63 68 0a 09 72 65 70  tring which..rep
63f0: 72 65 73 65 6e 74 73 20 74 68 65 20 70 61 73 73  resents the pass
6400: 77 6f 72 64 20 74 6f 20 62 65 20 75 73 65 64 2e  word to be used.
6410: 0a 09 4e 6f 20 61 72 67 75 6d 65 6e 74 73 20 61  ..No arguments a
6420: 72 65 20 61 70 70 65 6e 64 65 64 20 74 6f 20 74  re appended to t
6430: 68 65 20 73 63 72 69 70 74 20 75 70 6f 6e 20 63  he script upon c
6440: 61 6c 6c 62 61 63 6b 2e 0a 20 20 20 20 3c 2f 64  allback..    </d
6450: 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b  d>.</dl>.</block
6460: 71 75 6f 74 65 3e 0a 0a 3c 70 3e 0a 52 65 66 65  quote>..<p>.Refe
6470: 72 65 6e 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61  rence implementa
6480: 74 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 63  tions of these c
6490: 61 6c 6c 62 61 63 6b 73 20 61 72 65 20 70 72 6f  allbacks are pro
64a0: 76 69 64 65 64 20 69 6e 20 74 68 65 0a 64 69 73  vided in the.dis
64b0: 74 72 69 62 75 74 69 6f 6e 20 61 73 20 3c 73 74  tribution as <st
64c0: 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61  rong>tls::callba
64d0: 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 61 6e 64 0a  ck</strong> and.
64e0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73  <strong>tls::pas
64f0: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 72  sword</strong> r
6500: 65 73 70 65 63 74 69 76 65 6c 79 2e 20 20 4e 6f  espectively.  No
6510: 74 65 20 74 68 61 74 20 74 68 65 73 65 20 61 72  te that these ar
6520: 65 0a 3c 65 6d 3e 73 61 6d 70 6c 65 3c 2f 65 6d  e.<em>sample</em
6530: 3e 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e  > implementation
6540: 73 20 6f 6e 6c 79 2e 20 20 49 6e 20 61 20 6d 6f  s only.  In a mo
6550: 72 65 20 72 65 61 6c 69 73 74 69 63 20 64 65 70  re realistic dep
6560: 6c 6f 79 6d 65 6e 74 0a 79 6f 75 20 77 6f 75 6c  loyment.you woul
6570: 64 20 73 70 65 63 69 66 79 20 79 6f 75 72 20 6f  d specify your o
6580: 77 6e 20 63 61 6c 6c 62 61 63 6b 20 73 63 72 69  wn callback scri
6590: 70 74 73 20 6f 6e 20 65 61 63 68 20 54 4c 53 20  pts on each TLS 
65a0: 63 68 61 6e 6e 65 6c 0a 75 73 69 6e 67 20 74 68  channel.using th
65b0: 65 20 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f  e <em>-command</
65c0: 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e 2d 70 61 73  em> and <em>-pas
65d0: 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f  sword</em> optio
65e0: 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 54 68  ns..</p>..<p>.Th
65f0: 65 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69  e default behavi
6600: 6f 72 20 77 68 65 6e 20 74 68 65 20 3c 65 6d 3e  or when the <em>
6610: 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d 3e 20 6f 70  -command</em> op
6620: 74 69 6f 6e 20 69 73 20 6e 6f 74 20 73 70 65 63  tion is not spec
6630: 69 66 69 65 64 20 69 73 20 66 6f 72 0a 54 4c 53  ified is for.TLS
6640: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20   to process the 
6650: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61  associated libra
6660: 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 69 6e 74  ry callbacks int
6670: 65 72 6e 61 6c 6c 79 2e 0a 54 68 65 20 64 65 66  ernally..The def
6680: 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 77 68  ault behavior wh
6690: 65 6e 20 74 68 65 20 3c 65 6d 3e 2d 70 61 73 73  en the <em>-pass
66a0: 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70 74 69 6f 6e  word</em> option
66b0: 20 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65   is not specifie
66c0: 64 20 69 73 20 66 6f 72 0a 54 4c 53 20 74 6f 20  d is for.TLS to 
66d0: 70 72 6f 63 65 73 73 20 74 68 65 20 61 73 73 6f  process the asso
66e0: 63 69 61 74 65 64 20 6c 69 62 72 61 72 79 20 63  ciated library c
66f0: 61 6c 6c 62 61 63 6b 73 20 62 79 20 61 74 74 65  allbacks by atte
6700: 6d 70 74 69 6e 67 20 74 6f 20 63 61 6c 6c 0a 3c  mpting to call.<
6710: 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73  strong>tls::pass
6720: 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 2e 0a 54  word</strong>..T
6730: 68 65 20 64 69 66 66 65 72 65 6e 63 65 20 62 65  he difference be
6740: 74 77 65 65 6e 20 74 68 65 73 65 20 74 77 6f 20  tween these two 
6750: 62 65 68 61 76 69 6f 72 73 20 69 73 20 61 20 63  behaviors is a c
6760: 6f 6e 73 65 71 75 65 6e 63 65 20 6f 66 20 6d 61  onsequence of ma
6770: 69 6e 74 61 69 6e 69 6e 67 0a 63 6f 6d 70 61 74  intaining.compat
6780: 69 62 69 6c 69 74 79 20 77 69 74 68 20 65 61 72  ibility with ear
6790: 6c 69 65 72 20 69 6d 70 6c 65 6d 65 6e 74 61 74  lier implementat
67a0: 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a  ions..</p>..<p>.
67b0: 54 68 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  The <strong>tls:
67c0: 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20  :debug</strong> 
67d0: 76 61 72 69 61 62 6c 65 20 70 72 6f 76 69 64 65  variable provide
67e0: 73 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61  s some additiona
67f0: 6c 0a 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74  l.control over t
6800: 68 65 73 65 20 72 65 66 65 72 65 6e 63 65 20 63  hese reference c
6810: 61 6c 6c 62 61 63 6b 73 2e 20 20 49 74 73 20 76  allbacks.  Its v
6820: 61 6c 75 65 20 69 73 20 7a 65 72 6f 20 62 79 20  alue is zero by 
6830: 64 65 66 61 75 6c 74 2e 0a 48 69 67 68 65 72 20  default..Higher 
6840: 76 61 6c 75 65 73 20 70 72 6f 64 75 63 65 20 6d  values produce m
6850: 6f 72 65 20 64 69 61 67 6e 6f 73 74 69 63 20 6f  ore diagnostic o
6860: 75 74 70 75 74 2c 20 61 6e 64 20 77 69 6c 6c 20  utput, and will 
6870: 61 6c 73 6f 20 66 6f 72 63 65 20 74 68 65 0a 76  also force the.v
6880: 65 72 69 66 79 20 6d 65 74 68 6f 64 20 69 6e 20  erify method in 
6890: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61 6c  <strong>tls::cal
68a0: 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20 74  lback</strong> t
68b0: 6f 20 61 63 63 65 70 74 20 74 68 65 0a 63 65 72  o accept the.cer
68c0: 74 69 66 69 63 61 74 65 2c 20 65 76 65 6e 20 77  tificate, even w
68d0: 68 65 6e 20 69 74 20 69 73 20 69 6e 76 61 6c 69  hen it is invali
68e0: 64 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d  d..</p>..<p>.<em
68f0: 3e 0a 54 68 65 20 75 73 65 20 6f 66 20 74 68 65  >.The use of the
6900: 20 72 65 66 65 72 65 6e 63 65 20 63 61 6c 6c 62   reference callb
6910: 61 63 6b 73 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  acks <strong>tls
6920: 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f  ::callback</stro
6930: 6e 67 3e 20 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e  ng> and.<strong>
6940: 74 6c 73 3a 3a 70 61 73 73 77 6f 72 64 3c 2f 73  tls::password</s
6950: 74 72 6f 6e 67 3e 20 69 73 20 6e 6f 74 20 72 65  trong> is not re
6960: 63 6f 6d 6d 65 6e 64 65 64 2e 20 20 54 68 65 79  commended.  They
6970: 20 6d 61 79 20 62 65 20 72 65 6d 6f 76 65 64 0a   may be removed.
6980: 66 72 6f 6d 20 66 75 74 75 72 65 20 72 65 6c 65  from future rele
6990: 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a 3c 2f 70 3e  ases..</em>.</p>
69a0: 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54 68 65 20 75  ..<p>.<em>.The u
69b0: 73 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62  se of the variab
69c0: 6c 65 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  le <strong>tls::
69d0: 64 65 62 75 67 3c 2f 73 74 72 6f 6e 67 3e 20 69  debug</strong> i
69e0: 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65  s not recommende
69f0: 64 2e 0a 49 74 20 6d 61 79 20 62 65 20 72 65 6d  d..It may be rem
6a00: 6f 76 65 64 20 66 72 6f 6d 20 66 75 74 75 72 65  oved from future
6a10: 20 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e   releases..</em>
6a20: 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61  .</p>..<h3><a na
6a30: 6d 65 3d 22 44 45 42 55 47 22 3e 44 45 42 55 47  me="DEBUG">DEBUG
6a40: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 54 4c 53 20 6b  </a></h3>..TLS k
6a50: 65 79 20 6c 6f 67 67 69 6e 67 20 63 61 6e 20 62  ey logging can b
6a60: 65 20 65 6e 61 62 6c 65 64 20 62 79 20 73 65 74  e enabled by set
6a70: 74 69 6e 67 20 74 68 65 20 65 6e 76 69 72 6f 6e  ting the environ
6a80: 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 0a 3c 62  ment variable.<b
6a90: 3e 53 53 4c 4b 45 59 4c 4f 47 46 49 4c 45 3c 2f  >SSLKEYLOGFILE</
6aa0: 62 3e 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f  b> to the name o
6ab0: 66 20 74 68 65 20 66 69 6c 65 20 74 6f 20 6c 6f  f the file to lo
6ac0: 67 20 74 6f 2e 20 54 68 65 6e 20 77 68 65 6e 65  g to. Then whene
6ad0: 76 65 72 20 54 4c 53 0a 6b 65 79 20 6d 61 74 65  ver TLS.key mate
6ae0: 72 69 61 6c 20 69 73 20 67 65 6e 65 72 61 74 65  rial is generate
6af0: 64 20 6f 72 20 72 65 63 65 69 76 65 64 20 69 74  d or received it
6b00: 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20   will be logged 
6b10: 74 6f 20 74 68 65 20 66 69 6c 65 2e 0a 0a 3c 68  to the file...<h
6b20: 33 3e 3c 61 20 6e 61 6d 65 3d 22 48 54 54 50 53  3><a name="HTTPS
6b30: 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53 20   EXAMPLE">HTTPS 
6b40: 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 68 33 3e  EXAMPLE</a></h3>
6b50: 0a 0a 3c 70 3e 54 68 69 73 20 65 78 61 6d 70 6c  ..<p>This exampl
6b60: 65 20 75 73 65 73 20 61 20 73 61 6d 70 6c 65 20  e uses a sample 
6b70: 73 65 72 76 65 72 2e 70 65 6d 20 70 72 6f 76 69  server.pem provi
6b80: 64 65 64 20 77 69 74 68 20 74 68 65 20 54 4c 53  ded with the TLS
6b90: 20 72 65 6c 65 61 73 65 2c 0a 63 6f 75 72 74 65   release,.courte
6ba0: 73 79 20 6f 66 20 74 68 65 20 3c 73 74 72 6f 6e  sy of the <stron
6bb0: 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e  g>OpenSSL</stron
6bc0: 67 3e 20 70 72 6f 6a 65 63 74 2e 3c 2f 70 3e 0a  g> project.</p>.
6bd0: 0a 3c 70 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 63  .<pre><code>.pac
6be0: 6b 61 67 65 20 72 65 71 75 69 72 65 20 68 74 74  kage require htt
6bf0: 70 0a 70 61 63 6b 61 67 65 20 72 65 71 75 69 72  p.package requir
6c00: 65 20 74 6c 73 0a 0a 68 74 74 70 3a 3a 72 65 67  e tls..http::reg
6c10: 69 73 74 65 72 20 68 74 74 70 73 20 34 34 33 20  ister https 443 
6c20: 5b 6c 69 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63  [list ::tls::soc
6c30: 6b 65 74 20 2d 61 75 74 6f 73 65 72 76 65 72 6e  ket -autoservern
6c40: 61 6d 65 20 74 72 75 65 20 2d 72 65 71 75 69 72  ame true -requir
6c50: 65 20 74 72 75 65 20 2d 63 61 64 69 72 20 2f 65  e true -cadir /e
6c60: 74 63 2f 73 73 6c 2f 63 65 72 74 73 5d 0a 0a 73  tc/ssl/certs]..s
6c70: 65 74 20 74 6f 6b 20 5b 68 74 74 70 3a 3a 67 65  et tok [http::ge
6c80: 74 75 72 6c 20 68 74 74 70 73 3a 2f 2f 77 77 77  turl https://www
6c90: 2e 74 63 6c 2e 74 6b 2f 5d 0a 3c 2f 63 6f 64 65  .tcl.tk/].</code
6ca0: 3e 3c 2f 70 72 65 3e 0a 0a 3c 68 33 3e 3c 61 20  ></pre>..<h3><a 
6cb0: 6e 61 6d 65 3d 22 53 50 45 43 49 41 4c 20 43 4f  name="SPECIAL CO
6cc0: 4e 53 49 44 45 52 41 54 49 4f 4e 53 22 3e 53 50  NSIDERATIONS">SP
6cd0: 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54  ECIAL CONSIDERAT
6ce0: 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c  IONS</a></h3>..<
6cf0: 70 3e 54 68 65 20 63 61 70 61 62 69 6c 69 74 69  p>The capabiliti
6d00: 65 73 20 6f 66 20 74 68 69 73 20 70 61 63 6b 61  es of this packa
6d10: 67 65 20 63 61 6e 20 76 61 72 79 20 65 6e 6f 72  ge can vary enor
6d20: 6d 6f 75 73 6c 79 20 62 61 73 65 64 0a 75 70 6f  mously based.upo
6d30: 6e 20 68 6f 77 20 79 6f 75 72 20 4f 70 65 6e 53  n how your OpenS
6d40: 53 4c 20 6c 69 62 72 61 72 79 20 77 61 73 20 63  SL library was c
6d50: 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 62 75  onfigured and bu
6d60: 69 6c 74 2e 20 41 74 20 74 68 65 0a 6d 6f 73 74  ilt. At the.most
6d70: 20 6d 61 63 72 6f 2d 6c 65 76 65 6c 20 4f 70 65   macro-level Ope
6d80: 6e 53 53 4c 20 73 75 70 70 6f 72 74 73 20 61 20  nSSL supports a 
6d90: 26 71 75 6f 74 3b 6e 6f 20 70 61 74 65 6e 74 73  &quot;no patents
6da0: 26 71 75 6f 74 3b 20 62 75 69 6c 64 2c 0a 77 68  &quot; build,.wh
6db0: 69 63 68 20 64 69 73 61 62 6c 65 73 20 52 53 41  ich disables RSA
6dc0: 2c 20 49 44 45 41 2c 20 52 43 28 32 2c 34 2c 35  , IDEA, RC(2,4,5
6dd0: 29 20 61 6e 64 20 53 53 4c 32 20 2d 20 69 66 20  ) and SSL2 - if 
6de0: 79 6f 75 72 20 4f 70 65 6e 53 53 4c 20 69 73 0a  your OpenSSL is.
6df0: 63 6f 6e 66 69 67 75 72 65 64 20 74 68 69 73 20  configured this 
6e00: 77 61 79 20 74 68 65 6e 20 79 6f 75 20 77 69 6c  way then you wil
6e10: 6c 20 6e 65 65 64 20 74 6f 20 62 75 69 6c 64 20  l need to build 
6e20: 54 4c 53 20 77 69 74 68 20 74 68 65 0a 2d 44 4e  TLS with the.-DN
6e30: 4f 5f 50 41 54 45 4e 54 53 20 6f 70 74 69 6f 6e  O_PATENTS option
6e40: 20 2d 20 61 6e 64 20 74 68 65 20 72 65 73 75 6c   - and the resul
6e50: 74 61 6e 74 20 6d 6f 64 75 6c 65 20 77 69 6c 6c  tant module will
6e60: 20 66 75 6e 63 74 69 6f 6e 0a 63 6f 72 72 65 63   function.correc
6e70: 74 6c 79 20 61 6e 64 20 61 6c 73 6f 20 73 75 70  tly and also sup
6e80: 70 6f 72 74 20 41 44 48 20 63 65 72 74 69 66 69  port ADH certifi
6e90: 63 61 74 65 2d 6c 65 73 73 20 65 6e 63 72 79 70  cate-less encryp
6ea0: 74 69 6f 6e 2c 0a 68 6f 77 65 76 65 72 20 79 6f  tion,.however yo
6eb0: 75 20 77 69 6c 6c 20 62 65 20 75 6e 61 62 6c 65  u will be unable
6ec0: 20 74 6f 20 75 74 69 6c 69 7a 65 20 74 68 69 73   to utilize this
6ed0: 20 74 6f 20 73 70 65 61 6b 20 74 6f 20 6e 6f 72   to speak to nor
6ee0: 6d 61 6c 20 57 65 62 0a 53 65 72 76 65 72 73 2c  mal Web.Servers,
6ef0: 20 77 68 69 63 68 20 74 79 70 69 63 61 6c 6c 79   which typically
6f00: 20 72 65 71 75 69 72 65 20 52 53 41 20 73 75 70   require RSA sup
6f10: 70 6f 72 74 2e 20 50 6c 65 61 73 65 20 73 65 65  port. Please see
6f20: 20 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f   <a.href="http:/
6f30: 2f 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67  /www.openssl.org
6f40: 2f 22 3e 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70  /">http://www.op
6f50: 65 6e 73 73 6c 2e 6f 72 67 2f 3c 2f 61 3e 20 66  enssl.org/</a> f
6f60: 6f 72 0a 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74  or.more informat
6f70: 69 6f 6e 20 6f 6e 20 74 68 65 20 77 68 6f 6c 65  ion on the whole
6f80: 20 69 73 73 75 65 20 6f 66 20 70 61 74 65 6e 74   issue of patent
6f90: 73 20 61 6e 64 20 55 53 20 65 78 70 6f 72 74 0a  s and US export.
6fa0: 72 65 73 74 72 69 63 74 69 6f 6e 73 2e 20 3c 2f  restrictions. </
6fb0: 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d  p>..<h3><a name=
6fc0: 22 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41  "SEE ALSO">SEE A
6fd0: 4c 53 4f 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70  LSO</a></h3>..<p
6fe0: 3e 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c  ><strong>socket<
6ff0: 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73 74 72 6f 6e  /strong>, <stron
7000: 67 3e 66 69 6c 65 65 76 65 6e 74 2c 20 3c 2f 73  g>fileevent, </s
7010: 74 72 6f 6e 67 3e 3c 61 0a 68 72 65 66 3d 22 68  trong><a.href="h
7020: 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73  ttp://www.openss
7030: 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72 6f 6e 67 3e  l.org/"><strong>
7040: 4f 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e  OpenSSL</strong>
7050: 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68 72 3e 0a 0a  </a></p>..<hr>..
7060: 3c 70 72 65 3e 0a 43 6f 70 79 72 69 67 68 74 20  <pre>.Copyright 
7070: 26 63 6f 70 79 3b 20 31 39 39 39 20 4d 61 74 74  &copy; 1999 Matt
7080: 20 4e 65 77 6d 61 6e 2e 0a 43 6f 70 79 72 69 67   Newman..Copyrig
7090: 68 74 20 26 63 6f 70 79 3b 20 32 30 30 34 20 53  ht &copy; 2004 S
70a0: 74 61 72 66 69 73 68 20 53 79 73 74 65 6d 73 2e  tarfish Systems.
70b0: 0a 3c 2f 70 72 65 3e 0a 3c 2f 62 6f 64 79 3e 0a  .</pre>.</body>.
70c0: 3c 2f 68 74 6d 6c 3e 0a                          </html>.