Hex Artifact Content

Artifact 106eeb2a8c14196e80592ff36bbc811a82ad6583f67342ae45eabf1bf58f7a4a:


0000: 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e 0a  <!DOCTYPE html>.
0010: 3c 68 74 6d 6c 20 6c 61 6e 67 3d 22 65 6e 22 3e  <html lang="en">
0020: 0a 3c 68 65 61 64 3e 0a 3c 6d 65 74 61 20 68 74  .<head>.<meta ht
0030: 74 70 2d 65 71 75 69 76 3d 22 43 6f 6e 74 65 6e  tp-equiv="Conten
0040: 74 2d 54 79 70 65 22 20 63 6f 6e 74 65 6e 74 3d  t-Type" content=
0050: 22 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72  "text/html; char
0060: 73 65 74 3d 75 74 66 2d 38 22 3e 0a 3c 6d 65 74  set=utf-8">.<met
0070: 61 20 6e 61 6d 65 3d 22 43 6f 70 79 72 69 67 68  a name="Copyrigh
0080: 74 22 20 63 6f 6e 74 65 6e 74 3d 22 31 39 39 39  t" content="1999
0090: 20 4d 61 74 74 20 4e 65 77 6d 61 6e 20 2f 20 32   Matt Newman / 2
00a0: 30 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73  004 Starfish Sys
00b0: 74 65 6d 73 22 3e 0a 3c 74 69 74 6c 65 3e 54 4c  tems">.<title>TL
00c0: 53 20 28 53 53 4c 29 20 54 63 6c 20 43 6f 6d 6d  S (SSL) Tcl Comm
00d0: 61 6e 64 73 3c 2f 74 69 74 6c 65 3e 0a 3c 6c 69  ands</title>.<li
00e0: 6e 6b 20 72 65 6c 3d 22 73 74 79 6c 65 73 68 65  nk rel="styleshe
00f0: 65 74 22 20 68 72 65 66 3d 22 64 6f 63 73 2e 63  et" href="docs.c
0100: 73 73 22 20 74 79 70 65 3d 22 74 65 78 74 2f 63  ss" type="text/c
0110: 73 73 22 20 6d 65 64 69 61 3d 22 61 6c 6c 22 3e  ss" media="all">
0120: 0a 3c 2f 68 65 61 64 3e 0a 0a 3c 62 6f 64 79 20  .</head>..<body 
0130: 62 67 63 6f 6c 6f 72 3d 22 23 46 46 46 46 46 46  bgcolor="#FFFFFF
0140: 22 3e 0a 0a 3c 64 6c 3e 0a 20 20 20 20 3c 64 64  ">..<dl>.    <dd
0150: 3e 3c 61 20 68 72 65 66 3d 22 23 4e 41 4d 45 22  ><a href="#NAME"
0160: 3e 4e 41 4d 45 3c 2f 61 3e 0a 20 20 20 20 3c 64  >NAME</a>.    <d
0170: 6c 3e 0a 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c  l>.    <dd><b>tl
0180: 73 3c 2f 62 3e 20 2d 20 62 69 6e 64 69 6e 67 20  s</b> - binding 
0190: 74 6f 20 3c 62 3e 4f 70 65 6e 53 53 4c 3c 2f 62  to <b>OpenSSL</b
01a0: 3e 20 74 6f 6f 6c 6b 69 74 2e 3c 2f 64 64 3e 0a  > toolkit.</dd>.
01b0: 20 20 20 20 3c 2f 64 6c 3e 0a 20 20 20 20 3c 2f      </dl>.    </
01c0: 64 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68  dd>.    <dd><a h
01d0: 72 65 66 3d 22 23 53 59 4e 4f 50 53 49 53 22 3e  ref="#SYNOPSIS">
01e0: 53 59 4e 4f 50 53 49 53 3c 2f 61 3e 20 3c 2f 64  SYNOPSIS</a> </d
01f0: 64 3e 0a 20 20 20 20 3c 64 64 3e 3c 64 6c 3e 0a  d>.    <dd><dl>.
0200: 09 20 20 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b  .    <dd><b>pack
0210: 61 67 65 20 72 65 71 75 69 72 65 20 54 63 6c 3c  age require Tcl<
0220: 2f 62 3e 20 3c 65 6d 3e 3f 3c 62 3e 38 2e 35 3c  /b> <em>?<b>8.5<
0230: 2f 62 3e 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09  /b>?</em></dd>..
0240: 20 20 20 20 3c 64 64 3e 3c 62 3e 70 61 63 6b 61      <dd><b>packa
0250: 67 65 20 72 65 71 75 69 72 65 20 74 6c 73 3c 2f  ge require tls</
0260: 62 3e 20 3c 65 6d 3e 3f 40 40 56 45 52 53 40 40  b> <em>?@@VERS@@
0270: 3f 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20  ?</em></dd>..   
0280: 20 3c 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e   <dt>&nbsp;</dt>
0290: 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c 73  ..    <dd><b>tls
02a0: 3a 3a 69 6e 69 74 3c 2f 62 3e 20 3c 65 6d 3e 3f  ::init</b> <em>?
02b0: 6f 70 74 69 6f 6e 73 3f 3c 2f 65 6d 3e 20 3c 2f  options?</em> </
02c0: 64 64 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e  dd>..    <dd><b>
02d0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
02e0: 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68 6f  <em>?options? ho
02f0: 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 64  st port</em></dd
0300: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c  >..    <dd><b>tl
0310: 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65  s::socket</b> <e
0320: 6d 3e 3f 2d 73 65 72 76 65 72 20 63 6f 6d 6d 61  m>?-server comma
0330: 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f 20 70 6f  nd? ?options? po
0340: 72 74 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20  rt</em></dd>..  
0350: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 68 61    <dd><b>tls::ha
0360: 6e 64 73 68 61 6b 65 3c 2f 62 3e 20 3c 65 6d 3e  ndshake</b> <em>
0370: 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 64 64  channel</em></dd
0380: 3e 0a 09 20 20 20 20 3c 64 64 3e 3c 62 3e 74 6c  >..    <dd><b>tl
0390: 73 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 65  s::status</b> <e
03a0: 6d 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e  m>?-local? chann
03b0: 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20  el</em></dd>..  
03c0: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 69 6d    <dd><b>tls::im
03d0: 70 6f 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61  port</b> <em>cha
03e0: 6e 6e 65 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f  nnel ?options?</
03f0: 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20 3c 64  em></dd>..    <d
0400: 64 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f  d><b>tls::unimpo
0410: 72 74 3c 2f 62 3e 20 3c 65 6d 3e 63 68 61 6e 6e  rt</b> <em>chann
0420: 65 6c 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20  el</em></dd>..  
0430: 20 20 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 63 69    <dd><b>tls::ci
0440: 70 68 65 72 73 3c 2f 62 3e 20 3c 65 6d 3e 70 72  phers</b> <em>pr
0450: 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73 65 3f  otocol ?verbose?
0460: 3c 2f 65 6d 3e 3c 2f 64 64 3e 0a 09 20 20 20 20  </em></dd>..    
0470: 3c 64 64 3e 3c 62 3e 74 6c 73 3a 3a 76 65 72 73  <dd><b>tls::vers
0480: 69 6f 6e 3c 2f 62 3e 3c 2f 64 64 3e 0a 09 3c 2f  ion</b></dd>..</
0490: 64 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 20 20  dl>.    </dd>.  
04a0: 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23    <dd><a href="#
04b0: 43 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e  COMMANDS">COMMAN
04c0: 44 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20  DS</a></dd>.    
04d0: 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 41  <dd><a href="#CA
04e0: 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53 22 3e  LLBACK OPTIONS">
04f0: 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e 53  CALLBACK OPTIONS
0500: 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20 20 20 3c 64  </a></dd>.    <d
0510: 64 3e 3c 61 20 68 72 65 66 3d 22 23 48 54 54 50  d><a href="#HTTP
0520: 53 20 45 58 41 4d 50 4c 45 22 3e 48 54 54 50 53  S EXAMPLE">HTTPS
0530: 20 45 58 41 4d 50 4c 45 3c 2f 61 3e 3c 2f 64 64   EXAMPLE</a></dd
0540: 3e 0a 20 20 20 20 3c 64 64 3e 3c 61 20 68 72 65  >.    <dd><a hre
0550: 66 3d 22 23 53 45 45 20 41 4c 53 4f 22 3e 53 50  f="#SEE ALSO">SP
0560: 45 43 49 41 4c 20 43 4f 4e 53 49 44 45 52 41 54  ECIAL CONSIDERAT
0570: 49 4f 4e 53 3c 2f 61 3e 3c 2f 64 64 3e 0a 20 20  IONS</a></dd>.  
0580: 20 20 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23    <dd><a href="#
0590: 53 45 45 20 41 4c 53 4f 22 3e 53 45 45 20 41 4c  SEE ALSO">SEE AL
05a0: 53 4f 3c 2f 61 3e 3c 2f 64 64 3e 0a 3c 2f 64 6c  SO</a></dd>.</dl
05b0: 3e 0a 0a 3c 68 72 3e 0a 0a 3c 68 33 3e 3c 61 20  >..<hr>..<h3><a 
05c0: 6e 61 6d 65 3d 22 4e 41 4d 45 22 3e 4e 41 4d 45  name="NAME">NAME
05d0: 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 3c 73  </a></h3>..<p><s
05e0: 74 72 6f 6e 67 3e 74 6c 73 3c 2f 73 74 72 6f 6e  trong>tls</stron
05f0: 67 3e 20 2d 20 62 69 6e 64 69 6e 67 20 74 6f 20  g> - binding to 
0600: 3c 73 74 72 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c  <strong>OpenSSL<
0610: 2f 73 74 72 6f 6e 67 3e 0a 74 6f 6f 6c 6b 69 74  /strong>.toolkit
0620: 2e 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e 61  .</p>..<h3><a na
0630: 6d 65 3d 22 53 59 4e 4f 50 53 49 53 22 3e 53 59  me="SYNOPSIS">SY
0640: 4e 4f 50 53 49 53 3c 2f 61 3e 3c 2f 68 33 3e 0a  NOPSIS</a></h3>.
0650: 0a 3c 70 3e 3c 62 3e 70 61 63 6b 61 67 65 20 72  .<p><b>package r
0660: 65 71 75 69 72 65 20 54 63 6c 20 38 2e 35 3c 2f  equire Tcl 8.5</
0670: 62 3e 3c 62 72 3e 0a 3c 62 3e 70 61 63 6b 61 67  b><br>.<b>packag
0680: 65 20 72 65 71 75 69 72 65 20 74 6c 73 20 40 40  e require tls @@
0690: 56 45 52 53 40 40 3c 2f 62 3e 3c 62 72 3e 0a 3c  VERS@@</b><br>.<
06a0: 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 23 74 6c  br>.<a href="#tl
06b0: 73 3a 3a 69 6e 69 74 22 3e 3c 62 3e 74 6c 73 3a  s::init"><b>tls:
06c0: 3a 69 6e 69 74 3c 2f 62 3e 20 3c 69 3e 3f 6f 70  :init</b> <i>?op
06d0: 74 69 6f 6e 73 3f 3c 2f 69 3e 3c 62 72 3e 0a 3c  tions?</i><br>.<
06e0: 2f 61 3e 3c 61 20 68 72 65 66 3d 22 23 74 6c 73  /a><a href="#tls
06f0: 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e 74 6c 73  ::socket"><b>tls
0700: 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20 3c 65 6d  ::socket</b> <em
0710: 3e 3f 6f 70 74 69 6f 6e 73 3f 20 68 6f 73 74 0a  >?options? host.
0720: 70 6f 72 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 62  port</em><br>.<b
0730: 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e  >tls::socket</b>
0740: 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63 6f  <em> ?-server co
0750: 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73 3f  mmand? ?options?
0760: 20 70 6f 72 74 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c   port</em><br>.<
0770: 2f 61 3e 3c 61 20 68 72 65 66 3d 22 23 74 6c 73  /a><a href="#tls
0780: 3a 3a 73 74 61 74 75 73 22 3e 3c 62 3e 74 6c 73  ::status"><b>tls
0790: 3a 3a 73 74 61 74 75 73 3c 2f 62 3e 20 3c 65 6d  ::status</b> <em
07a0: 3e 3f 2d 6c 6f 63 61 6c 3f 20 63 68 61 6e 6e 65  >?-local? channe
07b0: 6c 3c 2f 65 6d 3e 3c 62 72 3e 0a 3c 2f 61 3e 3c  l</em><br>.</a><
07c0: 61 20 68 72 65 66 3d 22 23 74 6c 73 3a 3a 68 61  a href="#tls::ha
07d0: 6e 64 73 68 61 6b 65 22 3e 3c 62 3e 74 6c 73 3a  ndshake"><b>tls:
07e0: 3a 68 61 6e 64 73 68 61 6b 65 3c 2f 62 3e 3c 65  :handshake</b><e
07f0: 6d 3e 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c  m> channel</em><
0800: 2f 61 3e 3c 62 72 3e 0a 3c 62 72 3e 0a 3c 61 20  /a><br>.<br>.<a 
0810: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 69 6d 70 6f  href="#tls::impo
0820: 72 74 22 3e 3c 62 3e 74 6c 73 3a 3a 69 6d 70 6f  rt"><b>tls::impo
0830: 72 74 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65  rt</b> <i>channe
0840: 6c 20 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69 3e 3c  l ?options?</i><
0850: 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65 66 3d  /a><br>.<a href=
0860: 22 23 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22  "#tls::unimport"
0870: 3e 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72  ><b>tls::unimpor
0880: 74 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c  t</b> <i>channel
0890: 3c 2f 69 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20  </i></a><br>.<a 
08a0: 68 72 65 66 3d 22 23 74 6c 73 3a 3a 63 69 70 68  href="#tls::ciph
08b0: 65 72 73 20 70 72 6f 74 6f 63 6f 6c 20 3f 76 65  ers protocol ?ve
08c0: 72 62 6f 73 65 3f 22 3e 3c 73 74 72 6f 6e 67 3e  rbose?"><strong>
08d0: 74 6c 73 3a 3a 63 69 70 68 65 72 73 3c 2f 73 74  tls::ciphers</st
08e0: 72 6f 6e 67 3e 0a 3c 65 6d 3e 70 72 6f 74 6f 63  rong>.<em>protoc
08f0: 6f 6c 20 3f 76 65 72 62 6f 73 65 3f 3c 2f 65 6d  ol ?verbose?</em
0900: 3e 3c 2f 61 3e 3c 62 72 3e 0a 3c 61 20 68 72 65  ></a><br>.<a hre
0910: 66 3d 22 23 74 6c 73 3a 3a 76 65 72 73 69 6f 6e  f="#tls::version
0920: 22 3e 3c 62 3e 74 6c 73 3a 3a 76 65 72 73 69 6f  "><b>tls::versio
0930: 6e 3c 2f 62 3e 3c 2f 61 3e 0a 3c 2f 70 3e 0a 0a  n</b></a>.</p>..
0940: 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 44 45 53  <h3><a name="DES
0950: 43 52 49 50 54 49 4f 4e 22 3e 44 45 53 43 52 49  CRIPTION">DESCRI
0960: 50 54 49 4f 4e 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a  PTION</a></h3>..
0970: 3c 70 3e 54 68 69 73 20 65 78 74 65 6e 73 69 6f  <p>This extensio
0980: 6e 20 70 72 6f 76 69 64 65 73 20 61 20 67 65 6e  n provides a gen
0990: 65 72 69 63 20 62 69 6e 64 69 6e 67 20 74 6f 20  eric binding to 
09a0: 3c 61 0a 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a.href="http://
09b0: 77 77 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f  www.openssl.org/
09c0: 22 3e 4f 70 65 6e 53 53 4c 3c 2f 61 3e 2c 20 75  ">OpenSSL</a>, u
09d0: 74 69 6c 69 7a 69 6e 67 20 74 68 65 0a 3c 73 74  tilizing the.<st
09e0: 72 6f 6e 67 3e 54 63 6c 5f 53 74 61 63 6b 43 68  rong>Tcl_StackCh
09f0: 61 6e 6e 65 6c 3c 2f 73 74 72 6f 6e 67 3e 0a 41  annel</strong>.A
0a00: 50 49 20 66 6f 72 20 54 63 6c 20 38 2e 32 20 61  PI for Tcl 8.2 a
0a10: 6e 64 20 68 69 67 68 65 72 2e 20 54 68 65 20 73  nd higher. The s
0a20: 6f 63 6b 65 74 73 20 62 65 68 61 76 65 20 65 78  ockets behave ex
0a30: 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 0a 61  actly the same.a
0a40: 73 20 63 68 61 6e 6e 65 6c 73 20 63 72 65 61 74  s channels creat
0a50: 65 64 20 75 73 69 6e 67 20 54 63 6c 27 73 20 62  ed using Tcl's b
0a60: 75 69 6c 74 2d 69 6e 20 3c 73 74 72 6f 6e 67 3e  uilt-in <strong>
0a70: 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a  socket</strong>.
0a80: 63 6f 6d 6d 61 6e 64 20 77 69 74 68 20 61 64 64  command with add
0a90: 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 73 20  itional options 
0aa0: 66 6f 72 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20  for controlling 
0ab0: 74 68 65 20 53 53 4c 20 73 65 73 73 69 6f 6e 2e  the SSL session.
0ac0: 0a 54 6f 20 75 73 65 20 54 4c 53 20 77 69 74 68  .To use TLS with
0ad0: 20 61 6e 20 65 61 72 6c 69 65 72 20 76 65 72 73   an earlier vers
0ae0: 69 6f 6e 20 6f 66 20 54 63 6c 20 74 68 61 6e 20  ion of Tcl than 
0af0: 38 2e 34 2c 20 70 6c 65 61 73 65 20 6f 62 74 61  8.4, please obta
0b00: 69 6e 0a 54 4c 53 20 31 2e 33 2e 0a 3c 2f 70 3e  in.TLS 1.3..</p>
0b10: 0a 0a 3c 68 33 3e 3c 61 20 6e 61 6d 65 3d 22 43  ..<h3><a name="C
0b20: 4f 4d 4d 41 4e 44 53 22 3e 43 4f 4d 4d 41 4e 44  OMMANDS">COMMAND
0b30: 53 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c 70 3e 54  S</a></h3>..<p>T
0b40: 79 70 69 63 61 6c 6c 79 20 6f 6e 65 20 77 6f 75  ypically one wou
0b50: 6c 64 20 75 73 65 20 74 68 65 20 3c 73 74 72 6f  ld use the <stro
0b60: 6e 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 20 3c  ng>tls::socket <
0b70: 2f 73 74 72 6f 6e 67 3e 63 6f 6d 6d 61 6e 64 0a  /strong>command.
0b80: 77 68 69 63 68 20 70 72 6f 76 69 64 65 73 20 63  which provides c
0b90: 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74  ompatibility wit
0ba0: 68 20 74 68 65 20 6e 61 74 69 76 65 20 54 63 6c  h the native Tcl
0bb0: 20 3c 73 74 72 6f 6e 67 3e 73 6f 63 6b 65 74 3c   <strong>socket<
0bc0: 2f 73 74 72 6f 6e 67 3e 0a 63 6f 6d 6d 61 6e 64  /strong>.command
0bd0: 2e 20 49 6e 20 73 75 63 68 20 63 61 73 65 73 20  . In such cases 
0be0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70  <strong>tls::imp
0bf0: 6f 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 73 68 6f  ort</strong> sho
0c00: 75 6c 64 20 6e 6f 74 20 62 65 0a 75 73 65 64 20  uld not be.used 
0c10: 64 69 72 65 63 74 6c 79 2e 3c 2f 70 3e 0a 0a 3c  directly.</p>..<
0c20: 64 6c 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e  dl>.    <dt><a n
0c30: 61 6d 65 3d 22 74 6c 73 3a 3a 69 6e 69 74 22 3e  ame="tls::init">
0c40: 3c 62 3e 74 6c 73 3a 3a 69 6e 69 74 3c 2f 62 3e  <b>tls::init</b>
0c50: 20 3c 69 3e 3f 6f 70 74 69 6f 6e 73 3f 3c 2f 69   <i>?options?</i
0c60: 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c  ></a></dt>.    <
0c70: 64 64 3e 54 68 69 73 20 72 6f 75 74 69 6e 65 20  dd>This routine 
0c80: 73 65 74 73 20 74 68 65 20 64 65 66 61 75 6c 74  sets the default
0c90: 20 6f 70 74 69 6f 6e 73 20 75 73 65 64 20 62 79   options used by
0ca0: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f   <strong>tls::so
0cb0: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 61  cket</strong>..a
0cc0: 6e 64 20 69 73 20 3c 65 6d 3e 6f 70 74 69 6f 6e  nd is <em>option
0cd0: 61 6c 3c 2f 65 6d 3e 2e 20 49 66 20 79 6f 75 20  al</em>. If you 
0ce0: 63 61 6c 6c 20 3c 73 74 72 6f 6e 67 3e 74 6c 73  call <strong>tls
0cf0: 3a 3a 69 6d 70 6f 72 74 3c 2f 73 74 72 6f 6e 67  ::import</strong
0d00: 3e 0a 09 64 69 72 65 63 74 6c 79 20 74 68 69 73  >..directly this
0d10: 20 72 6f 75 74 69 6e 65 20 68 61 73 20 6e 6f 20   routine has no 
0d20: 65 66 66 65 63 74 2e 20 41 6e 79 20 6f 66 20 74  effect. Any of t
0d30: 68 65 20 6f 70 74 69 6f 6e 73 0a 09 74 68 61 74  he options..that
0d40: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 73 6f   <strong>tls::so
0d50: 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 20 61 63  cket</strong> ac
0d60: 63 65 70 74 73 20 63 61 6e 20 62 65 20 73 65 74  cepts can be set
0d70: 0a 09 75 73 69 6e 67 20 74 68 69 73 20 63 6f 6d  ..using this com
0d80: 6d 61 6e 64 2c 20 74 68 6f 75 67 68 20 79 6f 75  mand, though you
0d90: 20 73 68 6f 75 6c 64 20 6c 69 6d 69 74 20 79 6f   should limit yo
0da0: 75 72 20 6f 70 74 69 6f 6e 73 0a 09 74 6f 20 6f  ur options..to o
0db0: 6e 6c 79 20 54 4c 53 20 72 65 6c 61 74 65 64 20  nly TLS related 
0dc0: 6f 6e 65 73 2e 3c 2f 64 64 3e 0a 20 20 20 20 3c  ones.</dd>.    <
0dd0: 64 74 3e 26 6e 62 73 70 3b 3c 2f 64 74 3e 0a 20  dt>&nbsp;</dt>. 
0de0: 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22     <dt><a name="
0df0: 74 6c 73 3a 3a 73 6f 63 6b 65 74 22 3e 3c 62 3e  tls::socket"><b>
0e00: 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62 3e 20  tls::socket</b> 
0e10: 3c 65 6d 3e 3f 6f 70 74 69 6f 6e 73 3f 0a 09 68  <em>?options?..h
0e20: 6f 73 74 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 61  ost port</em></a
0e30: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e 3c  ></dt>.    <dt><
0e40: 62 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 62  b>tls::socket</b
0e50: 3e 3c 65 6d 3e 20 3f 2d 73 65 72 76 65 72 20 63  ><em> ?-server c
0e60: 6f 6d 6d 61 6e 64 3f 20 3f 6f 70 74 69 6f 6e 73  ommand? ?options
0e70: 3f 20 70 6f 72 74 3c 2f 65 6d 3e 3c 2f 64 74 3e  ? port</em></dt>
0e80: 0a 20 20 20 20 3c 64 64 3e 54 68 69 73 20 69 73  .    <dd>This is
0e90: 20 61 20 68 65 6c 70 65 72 20 66 75 6e 63 74 69   a helper functi
0ea0: 6f 6e 20 74 68 61 74 20 75 74 69 6c 69 7a 65 73  on that utilizes
0eb0: 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 0a   the underlying.
0ec0: 09 63 6f 6d 6d 61 6e 64 73 20 28 3c 73 74 72 6f  .commands (<stro
0ed0: 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f  ng>tls::import</
0ee0: 73 74 72 6f 6e 67 3e 29 2e 20 49 74 20 62 65 68  strong>). It beh
0ef0: 61 76 65 73 0a 09 65 78 61 63 74 6c 79 20 74 68  aves..exactly th
0f00: 65 20 73 61 6d 65 20 61 73 20 74 68 65 20 6e 61  e same as the na
0f10: 74 69 76 65 20 54 63 6c 20 3c 73 74 72 6f 6e 67  tive Tcl <strong
0f20: 3e 73 6f 63 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e  >socket</strong>
0f30: 0a 09 63 6f 6d 6d 61 6e 64 20 65 78 63 65 70 74  ..command except
0f40: 20 74 68 61 74 20 74 68 65 20 6f 70 74 69 6f 6e   that the option
0f50: 73 20 63 61 6e 20 69 6e 63 6c 75 64 65 20 61 6e  s can include an
0f60: 79 20 6f 66 20 74 68 65 0a 09 61 70 70 6c 69 63  y of the..applic
0f70: 61 62 6c 65 20 3c 61 20 68 72 65 66 3d 22 23 74  able <a href="#t
0f80: 6c 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 73 74 72  ls::import"><str
0f90: 6f 6e 67 3e 74 6c 73 3a 69 6d 70 6f 72 74 3c 2f  ong>tls:import</
0fa0: 73 74 72 6f 6e 67 3e 3c 2f 61 3e 0a 09 6f 70 74  strong></a>..opt
0fb0: 69 6f 6e 73 20 77 69 74 68 20 6f 6e 65 20 61 64  ions with one ad
0fc0: 64 69 74 69 6f 6e 61 6c 20 6f 70 74 69 6f 6e 3a  ditional option:
0fd0: 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 20 20  .<blockquote>.  
0fe0: 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e 3c 73 74 72    <dl>..<dt><str
0ff0: 6f 6e 67 3e 2d 61 75 74 6f 73 65 72 76 65 72 6e  ong>-autoservern
1000: 61 6d 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ame</strong> <em
1010: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >bool</em></dt>.
1020: 09 3c 64 64 3e 41 75 74 6f 6d 61 74 69 63 61 6c  .<dd>Automatical
1030: 6c 79 20 73 65 6e 64 20 74 68 65 20 2d 73 65 72  ly send the -ser
1040: 76 65 72 6e 61 6d 65 20 61 73 20 74 68 65 20 3c  vername as the <
1050: 65 6d 3e 68 6f 73 74 3c 2f 65 6d 3e 20 61 72 67  em>host</em> arg
1060: 75 6d 65 6e 74 0a 09 20 20 20 20 28 64 65 66 61  ument..    (defa
1070: 75 6c 74 20 69 73 20 20 3c 65 6d 3e 66 61 6c 73  ult is  <em>fals
1080: 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 20 20 20  e</em>)</dd>.   
1090: 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b 71 75   </dl>.</blockqu
10a0: 6f 74 65 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62  ote>.    <dt>&nb
10b0: 73 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74  sp;</dt>.    <dt
10c0: 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 68  ><a name="tls::h
10d0: 61 6e 64 73 68 61 6b 65 22 3e 3c 73 74 72 6f 6e  andshake"><stron
10e0: 67 3e 74 6c 73 3a 3a 68 61 6e 64 73 68 61 6b 65  g>tls::handshake
10f0: 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68  </strong> <em>ch
1100: 61 6e 6e 65 6c 3c 2f 65 6d 3e 3c 2f 61 3e 3c 2f  annel</em></a></
1110: 64 74 3e 0a 20 20 20 20 3c 64 64 3e 46 6f 72 63  dt>.    <dd>Forc
1120: 65 73 20 68 61 6e 64 73 68 61 6b 65 20 74 6f 20  es handshake to 
1130: 74 61 6b 65 20 70 6c 61 63 65 2c 20 61 6e 64 20  take place, and 
1140: 72 65 74 75 72 6e 73 20 30 20 69 66 0a 09 68 61  returns 0 if..ha
1150: 6e 64 73 68 61 6b 65 20 69 73 20 73 74 69 6c 6c  ndshake is still
1160: 20 69 6e 20 70 72 6f 67 72 65 73 73 20 28 6e 6f   in progress (no
1170: 6e 2d 62 6c 6f 63 6b 69 6e 67 29 2c 20 6f 72 20  n-blocking), or 
1180: 31 20 69 66 0a 09 74 68 65 20 68 61 6e 64 73 68  1 if..the handsh
1190: 61 6b 65 20 77 61 73 20 73 75 63 63 65 73 73 66  ake was successf
11a0: 75 6c 2e 20 49 66 20 74 68 65 20 68 61 6e 64 73  ul. If the hands
11b0: 68 61 6b 65 20 66 61 69 6c 65 64 0a 09 74 68 69  hake failed..thi
11c0: 73 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c 20 74  s routine will t
11d0: 68 72 6f 77 20 61 6e 20 65 72 72 6f 72 2e 3c 2f  hrow an error.</
11e0: 64 64 3e 0a 20 20 20 20 3c 64 74 3e 26 6e 62 73  dd>.    <dt>&nbs
11f0: 70 3b 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 74 3e  p;</dt>.    <dt>
1200: 3c 61 20 6e 61 6d 65 3d 22 74 6c 73 3a 3a 73 74  <a name="tls::st
1210: 61 74 75 73 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c  atus"><strong>tl
1220: 73 3a 3a 73 74 61 74 75 73 3c 2f 73 74 72 6f 6e  s::status</stron
1230: 67 3e 0a 20 20 20 20 3c 65 6d 3e 3f 2d 6c 6f 63  g>.    <em>?-loc
1240: 61 6c 3f 20 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  al? channel</em>
1250: 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  </a></dt>.    <d
1260: 64 3e 52 65 74 75 72 6e 73 20 74 68 65 20 63 75  d>Returns the cu
1270: 72 72 65 6e 74 20 73 65 63 75 72 69 74 79 20 73  rrent security s
1280: 74 61 74 75 73 20 6f 66 20 61 6e 20 53 53 4c 20  tatus of an SSL 
1290: 63 68 61 6e 6e 65 6c 2e 20 54 68 65 0a 09 72 65  channel. The..re
12a0: 73 75 6c 74 20 69 73 20 61 20 6c 69 73 74 20 6f  sult is a list o
12b0: 66 20 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72  f key-value pair
12c0: 73 20 64 65 73 63 72 69 62 69 6e 67 20 74 68 65  s describing the
12d0: 0a 09 63 6f 6e 6e 65 63 74 65 64 20 70 65 65 72  ..connected peer
12e0: 2e 20 49 66 20 74 68 65 20 72 65 73 75 6c 74 20  . If the result 
12f0: 69 73 20 61 6e 20 65 6d 70 74 79 20 6c 69 73 74  is an empty list
1300: 20 74 68 65 6e 20 74 68 65 0a 09 53 53 4c 20 68   then the..SSL h
1310: 61 6e 64 73 68 61 6b 65 20 68 61 73 20 6e 6f 74  andshake has not
1320: 20 79 65 74 20 63 6f 6d 70 6c 65 74 65 64 2e 0a   yet completed..
1330: 09 49 66 20 3c 65 6d 3e 2d 6c 6f 63 61 6c 3c 2f  .If <em>-local</
1340: 65 6d 3e 20 69 73 20 67 69 76 65 6e 2c 20 74 68  em> is given, th
1350: 65 6e 20 74 68 65 20 63 65 72 74 69 66 69 63 61  en the certifica
1360: 74 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a 09  te information..
1370: 69 73 20 74 68 65 20 6f 6e 65 20 75 73 65 64 20  is the one used 
1380: 6c 6f 63 61 6c 6c 79 2e 3c 2f 64 64 3e 0a 3c 2f  locally.</dd>.</
1390: 64 6c 3e 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65  dl>..<blockquote
13a0: 3e 0a 20 20 20 20 3c 64 6c 3e 0a 09 3c 64 74 3e  >.    <dl>..<dt>
13b0: 3c 73 74 72 6f 6e 67 3e 69 73 73 75 65 72 3c 2f  <strong>issuer</
13c0: 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 64 6e 3c 2f  strong> <em>dn</
13d0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68  em></dt>..<dd>Th
13e0: 65 20 64 69 73 74 69 6e 67 75 69 73 68 65 64 20  e distinguished 
13f0: 6e 61 6d 65 20 28 44 4e 29 20 6f 66 20 74 68 65  name (DN) of the
1400: 20 63 65 72 74 69 66 69 63 61 74 65 0a 09 20 20   certificate..  
1410: 20 20 69 73 73 75 65 72 2e 3c 2f 64 64 3e 0a 09    issuer.</dd>..
1420: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 73 75 62 6a  <dt><strong>subj
1430: 65 63 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ect</strong> <em
1440: 3e 64 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c  >dn</em></dt>..<
1450: 64 64 3e 54 68 65 20 64 69 73 74 69 6e 67 75 69  dd>The distingui
1460: 73 68 65 64 20 6e 61 6d 65 20 28 44 4e 29 20 6f  shed name (DN) o
1470: 66 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74  f the certificat
1480: 65 0a 09 20 20 20 20 73 75 62 6a 65 63 74 2e 3c  e..    subject.<
1490: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
14a0: 67 3e 6e 6f 74 42 65 66 6f 72 65 3c 2f 73 74 72  g>notBefore</str
14b0: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65  ong> <em>date</e
14c0: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
14d0: 20 62 65 67 69 6e 20 64 61 74 65 20 66 6f 72 20   begin date for 
14e0: 74 68 65 20 76 61 6c 69 64 69 74 79 20 6f 66 20  the validity of 
14f0: 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65 2e  the certificate.
1500: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
1510: 6e 67 3e 6e 6f 74 41 66 74 65 72 3c 2f 73 74 72  ng>notAfter</str
1520: 6f 6e 67 3e 20 3c 65 6d 3e 64 61 74 65 3c 2f 65  ong> <em>date</e
1530: 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65  m></dt>..<dd>The
1540: 20 65 78 70 69 72 79 20 64 61 74 65 20 66 6f 72   expiry date for
1550: 20 74 68 65 20 63 65 72 74 69 66 69 63 61 74 65   the certificate
1560: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
1570: 6f 6e 67 3e 73 65 72 69 61 6c 3c 2f 73 74 72 6f  ong>serial</stro
1580: 6e 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f  ng> <em>n</em></
1590: 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 73 65 72  dt>..<dd>The ser
15a0: 69 61 6c 20 6e 75 6d 62 65 72 20 6f 66 20 74 68  ial number of th
15b0: 65 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f  e certificate.</
15c0: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
15d0: 3e 63 69 70 68 65 72 3c 2f 73 74 72 6f 6e 67 3e  >cipher</strong>
15e0: 20 3c 65 6d 3e 63 69 70 68 65 72 3c 2f 65 6d 3e   <em>cipher</em>
15f0: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 63  </dt>..<dd>The c
1600: 75 72 72 65 6e 74 20 63 69 70 68 65 72 20 69 6e  urrent cipher in
1610: 20 75 73 65 20 62 65 74 77 65 65 6e 20 74 68 65   use between the
1620: 20 63 6c 69 65 6e 74 20 61 6e 64 0a 09 20 20 20   client and..   
1630: 20 73 65 72 76 65 72 20 63 68 61 6e 6e 65 6c 73   server channels
1640: 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  .</dd>..<dt><str
1650: 6f 6e 67 3e 73 62 69 74 73 3c 2f 73 74 72 6f 6e  ong>sbits</stron
1660: 67 3e 20 3c 65 6d 3e 6e 3c 2f 65 6d 3e 3c 2f 64  g> <em>n</em></d
1670: 74 3e 0a 09 3c 64 64 3e 54 68 65 20 6e 75 6d 62  t>..<dd>The numb
1680: 65 72 20 6f 66 20 62 69 74 73 20 75 73 65 64 20  er of bits used 
1690: 66 6f 72 20 74 68 65 20 73 65 73 73 69 6f 6e 20  for the session 
16a0: 6b 65 79 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  key.</dd>..<dt><
16b0: 73 74 72 6f 6e 67 3e 63 65 72 74 69 66 69 63 61  strong>certifica
16c0: 74 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  te</strong> <em>
16d0: 6e 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  n</em></dt>..<dd
16e0: 3e 54 68 65 20 50 45 4d 20 65 6e 63 6f 64 65 64  >The PEM encoded
16f0: 20 63 65 72 74 69 66 69 63 61 74 65 2e 3c 2f 64   certificate.</d
1700: 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e  d>..<dt><strong>
1710: 76 65 72 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e  version</strong>
1720: 20 3c 65 6d 3e 76 61 6c 75 65 3c 2f 65 6d 3e 3c   <em>value</em><
1730: 2f 64 74 3e 0a 09 3c 64 64 3e 54 68 65 20 70 72  /dt>..<dd>The pr
1740: 6f 74 6f 63 6f 6c 20 76 65 72 73 69 6f 6e 20 75  otocol version u
1750: 73 65 64 20 66 6f 72 20 74 68 65 20 63 6f 6e 6e  sed for the conn
1760: 65 63 74 69 6f 6e 3a 0a 09 20 20 53 53 4c 76 32  ection:..  SSLv2
1770: 2c 20 53 53 4c 76 33 2c 20 54 4c 53 76 31 2c 20  , SSLv3, TLSv1, 
1780: 54 4c 53 76 31 2e 31 2c 20 54 4c 53 76 31 2e 32  TLSv1.1, TLSv1.2
1790: 2c 20 75 6e 6b 6e 6f 77 6e 3c 2f 64 64 3e 0a 20  , unknown</dd>. 
17a0: 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c 6f 63 6b     </dl>.</block
17b0: 71 75 6f 74 65 3e 0a 0a 3c 64 6c 3e 0a 20 20 20  quote>..<dl>.   
17c0: 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d 22 74 6c   <dt><a name="tl
17d0: 73 3a 3a 69 6d 70 6f 72 74 22 3e 3c 62 3e 74 6c  s::import"><b>tl
17e0: 73 3a 3a 69 6d 70 6f 72 74 3c 2f 62 3e 20 3c 69  s::import</b> <i
17f0: 3e 63 68 61 6e 6e 65 6c 0a 09 3f 6f 70 74 69 6f  >channel..?optio
1800: 6e 73 3f 3c 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e  ns?</i></a></dt>
1810: 0a 20 20 20 20 3c 64 64 3e 53 53 4c 2d 65 6e 61  .    <dd>SSL-ena
1820: 62 6c 65 20 61 20 72 65 67 75 6c 61 72 20 54 63  ble a regular Tc
1830: 6c 20 63 68 61 6e 6e 65 6c 20 2d 20 69 74 20 6e  l channel - it n
1840: 65 65 64 20 6e 6f 74 20 62 65 20 61 0a 09 73 6f  eed not be a..so
1850: 63 6b 65 74 2c 20 62 75 74 20 6d 75 73 74 20 70  cket, but must p
1860: 72 6f 76 69 64 65 20 62 69 2d 64 69 72 65 63 74  rovide bi-direct
1870: 69 6f 6e 61 6c 20 66 6c 6f 77 2e 20 41 6c 73 6f  ional flow. Also
1880: 0a 09 73 65 74 74 69 6e 67 20 73 65 73 73 69 6f  ..setting sessio
1890: 6e 20 70 61 72 61 6d 65 74 65 72 73 20 66 6f 72  n parameters for
18a0: 20 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 3c   SSL handshake.<
18b0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 62 6c 6f  /dd>.</dl>..<blo
18c0: 63 6b 71 75 6f 74 65 3e 0a 20 20 20 20 3c 64 6c  ckquote>.    <dl
18d0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
18e0: 63 61 64 69 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c  cadir</strong> <
18f0: 65 6d 3e 64 69 72 3c 2f 65 6d 3e 3c 2f 64 74 3e  em>dir</em></dt>
1900: 0a 09 3c 64 64 3e 50 72 6f 76 69 64 65 20 74 68  ..<dd>Provide th
1910: 65 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74  e directory cont
1920: 61 69 6e 69 6e 67 20 74 68 65 20 43 41 20 63 65  aining the CA ce
1930: 72 74 69 66 69 63 61 74 65 73 2e 3c 2f 64 64 3e  rtificates.</dd>
1940: 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63  ..<dt><strong>-c
1950: 61 66 69 6c 65 20 3c 2f 73 74 72 6f 6e 67 3e 3c  afile </strong><
1960: 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e  em>filename</em>
1970: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 50 72 6f 76 69  </dt>..<dd>Provi
1980: 64 65 20 74 68 65 20 43 41 20 66 69 6c 65 2e 3c  de the CA file.<
1990: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
19a0: 67 3e 2d 63 65 72 74 66 69 6c 65 3c 2f 73 74 72  g>-certfile</str
19b0: 6f 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d  ong> <em>filenam
19c0: 65 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  e</em></dt>..<dd
19d0: 3e 50 72 6f 76 69 64 65 20 74 68 65 20 6e 61 6d  >Provide the nam
19e0: 65 20 6f 66 20 61 20 66 69 6c 65 20 63 6f 6e 74  e of a file cont
19f0: 61 69 6e 69 6e 67 20 63 65 72 74 69 66 69 63 61  aining certifica
1a00: 74 65 20 74 6f 20 75 73 65 2e 3c 2f 64 64 3e 0a  te to use.</dd>.
1a10: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 63 65  .<dt><strong>-ce
1a20: 72 74 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e  rt</strong> <em>
1a30: 66 69 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64  filename</em></d
1a40: 74 3e 0a 09 3c 64 64 3e 50 72 6f 76 69 64 65 20  t>..<dd>Provide 
1a50: 74 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66 20  the contents of 
1a60: 61 20 63 65 72 74 69 66 69 63 61 74 65 20 74 6f  a certificate to
1a70: 20 75 73 65 2c 20 61 73 20 61 20 44 45 52 20 65   use, as a DER e
1a80: 6e 63 6f 64 65 64 20 62 69 6e 61 72 79 20 76 61  ncoded binary va
1a90: 6c 75 65 20 28 58 2e 35 30 39 20 44 45 52 29 2e  lue (X.509 DER).
1aa0: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
1ab0: 6e 67 3e 2d 63 69 70 68 65 72 20 3c 2f 73 74 72  ng>-cipher </str
1ac0: 6f 6e 67 3e 3c 65 6d 3e 73 74 72 69 6e 67 3c 2f  ong><em>string</
1ad0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 50 72  em></dt>..<dd>Pr
1ae0: 6f 76 69 64 65 20 74 68 65 20 63 69 70 68 65 72  ovide the cipher
1af0: 20 73 75 69 74 65 73 20 74 6f 20 75 73 65 2e 20   suites to use. 
1b00: 53 79 6e 74 61 78 20 69 73 20 61 73 20 70 65 72  Syntax is as per
1b10: 0a 09 20 20 20 20 4f 70 65 6e 53 53 4c 2e 3c 2f  ..    OpenSSL.</
1b20: 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67  dd>..<dt><strong
1b30: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e  >-command</stron
1b40: 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c  g> <em>callback<
1b50: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 49  /em></dt>..<dd>I
1b60: 66 20 73 70 65 63 69 66 69 65 64 2c 20 74 68 69  f specified, thi
1b70: 73 20 63 61 6c 6c 62 61 63 6b 20 77 69 6c 6c 20  s callback will 
1b80: 62 65 20 69 6e 76 6f 6b 65 64 20 61 74 20 73 65  be invoked at se
1b90: 76 65 72 61 6c 20 70 6f 69 6e 74 73 0a 09 20 20  veral points..  
1ba0: 20 20 64 75 72 69 6e 67 20 74 68 65 20 4f 70 65    during the Ope
1bb0: 6e 53 53 4c 20 68 61 6e 64 73 68 61 6b 65 2e 20  nSSL handshake. 
1bc0: 20 49 74 20 63 61 6e 20 70 61 73 73 20 65 72 72   It can pass err
1bd0: 6f 72 73 20 61 6e 64 20 74 72 61 63 69 6e 67 0a  ors and tracing.
1be0: 09 20 20 20 20 69 6e 66 6f 72 6d 61 74 69 6f 6e  .    information
1bf0: 2c 20 61 6e 64 20 69 74 20 63 61 6e 20 61 6c 6c  , and it can all
1c00: 6f 77 20 54 63 6c 20 73 63 72 69 70 74 73 20 74  ow Tcl scripts t
1c10: 6f 20 70 65 72 66 6f 72 6d 0a 09 20 20 20 20 74  o perform..    t
1c20: 68 65 69 72 20 6f 77 6e 20 76 61 6c 69 64 61 74  heir own validat
1c30: 69 6f 6e 20 6f 66 20 74 68 65 20 63 65 72 74 69  ion of the certi
1c40: 66 69 63 61 74 65 20 69 6e 20 70 6c 61 63 65 20  ficate in place 
1c50: 6f 66 20 74 68 65 0a 09 20 20 20 20 64 65 66 61  of the..    defa
1c60: 75 6c 74 20 76 61 6c 69 64 61 74 69 6f 6e 20 70  ult validation p
1c70: 72 6f 76 69 64 65 64 20 62 79 20 4f 70 65 6e 53  rovided by OpenS
1c80: 53 4c 2e 0a 09 20 20 20 20 3c 62 72 3e 0a 09 20  SL...    <br>.. 
1c90: 20 20 20 53 65 65 20 3c 61 20 68 72 65 66 3d 22     See <a href="
1ca0: 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49 4f 4e  #CALLBACK OPTION
1cb0: 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f 50 54 49  S">CALLBACK OPTI
1cc0: 4f 4e 53 3c 2f 61 3e 20 66 6f 72 0a 09 20 20 20  ONS</a> for..   
1cd0: 20 66 75 72 74 68 65 72 20 64 69 73 63 75 73 73   further discuss
1ce0: 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c  ion.</dd>..<dt><
1cf0: 73 74 72 6f 6e 67 3e 2d 64 68 70 61 72 61 6d 73  strong>-dhparams
1d00: 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e 66 69   </strong><em>fi
1d10: 6c 65 6e 61 6d 65 3c 2f 65 6d 3e 3c 2f 64 74 3e  lename</em></dt>
1d20: 0a 09 3c 64 64 3e 50 72 6f 76 69 64 65 20 61 20  ..<dd>Provide a 
1d30: 44 69 66 66 69 65 2d 48 65 6c 6c 6d 61 6e 20 70  Diffie-Hellman p
1d40: 61 72 61 6d 65 74 65 72 73 20 66 69 6c 65 2e 3c  arameters file.<
1d50: 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e  /dd>..<dt><stron
1d60: 67 3e 2d 6b 65 79 66 69 6c 65 3c 2f 73 74 72 6f  g>-keyfile</stro
1d70: 6e 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65  ng> <em>filename
1d80: 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e  </em></dt>..<dd>
1d90: 50 72 6f 76 69 64 65 20 74 68 65 20 70 72 69 76  Provide the priv
1da0: 61 74 65 20 6b 65 79 20 66 69 6c 65 2e 20 28 64  ate key file. (d
1db0: 65 66 61 75 6c 74 20 69 73 0a 09 20 20 20 20 76  efault is..    v
1dc0: 61 6c 75 65 20 6f 66 20 2d 63 65 72 74 66 69 6c  alue of -certfil
1dd0: 65 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74  e)</dd>..<dt><st
1de0: 72 6f 6e 67 3e 2d 6b 65 79 3c 2f 73 74 72 6f 6e  rong>-key</stron
1df0: 67 3e 20 3c 65 6d 3e 66 69 6c 65 6e 61 6d 65 3c  g> <em>filename<
1e00: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 50  /em></dt>..<dd>P
1e10: 72 6f 76 69 64 65 20 74 68 65 20 70 72 69 76 61  rovide the priva
1e20: 74 65 20 6b 65 79 20 74 6f 20 75 73 65 20 61 73  te key to use as
1e30: 20 61 20 44 45 52 20 65 6e 63 6f 64 65 64 20 76   a DER encoded v
1e40: 61 6c 75 65 20 28 50 4b 43 53 23 31 20 44 45 52  alue (PKCS#1 DER
1e50: 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72  )</dd>..<dt><str
1e60: 6f 6e 67 3e 2d 6d 6f 64 65 6c 3c 2f 73 74 72 6f  ong>-model</stro
1e70: 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c  ng> <em>channel<
1e80: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 54  /em></dt>..<dd>T
1e90: 68 69 73 20 77 69 6c 6c 20 66 6f 72 63 65 20 74  his will force t
1ea0: 68 69 73 20 63 68 61 6e 6e 65 6c 20 74 6f 20 73  his channel to s
1eb0: 68 61 72 65 20 74 68 65 20 73 61 6d 65 20 3c 65  hare the same <e
1ec0: 6d 3e 3c 73 74 72 6f 6e 67 3e 53 53 4c 5f 43 54  m><strong>SSL_CT
1ed0: 58 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 65 6d 3e 0a  X</strong></em>.
1ee0: 09 20 20 20 20 73 74 72 75 63 74 75 72 65 20 61  .    structure a
1ef0: 73 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20  s the specified 
1f00: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 3c 2f 65 6d 3e  <em>channel</em>
1f10: 2c 20 61 6e 64 0a 09 20 20 20 20 74 68 65 72 65  , and..    there
1f20: 66 6f 72 65 20 73 68 61 72 65 20 63 61 6c 6c 62  fore share callb
1f30: 61 63 6b 73 20 65 74 63 2e 3c 2f 64 64 3e 0a 09  acks etc.</dd>..
1f40: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 70 61 73  <dt><strong>-pas
1f50: 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c  sword</strong> <
1f60: 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e  em>callback</em>
1f70: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 49 66 20 73 75  </dt>..<dd>If su
1f80: 70 70 6c 69 65 64 2c 20 74 68 69 73 20 63 61 6c  pplied, this cal
1f90: 6c 62 61 63 6b 20 77 69 6c 6c 20 62 65 20 69 6e  lback will be in
1fa0: 76 6f 6b 65 64 20 77 68 65 6e 20 4f 70 65 6e 53  voked when OpenS
1fb0: 53 4c 20 6e 65 65 64 73 0a 09 20 20 20 20 74 6f  SL needs..    to
1fc0: 20 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77 6f   obtain a passwo
1fd0: 72 64 2c 20 74 79 70 69 63 61 6c 6c 79 20 74 6f  rd, typically to
1fe0: 20 75 6e 6c 6f 63 6b 20 74 68 65 20 70 72 69 76   unlock the priv
1ff0: 61 74 65 20 6b 65 79 20 6f 66 0a 09 20 20 20 20  ate key of..    
2000: 61 20 63 65 72 74 69 66 69 63 61 74 65 2e 0a 09  a certificate...
2010: 20 20 20 20 54 68 65 20 63 61 6c 6c 62 61 63 6b      The callback
2020: 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e 20 61   should return a
2030: 20 73 74 72 69 6e 67 20 77 68 69 63 68 20 72 65   string which re
2040: 70 72 65 73 65 6e 74 73 20 74 68 65 0a 09 20 20  presents the..  
2050: 20 20 70 61 73 73 77 6f 72 64 20 74 6f 20 62 65    password to be
2060: 20 75 73 65 64 2e 0a 09 20 20 20 20 3c 62 72 3e   used...    <br>
2070: 0a 09 20 20 20 20 53 65 65 20 3c 61 20 68 72 65  ..    See <a hre
2080: 66 3d 22 23 43 41 4c 4c 42 41 43 4b 20 4f 50 54  f="#CALLBACK OPT
2090: 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43 4b 20 4f  IONS">CALLBACK O
20a0: 50 54 49 4f 4e 53 3c 2f 61 3e 20 66 6f 72 0a 09  PTIONS</a> for..
20b0: 20 20 20 20 66 75 72 74 68 65 72 20 64 69 73 63      further disc
20c0: 75 73 73 69 6f 6e 2e 3c 2f 64 64 3e 0a 09 3c 64  ussion.</dd>..<d
20d0: 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65 71 75 65  t><strong>-reque
20e0: 73 74 20 3c 2f 73 74 72 6f 6e 67 3e 3c 65 6d 3e  st </strong><em>
20f0: 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09  bool</em></dt>..
2100: 3c 64 64 3e 52 65 71 75 65 73 74 20 61 20 63 65  <dd>Request a ce
2110: 72 74 69 66 69 63 61 74 65 20 66 72 6f 6d 20 70  rtificate from p
2120: 65 65 72 20 64 75 72 69 6e 67 20 53 53 4c 20 68  eer during SSL h
2130: 61 6e 64 73 68 61 6b 65 2e 0a 09 20 20 20 20 28  andshake...    (
2140: 64 65 66 61 75 6c 74 20 69 73 20 20 3c 65 6d 3e  default is  <em>
2150: 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a  true</em>)</dd>.
2160: 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 72 65  .<dt><strong>-re
2170: 71 75 69 72 65 3c 2f 73 74 72 6f 6e 67 3e 20 3c  quire</strong> <
2180: 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74  em>bool</em></dt
2190: 3e 0a 09 3c 64 64 3e 52 65 71 75 69 72 65 20 61  >..<dd>Require a
21a0: 20 76 61 6c 69 64 20 63 65 72 74 69 66 69 63 61   valid certifica
21b0: 74 65 20 66 72 6f 6d 20 70 65 65 72 20 64 75 72  te from peer dur
21c0: 69 6e 67 20 53 53 4c 0a 09 20 20 20 20 68 61 6e  ing SSL..    han
21d0: 64 73 68 61 6b 65 2e 20 49 66 20 74 68 69 73 20  dshake. If this 
21e0: 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 20 74  is set to true t
21f0: 68 65 6e 20 3c 73 74 72 6f 6e 67 3e 2d 72 65 71  hen <strong>-req
2200: 75 65 73 74 3c 2f 73 74 72 6f 6e 67 3e 0a 09 20  uest</strong>.. 
2210: 20 20 20 6d 75 73 74 20 61 6c 73 6f 20 62 65 20     must also be 
2220: 73 65 74 20 74 6f 20 74 72 75 65 2e 20 28 64 65  set to true. (de
2230: 66 61 75 6c 74 20 69 73 20 20 3c 65 6d 3e 66 61  fault is  <em>fa
2240: 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09  lse</em>)</dd>..
2250: 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d 73 65 72  <dt><strong>-ser
2260: 76 65 72 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ver</strong> <em
2270: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >bool</em></dt>.
2280: 09 3c 64 64 3e 48 61 6e 64 73 68 61 6b 65 20 61  .<dd>Handshake a
2290: 73 20 73 65 72 76 65 72 20 69 66 20 74 72 75 65  s server if true
22a0: 2c 20 65 6c 73 65 20 68 61 6e 64 73 68 61 6b 65  , else handshake
22b0: 20 61 73 0a 09 20 20 20 20 63 6c 69 65 6e 74 2e   as..    client.
22c0: 28 64 65 66 61 75 6c 74 20 69 73 20 20 3c 65 6d  (default is  <em
22d0: 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64  >false</em>)</dd
22e0: 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f 6e 67 3e 2d  >..<dt><strong>-
22f0: 73 65 72 76 65 72 6e 61 6d 65 3c 2f 73 74 72 6f  servername</stro
2300: 6e 67 3e 20 3c 65 6d 3e 68 6f 73 74 3c 2f 65 6d  ng> <em>host</em
2310: 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 4f 6e 6c 79  ></dt>..<dd>Only
2320: 20 61 76 61 69 6c 61 62 6c 65 20 69 66 20 74 68   available if th
2330: 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72  e OpenSSL librar
2340: 79 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 73  y the package is
2350: 20 6c 69 6e 6b 65 64 0a 09 20 20 20 20 61 67 61   linked..    aga
2360: 69 6e 73 74 20 73 75 70 70 6f 72 74 73 20 74 68  inst supports th
2370: 65 20 54 4c 53 20 68 6f 73 74 6e 61 6d 65 20 65  e TLS hostname e
2380: 78 74 65 6e 73 69 6f 6e 20 66 6f 72 20 27 53 65  xtension for 'Se
2390: 72 76 65 72 20 4e 61 6d 65 0a 09 20 20 20 20 49  rver Name..    I
23a0: 6e 64 69 63 61 74 69 6f 6e 27 20 28 53 4e 49 29  ndication' (SNI)
23b0: 2e 20 55 73 65 20 74 6f 20 6e 61 6d 65 20 74 68  . Use to name th
23c0: 65 20 6c 6f 67 69 63 61 6c 20 68 6f 73 74 20 77  e logical host w
23d0: 65 20 61 72 65 20 74 61 6c 6b 69 6e 67 0a 09 20  e are talking.. 
23e0: 20 20 20 74 6f 20 61 6e 64 20 65 78 70 65 63 74     to and expect
23f0: 69 6e 67 20 61 20 63 65 72 74 69 66 69 63 61 74  ing a certificat
2400: 65 20 66 6f 72 3c 2f 64 64 3e 0a 09 3c 64 74 3e  e for</dd>..<dt>
2410: 3c 73 74 72 6f 6e 67 3e 2d 73 73 6c 32 3c 2f 73  <strong>-ssl2</s
2420: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c  trong> <em>bool<
2430: 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45  /em></dt>..<dd>E
2440: 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 53 53 4c  nable use of SSL
2450: 20 76 32 2e 20 28 64 65 66 61 75 6c 74 20 69 73   v2. (default is
2460: 20 3c 65 6d 3e 66 61 6c 73 65 3c 2f 65 6d 3e 29   <em>false</em>)
2470: 3c 2f 64 64 3e 0a 09 3c 64 74 3e 3c 73 74 72 6f  </dd>..<dt><stro
2480: 6e 67 3e 2d 73 73 6c 33 20 3c 2f 73 74 72 6f 6e  ng>-ssl3 </stron
2490: 67 3e 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c  g><em>bool</em><
24a0: 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c 65  /dt>..<dd>Enable
24b0: 20 75 73 65 20 6f 66 20 53 53 4c 20 76 33 2e 20   use of SSL v3. 
24c0: 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65 6d 3e  (default is <em>
24d0: 66 61 6c 73 65 3c 2f 65 6d 3e 29 3c 2f 64 64 3e  false</em>)</dd>
24e0: 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f 6e 67 3e 74  ..<dt>-<strong>t
24f0: 6c 73 31 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d  ls1</strong> <em
2500: 3e 62 6f 6f 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a  >bool</em></dt>.
2510: 09 3c 64 64 3e 45 6e 61 62 6c 65 20 75 73 65 20  .<dd>Enable use 
2520: 6f 66 20 54 4c 53 20 76 31 2e 20 28 64 65 66 61  of TLS v1. (defa
2530: 75 6c 74 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c  ult is <em>true<
2540: 2f 65 6d 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e  /em>)</dd>..<dt>
2550: 2d 3c 73 74 72 6f 6e 67 3e 74 6c 73 31 2e 31 3c  -<strong>tls1.1<
2560: 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f  /strong> <em>boo
2570: 6c 3c 2f 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64  l</em></dt>..<dd
2580: 3e 45 6e 61 62 6c 65 20 75 73 65 20 6f 66 20 54  >Enable use of T
2590: 4c 53 20 76 31 2e 31 20 28 64 65 66 61 75 6c 74  LS v1.1 (default
25a0: 20 69 73 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d   is <em>true</em
25b0: 3e 29 3c 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73  >)</dd>..<dt>-<s
25c0: 74 72 6f 6e 67 3e 74 6c 73 31 2e 32 3c 2f 73 74  trong>tls1.2</st
25d0: 72 6f 6e 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f  rong> <em>bool</
25e0: 65 6d 3e 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e  em></dt>..<dd>En
25f0: 61 62 6c 65 20 75 73 65 20 6f 66 20 54 4c 53 20  able use of TLS 
2600: 76 31 2e 32 20 28 64 65 66 61 75 6c 74 20 69 73  v1.2 (default is
2610: 20 3c 65 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c   <em>true</em>)<
2620: 2f 64 64 3e 0a 09 3c 64 74 3e 2d 3c 73 74 72 6f  /dd>..<dt>-<stro
2630: 6e 67 3e 74 6c 73 31 2e 33 3c 2f 73 74 72 6f 6e  ng>tls1.3</stron
2640: 67 3e 20 3c 65 6d 3e 62 6f 6f 6c 3c 2f 65 6d 3e  g> <em>bool</em>
2650: 3c 2f 64 74 3e 0a 09 3c 64 64 3e 45 6e 61 62 6c  </dt>..<dd>Enabl
2660: 65 20 75 73 65 20 6f 66 20 54 4c 53 20 76 31 2e  e use of TLS v1.
2670: 33 20 28 64 65 66 61 75 6c 74 20 69 73 20 3c 65  3 (default is <e
2680: 6d 3e 74 72 75 65 3c 2f 65 6d 3e 29 3c 2f 64 64  m>true</em>)</dd
2690: 3e 0a 20 20 20 20 3c 2f 64 6c 3e 0a 3c 2f 62 6c  >.    </dl>.</bl
26a0: 6f 63 6b 71 75 6f 74 65 3e 0a 0a 3c 64 6c 3e 0a  ockquote>..<dl>.
26b0: 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65 3d      <dt><a name=
26c0: 22 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74 22 3e  "tls::unimport">
26d0: 3c 62 3e 74 6c 73 3a 3a 75 6e 69 6d 70 6f 72 74  <b>tls::unimport
26e0: 3c 2f 62 3e 20 3c 69 3e 63 68 61 6e 6e 65 6c 3c  </b> <i>channel<
26f0: 2f 69 3e 3c 2f 61 3e 3c 2f 64 74 3e 0a 20 20 20  /i></a></dt>.   
2700: 20 3c 64 64 3e 50 72 6f 76 69 64 65 64 20 66 6f   <dd>Provided fo
2710: 72 20 73 79 6d 6d 65 74 72 79 20 74 6f 20 3c 73  r symmetry to <s
2720: 74 72 6f 6e 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72  trong>tls::impor
2730: 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 74 68 69 73  t</strong>, this
2740: 0a 20 20 20 20 20 20 75 6e 73 74 61 63 6b 73 20  .      unstacks 
2750: 74 68 65 20 53 53 4c 2d 65 6e 61 62 6c 69 6e 67  the SSL-enabling
2760: 20 6f 66 20 61 20 72 65 67 75 6c 61 72 20 54 63   of a regular Tc
2770: 6c 20 63 68 61 6e 6e 65 6c 2e 20 20 41 6e 20 65  l channel.  An e
2780: 72 72 6f 72 0a 20 20 20 20 20 20 69 73 20 74 68  rror.      is th
2790: 72 6f 77 6e 20 69 66 20 54 4c 53 20 69 73 20 6e  rown if TLS is n
27a0: 6f 74 20 74 68 65 20 74 6f 70 20 73 74 61 63 6b  ot the top stack
27b0: 65 64 20 63 68 61 6e 6e 65 6c 20 74 79 70 65 2e  ed channel type.
27c0: 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 64 6c  </dd>.</dl>..<dl
27d0: 3e 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d  >.    <dt><a nam
27e0: 65 3d 22 74 6c 73 3a 3a 63 69 70 68 65 72 73 20  e="tls::ciphers 
27f0: 70 72 6f 74 6f 63 6f 6c 20 3f 76 65 72 62 6f 73  protocol ?verbos
2800: 65 3f 22 3e 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  e?"><strong>tls:
2810: 3a 63 69 70 68 65 72 73 3c 2f 73 74 72 6f 6e 67  :ciphers</strong
2820: 3e 0a 09 3c 65 6d 3e 70 72 6f 74 6f 63 6f 6c 20  >..<em>protocol 
2830: 3f 76 65 72 62 6f 73 65 3f 3c 2f 65 6d 3e 3c 2f  ?verbose?</em></
2840: 61 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e  a></dt>.    <dd>
2850: 52 65 74 75 72 6e 73 20 6c 69 73 74 20 6f 66 20  Returns list of 
2860: 73 75 70 70 6f 72 74 65 64 20 63 69 70 68 65 72  supported cipher
2870: 73 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 3c  s based on the <
2880: 65 6d 3e 70 72 6f 74 6f 63 6f 6c 3c 2f 65 6d 3e  em>protocol</em>
2890: 0a 09 79 6f 75 20 73 75 70 70 6c 79 2c 20 77 68  ..you supply, wh
28a0: 69 63 68 20 6d 75 73 74 20 62 65 20 6f 6e 65 20  ich must be one 
28b0: 6f 66 20 3c 65 6d 3e 73 73 6c 32 2c 20 73 73 6c  of <em>ssl2, ssl
28c0: 33 2c 20 6f 72 20 74 6c 73 31 3c 2f 65 6d 3e 2e  3, or tls1</em>.
28d0: 0a 09 49 66 20 3c 65 6d 3e 76 65 72 62 6f 73 65  ..If <em>verbose
28e0: 3c 2f 65 6d 3e 20 69 73 20 73 70 65 63 69 66 69  </em> is specifi
28f0: 65 64 20 61 73 20 74 72 75 65 20 74 68 65 6e 20  ed as true then 
2900: 61 20 76 65 72 62 6f 73 65 2c 0a 09 73 65 6d 69  a verbose,..semi
2910: 2d 68 75 6d 61 6e 20 72 65 61 64 61 62 6c 65 20  -human readable 
2920: 6c 69 73 74 20 69 73 20 72 65 74 75 72 6e 65 64  list is returned
2930: 20 70 72 6f 76 69 64 69 6e 67 20 61 64 64 69 74   providing addit
2940: 69 6f 6e 61 6c 0a 09 69 6e 66 6f 72 6d 61 74 69  ional..informati
2950: 6f 6e 20 6f 6e 20 74 68 65 20 6e 61 74 75 72 65  on on the nature
2960: 20 6f 66 20 74 68 65 20 63 69 70 68 65 72 20 73   of the cipher s
2970: 75 70 70 6f 72 74 2e 20 49 6e 20 65 61 63 68 0a  upport. In each.
2980: 09 63 61 73 65 20 74 68 65 20 72 65 73 75 6c 74  .case the result
2990: 20 69 73 20 61 20 54 63 6c 20 6c 69 73 74 2e 3c   is a Tcl list.<
29a0: 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 64 6c 3e  /dd>.</dl>..<dl>
29b0: 0a 20 20 20 20 3c 64 74 3e 3c 61 20 6e 61 6d 65  .    <dt><a name
29c0: 3d 22 74 6c 73 3a 3a 76 65 72 73 69 6f 6e 22 3e  ="tls::version">
29d0: 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 76 65 72  <strong>tls::ver
29e0: 73 69 6f 6e 3c 2f 73 74 72 6f 6e 67 3e 3c 2f 61  sion</strong></a
29f0: 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64 64 3e 52  ></dt>.    <dd>R
2a00: 65 74 75 72 6e 73 20 74 68 65 20 76 65 72 73 69  eturns the versi
2a10: 6f 6e 20 73 74 72 69 6e 67 20 64 65 66 69 6e 65  on string define
2a20: 64 20 62 79 20 4f 70 65 6e 53 53 4c 2e 3c 2f 64  d by OpenSSL.</d
2a30: 64 3e 0a 3c 2f 64 6c 3e 0a 0a 3c 68 33 3e 3c 61  d>.</dl>..<h3><a
2a40: 20 6e 61 6d 65 3d 22 43 41 4c 4c 42 41 43 4b 20   name="CALLBACK 
2a50: 4f 50 54 49 4f 4e 53 22 3e 43 41 4c 4c 42 41 43  OPTIONS">CALLBAC
2a60: 4b 20 4f 50 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68  K OPTIONS</a></h
2a70: 33 3e 0a 0a 3c 70 3e 0a 41 73 20 69 6e 64 69 63  3>..<p>.As indic
2a80: 61 74 65 64 20 61 62 6f 76 65 2c 20 69 6e 64 69  ated above, indi
2a90: 76 69 64 75 61 6c 20 63 68 61 6e 6e 65 6c 73 20  vidual channels 
2aa0: 63 61 6e 20 62 65 20 67 69 76 65 6e 20 74 68 65  can be given the
2ab0: 69 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 73  ir own callbacks
2ac0: 0a 74 6f 20 68 61 6e 64 6c 65 20 69 6e 74 65 72  .to handle inter
2ad0: 6d 65 64 69 61 74 65 20 70 72 6f 63 65 73 73 69  mediate processi
2ae0: 6e 67 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53  ng by the OpenSS
2af0: 4c 20 6c 69 62 72 61 72 79 2c 20 75 73 69 6e 67  L library, using
2b00: 20 74 68 65 0a 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e   the.<em>-comman
2b10: 64 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e 2d  d</em> and <em>-
2b20: 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70  password</em> op
2b30: 74 69 6f 6e 73 20 70 61 73 73 65 64 20 74 6f 20  tions passed to 
2b40: 65 69 74 68 65 72 20 6f 66 0a 3c 73 74 72 6f 6e  either of.<stron
2b50: 67 3e 74 6c 73 3a 3a 73 6f 63 6b 65 74 3c 2f 73  g>tls::socket</s
2b60: 74 72 6f 6e 67 3e 20 6f 72 20 3c 73 74 72 6f 6e  trong> or <stron
2b70: 67 3e 74 6c 73 3a 3a 69 6d 70 6f 72 74 3c 2f 73  g>tls::import</s
2b80: 74 72 6f 6e 67 3e 2e 0a 3c 2f 70 3e 0a 0a 3c 62  trong>..</p>..<b
2b90: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 3c 64 6c 3e 0a  lockquote>.<dl>.
2ba0: 0a 20 20 20 20 3c 64 74 3e 3c 73 74 72 6f 6e 67  .    <dt><strong
2bb0: 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 73 74 72 6f 6e  >-command</stron
2bc0: 67 3e 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c  g> <em>callback<
2bd0: 2f 65 6d 3e 3c 2f 64 74 3e 0a 20 20 20 20 3c 64  /em></dt>.    <d
2be0: 64 3e 0a 09 49 6e 76 6f 6b 65 73 20 74 68 65 20  d>..Invokes the 
2bf0: 73 70 65 63 69 66 69 65 64 20 3c 65 6d 3e 63 61  specified <em>ca
2c00: 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 20 73 63 72 69  llback</em> scri
2c10: 70 74 20 61 74 0a 09 73 65 76 65 72 61 6c 20 70  pt at..several p
2c20: 6f 69 6e 74 73 20 64 75 72 69 6e 67 20 74 68 65  oints during the
2c30: 20 4f 70 65 6e 53 53 4c 20 68 61 6e 64 73 68 61   OpenSSL handsha
2c40: 6b 65 2e 0a 09 45 78 63 65 70 74 20 61 73 20 69  ke...Except as i
2c50: 6e 64 69 63 61 74 65 64 20 62 65 6c 6f 77 2c 20  ndicated below, 
2c60: 76 61 6c 75 65 73 20 72 65 74 75 72 6e 65 64 20  values returned 
2c70: 66 72 6f 6d 20 74 68 65 0a 09 63 61 6c 6c 62 61  from the..callba
2c80: 63 6b 20 61 72 65 20 69 67 6e 6f 72 65 64 2e 0a  ck are ignored..
2c90: 09 41 72 67 75 6d 65 6e 74 73 20 61 70 70 65 6e  .Arguments appen
2ca0: 64 65 64 20 74 6f 20 74 68 65 20 73 63 72 69 70  ded to the scrip
2cb0: 74 20 75 70 6f 6e 20 63 61 6c 6c 62 61 63 6b 20  t upon callback 
2cc0: 74 61 6b 65 20 6f 6e 65 20 6f 66 20 74 68 65 0a  take one of the.
2cd0: 09 66 6f 6c 6c 6f 77 69 6e 67 20 66 6f 72 6d 73  .following forms
2ce0: 3a 0a 0a 09 3c 62 72 3e 0a 09 3c 62 72 3e 0a 0a  :...<br>..<br>..
2cf0: 09 3c 64 6c 3e 0a 0a 3c 21 2d 2d 09 54 68 69 73  .<dl>..<!--.This
2d00: 20 66 6f 72 6d 20 6f 66 20 63 61 6c 6c 62 61 63   form of callbac
2d10: 6b 20 69 73 20 64 69 73 61 62 6c 65 64 2e 0a 0a  k is disabled...
2d20: 09 3c 64 74 3e 0a 09 20 20 3c 73 74 72 6f 6e 67  .<dt>..  <strong
2d30: 3e 65 72 72 6f 72 3c 2f 73 74 72 6f 6e 67 3e 20  >error</strong> 
2d40: 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 6d 65 73 73  <em>channel mess
2d50: 61 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a  age</em>..</dt>.
2d60: 09 3c 64 64 3e 0a 09 20 20 54 68 65 20 3c 65 6d  .<dd>..  The <em
2d70: 3e 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72  >message</em> ar
2d80: 67 75 6d 65 6e 74 20 63 6f 6e 74 61 69 6e 73 20  gument contains 
2d90: 61 6e 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65  an error message
2da0: 20 67 65 6e 65 72 61 74 65 64 0a 09 20 20 62 79   generated..  by
2db0: 20 74 68 65 20 4f 70 65 6e 53 53 4c 20 66 75 6e   the OpenSSL fun
2dc0: 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64 65 3e 45  ction..  <code>E
2dd0: 52 52 5f 72 65 61 73 6f 6e 5f 65 72 72 6f 72 5f  RR_reason_error_
2de0: 73 74 72 69 6e 67 28 29 3c 2f 63 6f 64 65 3e 2e  string()</code>.
2df0: 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 62 72 3e 0a 2d  ..</dd>...<br>.-
2e00: 2d 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c 73 74  ->...<dt>..  <st
2e10: 72 6f 6e 67 3e 69 6e 66 6f 3c 2f 73 74 72 6f 6e  rong>info</stron
2e20: 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e 65 6c 20 6d  g> <em>channel m
2e30: 61 6a 6f 72 20 6d 69 6e 6f 72 20 6d 65 73 73 61  ajor minor messa
2e40: 67 65 3c 2f 65 6d 3e 0a 09 3c 2f 64 74 3e 0a 09  ge</em>..</dt>..
2e50: 3c 64 64 3e 0a 09 20 20 54 68 69 73 20 66 6f 72  <dd>..  This for
2e60: 6d 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 69 73  m of callback is
2e70: 20 69 6e 76 6f 6b 65 64 20 62 79 20 74 68 65 20   invoked by the 
2e80: 4f 70 65 6e 53 53 4c 20 66 75 6e 63 74 69 6f 6e  OpenSSL function
2e90: 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 43 54  ..  <code>SSL_CT
2ea0: 58 5f 73 65 74 5f 69 6e 66 6f 5f 63 61 6c 6c 62  X_set_info_callb
2eb0: 61 63 6b 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 20  ack()</code>... 
2ec0: 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d   <br>..  The <em
2ed0: 3e 6d 61 6a 6f 72 3c 2f 65 6d 3e 20 61 6e 64 20  >major</em> and 
2ee0: 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65 6d 3e 20 61  <em>minor</em> a
2ef0: 72 67 75 6d 65 6e 74 73 20 61 72 65 20 75 73 65  rguments are use
2f00: 64 20 74 6f 0a 09 20 20 72 65 70 72 65 73 65 6e  d to..  represen
2f10: 74 20 74 68 65 20 73 74 61 74 65 20 69 6e 66 6f  t the state info
2f20: 72 6d 61 74 69 6f 6e 20 62 69 74 6d 61 73 6b 2e  rmation bitmask.
2f30: 0a 09 20 20 3c 64 6c 3e 0a 09 20 20 3c 64 74 3e  ..  <dl>..  <dt>
2f40: 50 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20  Possible values 
2f50: 66 6f 72 20 3c 65 6d 3e 6d 61 6a 6f 72 3c 2f 65  for <em>major</e
2f60: 6d 3e 20 61 72 65 3a 3c 2f 64 74 3e 0a 09 20 20  m> are:</dt>..  
2f70: 3c 64 64 3e 3c 63 6f 64 65 3e 68 61 6e 64 73 68  <dd><code>handsh
2f80: 61 6b 65 2c 20 61 6c 65 72 74 2c 20 63 6f 6e 6e  ake, alert, conn
2f90: 65 63 74 2c 20 61 63 63 65 70 74 3c 2f 63 6f 64  ect, accept</cod
2fa0: 65 3e 2e 3c 2f 64 64 3e 0a 09 20 20 3c 64 74 3e  e>.</dd>..  <dt>
2fb0: 50 6f 73 73 69 62 6c 65 20 76 61 6c 75 65 73 20  Possible values 
2fc0: 66 6f 72 20 3c 65 6d 3e 6d 69 6e 6f 72 3c 2f 65  for <em>minor</e
2fd0: 6d 3e 20 61 72 65 3a 3c 2f 64 74 3e 0a 09 20 20  m> are:</dt>..  
2fe0: 3c 64 64 3e 3c 63 6f 64 65 3e 73 74 61 72 74 2c  <dd><code>start,
2ff0: 20 64 6f 6e 65 2c 20 72 65 61 64 2c 20 77 72 69   done, read, wri
3000: 74 65 2c 20 6c 6f 6f 70 2c 20 65 78 69 74 3c 2f  te, loop, exit</
3010: 63 6f 64 65 3e 2e 3c 2f 64 64 3e 0a 09 20 20 3c  code>.</dd>..  <
3020: 2f 64 6c 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e  /dl>..  The <em>
3030: 6d 65 73 73 61 67 65 3c 2f 65 6d 3e 20 61 72 67  message</em> arg
3040: 75 6d 65 6e 74 20 69 73 20 61 20 64 65 73 63 72  ument is a descr
3050: 69 70 74 69 76 65 20 73 74 72 69 6e 67 20 77 68  iptive string wh
3060: 69 63 68 20 6d 61 79 0a 09 20 20 62 65 20 67 65  ich may..  be ge
3070: 6e 65 72 61 74 65 64 20 65 69 74 68 65 72 20 62  nerated either b
3080: 79 0a 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 73  y..  <code>SSL_s
3090: 74 61 74 65 5f 73 74 72 69 6e 67 5f 6c 6f 6e 67  tate_string_long
30a0: 28 29 3c 2f 63 6f 64 65 3e 20 6f 72 20 62 79 0a  ()</code> or by.
30b0: 09 20 20 3c 63 6f 64 65 3e 53 53 4c 5f 61 6c 65  .  <code>SSL_ale
30c0: 72 74 5f 64 65 73 63 5f 73 74 72 69 6e 67 5f 6c  rt_desc_string_l
30d0: 6f 6e 67 28 29 3c 2f 63 6f 64 65 3e 2c 0a 09 20  ong()</code>,.. 
30e0: 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 6f   depending on co
30f0: 6e 74 65 78 74 2e 0a 09 3c 2f 64 64 3e 0a 0a 09  ntext...</dd>...
3100: 3c 62 72 3e 0a 0a 09 3c 64 74 3e 0a 09 20 20 3c  <br>...<dt>..  <
3110: 73 74 72 6f 6e 67 3e 76 65 72 69 66 79 3c 2f 73  strong>verify</s
3120: 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63 68 61 6e 6e  trong> <em>chann
3130: 65 6c 20 64 65 70 74 68 20 63 65 72 74 20 73 74  el depth cert st
3140: 61 74 75 73 20 65 72 72 6f 72 3c 2f 65 6d 3e 0a  atus error</em>.
3150: 09 3c 2f 64 74 3e 0a 09 3c 64 64 3e 0a 09 20 20  .</dt>..<dd>..  
3160: 54 68 69 73 20 66 6f 72 6d 20 6f 66 20 63 61 6c  This form of cal
3170: 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64  lback is invoked
3180: 20 62 79 20 74 68 65 20 4f 70 65 6e 53 53 4c 20   by the OpenSSL 
3190: 66 75 6e 63 74 69 6f 6e 0a 09 20 20 3c 63 6f 64  function..  <cod
31a0: 65 3e 53 53 4c 5f 73 65 74 5f 76 65 72 69 66 79  e>SSL_set_verify
31b0: 28 29 3c 2f 63 6f 64 65 3e 2e 0a 09 20 20 3c 62  ()</code>...  <b
31c0: 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 64 65  r>..  The <em>de
31d0: 70 74 68 3c 2f 65 6d 3e 20 61 72 67 75 6d 65 6e  pth</em> argumen
31e0: 74 20 69 73 20 61 6e 20 69 6e 74 65 67 65 72 20  t is an integer 
31f0: 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68 65  representing the
3200: 0a 09 20 20 63 75 72 72 65 6e 74 20 64 65 70 74  ..  current dept
3210: 68 20 6f 6e 20 74 68 65 20 63 65 72 74 69 66 69  h on the certifi
3220: 63 61 74 65 20 63 68 61 69 6e 2c 20 77 69 74 68  cate chain, with
3230: 0a 09 20 20 3c 63 6f 64 65 3e 30 3c 2f 63 6f 64  ..  <code>0</cod
3240: 65 3e 20 61 73 20 74 68 65 20 73 75 62 6a 65 63  e> as the subjec
3250: 74 20 63 65 72 74 69 66 69 63 61 74 65 20 61 6e  t certificate an
3260: 64 20 68 69 67 68 65 72 20 76 61 6c 75 65 73 0a  d higher values.
3270: 09 20 20 64 65 6e 6f 74 69 6e 67 20 70 72 6f 67  .  denoting prog
3280: 72 65 73 73 69 76 65 6c 79 20 6d 6f 72 65 20 69  ressively more i
3290: 6e 64 69 72 65 63 74 20 69 73 73 75 65 72 20 63  ndirect issuer c
32a0: 65 72 74 69 66 69 63 61 74 65 73 2e 0a 09 20 20  ertificates...  
32b0: 3c 62 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e  <br>..  The <em>
32c0: 63 65 72 74 3c 2f 65 6d 3e 20 61 72 67 75 6d 65  cert</em> argume
32d0: 6e 74 20 69 73 20 61 20 6c 69 73 74 20 6f 66 20  nt is a list of 
32e0: 6b 65 79 2d 76 61 6c 75 65 20 70 61 69 72 73 20  key-value pairs 
32f0: 73 69 6d 69 6c 61 72 0a 09 20 20 74 6f 20 74 68  similar..  to th
3300: 6f 73 65 20 72 65 74 75 72 6e 65 64 20 62 79 0a  ose returned by.
3310: 09 20 20 3c 61 20 68 72 65 66 3d 22 23 74 6c 73  .  <a href="#tls
3320: 3a 3a 73 74 61 74 75 73 22 3e 3c 73 74 72 6f 6e  ::status"><stron
3330: 67 3e 74 6c 73 3a 3a 73 74 61 74 75 73 3c 2f 73  g>tls::status</s
3340: 74 72 6f 6e 67 3e 3c 2f 61 3e 2e 0a 09 20 20 3c  trong></a>...  <
3350: 62 72 3e 0a 09 20 20 54 68 65 20 3c 65 6d 3e 73  br>..  The <em>s
3360: 74 61 74 75 73 3c 2f 65 6d 3e 20 61 72 67 75 6d  tatus</em> argum
3370: 65 6e 74 20 69 73 20 61 6e 20 69 6e 74 65 67 65  ent is an intege
3380: 72 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 74  r representing t
3390: 68 65 0a 09 20 20 63 75 72 72 65 6e 74 20 76 61  he..  current va
33a0: 6c 69 64 69 74 79 20 6f 66 20 74 68 65 20 63 65  lidity of the ce
33b0: 72 74 69 66 69 63 61 74 65 2e 0a 09 20 20 41 20  rtificate...  A 
33c0: 76 61 6c 75 65 20 6f 66 20 3c 63 6f 64 65 3e 30  value of <code>0
33d0: 3c 2f 63 6f 64 65 3e 20 6d 65 61 6e 73 20 74 68  </code> means th
33e0: 65 20 63 65 72 74 69 66 69 63 61 74 65 20 69 73  e certificate is
33f0: 20 64 65 65 6d 65 64 20 69 6e 76 61 6c 69 64 2e   deemed invalid.
3400: 0a 09 20 20 41 20 76 61 6c 75 65 20 6f 66 20 3c  ..  A value of <
3410: 63 6f 64 65 3e 31 3c 2f 63 6f 64 65 3e 20 6d 65  code>1</code> me
3420: 61 6e 73 20 74 68 65 20 63 65 72 74 69 66 69 63  ans the certific
3430: 61 74 65 20 69 73 20 64 65 65 6d 65 64 20 76 61  ate is deemed va
3440: 6c 69 64 2e 0a 09 20 20 3c 62 72 3e 0a 09 20 20  lid...  <br>..  
3450: 54 68 65 20 3c 65 6d 3e 65 72 72 6f 72 3c 2f 65  The <em>error</e
3460: 6d 3e 20 61 72 67 75 6d 65 6e 74 20 73 75 70 70  m> argument supp
3470: 6c 69 65 73 20 74 68 65 20 6d 65 73 73 61 67 65  lies the message
3480: 2c 20 69 66 20 61 6e 79 2c 20 67 65 6e 65 72 61  , if any, genera
3490: 74 65 64 0a 09 20 20 62 79 0a 09 20 20 3c 63 6f  ted..  by..  <co
34a0: 64 65 3e 58 35 30 39 5f 53 54 4f 52 45 5f 43 54  de>X509_STORE_CT
34b0: 58 5f 67 65 74 5f 65 72 72 6f 72 28 29 3c 2f 63  X_get_error()</c
34c0: 6f 64 65 3e 2e 0a 09 20 20 3c 62 72 3e 0a 09 20  ode>...  <br>.. 
34d0: 20 3c 62 72 3e 0a 09 20 20 54 68 65 20 63 61 6c   <br>..  The cal
34e0: 6c 62 61 63 6b 20 6d 61 79 20 6f 76 65 72 72 69  lback may overri
34f0: 64 65 20 6e 6f 72 6d 61 6c 20 76 61 6c 69 64 61  de normal valida
3500: 74 69 6f 6e 20 70 72 6f 63 65 73 73 69 6e 67 20  tion processing 
3510: 62 79 20 65 78 70 6c 69 63 69 74 6c 79 0a 09 20  by explicitly.. 
3520: 20 72 65 74 75 72 6e 69 6e 67 20 6f 6e 65 20 6f   returning one o
3530: 66 20 74 68 65 20 61 62 6f 76 65 20 3c 65 6d 3e  f the above <em>
3540: 73 74 61 74 75 73 3c 2f 65 6d 3e 20 76 61 6c 75  status</em> valu
3550: 65 73 2e 0a 09 3c 2f 64 64 3e 0a 0a 09 3c 2f 64  es...</dd>...</d
3560: 6c 3e 0a 20 20 20 20 3c 2f 64 64 3e 0a 0a 20 20  l>.    </dd>..  
3570: 20 20 3c 62 72 3e 0a 0a 20 20 20 20 3c 64 74 3e    <br>..    <dt>
3580: 3c 73 74 72 6f 6e 67 3e 2d 70 61 73 73 77 6f 72  <strong>-passwor
3590: 64 3c 2f 73 74 72 6f 6e 67 3e 20 3c 65 6d 3e 63  d</strong> <em>c
35a0: 61 6c 6c 62 61 63 6b 3c 2f 65 6d 3e 3c 2f 64 74  allback</em></dt
35b0: 3e 0a 20 20 20 20 3c 64 64 3e 0a 09 49 6e 76 6f  >.    <dd>..Invo
35c0: 6b 65 73 20 74 68 65 20 73 70 65 63 69 66 69 65  kes the specifie
35d0: 64 20 3c 65 6d 3e 63 61 6c 6c 62 61 63 6b 3c 2f  d <em>callback</
35e0: 65 6d 3e 20 73 63 72 69 70 74 20 77 68 65 6e 20  em> script when 
35f0: 4f 70 65 6e 53 53 4c 20 6e 65 65 64 73 20 74 6f  OpenSSL needs to
3600: 0a 09 6f 62 74 61 69 6e 20 61 20 70 61 73 73 77  ..obtain a passw
3610: 6f 72 64 2e 20 20 54 68 65 20 63 61 6c 6c 62 61  ord.  The callba
3620: 63 6b 20 73 68 6f 75 6c 64 20 72 65 74 75 72 6e  ck should return
3630: 20 61 20 73 74 72 69 6e 67 20 77 68 69 63 68 0a   a string which.
3640: 09 72 65 70 72 65 73 65 6e 74 73 20 74 68 65 20  .represents the 
3650: 70 61 73 73 77 6f 72 64 20 74 6f 20 62 65 20 75  password to be u
3660: 73 65 64 2e 0a 09 4e 6f 20 61 72 67 75 6d 65 6e  sed...No argumen
3670: 74 73 20 61 72 65 20 61 70 70 65 6e 64 65 64 20  ts are appended 
3680: 74 6f 20 74 68 65 20 73 63 72 69 70 74 20 75 70  to the script up
3690: 6f 6e 20 63 61 6c 6c 62 61 63 6b 2e 0a 20 20 20  on callback..   
36a0: 20 3c 2f 64 64 3e 0a 3c 2f 64 6c 3e 0a 3c 2f 62   </dd>.</dl>.</b
36b0: 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 3c 70 3e 0a  lockquote>..<p>.
36c0: 52 65 66 65 72 65 6e 63 65 20 69 6d 70 6c 65 6d  Reference implem
36d0: 65 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74 68 65  entations of the
36e0: 73 65 20 63 61 6c 6c 62 61 63 6b 73 20 61 72 65  se callbacks are
36f0: 20 70 72 6f 76 69 64 65 64 20 69 6e 20 74 68 65   provided in the
3700: 0a 64 69 73 74 72 69 62 75 74 69 6f 6e 20 61 73  .distribution as
3710: 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a 63 61   <strong>tls::ca
3720: 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e 67 3e 20  llback</strong> 
3730: 61 6e 64 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a  and.<strong>tls:
3740: 3a 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e  :password</stron
3750: 67 3e 20 72 65 73 70 65 63 74 69 76 65 6c 79 2e  g> respectively.
3760: 20 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 73    Note that thes
3770: 65 20 61 72 65 0a 3c 65 6d 3e 73 61 6d 70 6c 65  e are.<em>sample
3780: 3c 2f 65 6d 3e 20 69 6d 70 6c 65 6d 65 6e 74 61  </em> implementa
3790: 74 69 6f 6e 73 20 6f 6e 6c 79 2e 20 20 49 6e 20  tions only.  In 
37a0: 61 20 6d 6f 72 65 20 72 65 61 6c 69 73 74 69 63  a more realistic
37b0: 20 64 65 70 6c 6f 79 6d 65 6e 74 0a 79 6f 75 20   deployment.you 
37c0: 77 6f 75 6c 64 20 73 70 65 63 69 66 79 20 79 6f  would specify yo
37d0: 75 72 20 6f 77 6e 20 63 61 6c 6c 62 61 63 6b 20  ur own callback 
37e0: 73 63 72 69 70 74 73 20 6f 6e 20 65 61 63 68 20  scripts on each 
37f0: 54 4c 53 20 63 68 61 6e 6e 65 6c 0a 75 73 69 6e  TLS channel.usin
3800: 67 20 74 68 65 20 3c 65 6d 3e 2d 63 6f 6d 6d 61  g the <em>-comma
3810: 6e 64 3c 2f 65 6d 3e 20 61 6e 64 20 3c 65 6d 3e  nd</em> and <em>
3820: 2d 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f  -password</em> o
3830: 70 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a 3c 70  ptions..</p>..<p
3840: 3e 0a 54 68 65 20 64 65 66 61 75 6c 74 20 62 65  >.The default be
3850: 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20  havior when the 
3860: 3c 65 6d 3e 2d 63 6f 6d 6d 61 6e 64 3c 2f 65 6d  <em>-command</em
3870: 3e 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20  > option is not 
3880: 73 70 65 63 69 66 69 65 64 20 69 73 20 66 6f 72  specified is for
3890: 0a 54 4c 53 20 74 6f 20 70 72 6f 63 65 73 73 20  .TLS to process 
38a0: 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 6c  the associated l
38b0: 69 62 72 61 72 79 20 63 61 6c 6c 62 61 63 6b 73  ibrary callbacks
38c0: 20 69 6e 74 65 72 6e 61 6c 6c 79 2e 0a 54 68 65   internally..The
38d0: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f   default behavio
38e0: 72 20 77 68 65 6e 20 74 68 65 20 3c 65 6d 3e 2d  r when the <em>-
38f0: 70 61 73 73 77 6f 72 64 3c 2f 65 6d 3e 20 6f 70  password</em> op
3900: 74 69 6f 6e 20 69 73 20 6e 6f 74 20 73 70 65 63  tion is not spec
3910: 69 66 69 65 64 20 69 73 20 66 6f 72 0a 54 4c 53  ified is for.TLS
3920: 20 74 6f 20 70 72 6f 63 65 73 73 20 74 68 65 20   to process the 
3930: 61 73 73 6f 63 69 61 74 65 64 20 6c 69 62 72 61  associated libra
3940: 72 79 20 63 61 6c 6c 62 61 63 6b 73 20 62 79 20  ry callbacks by 
3950: 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 63 61  attempting to ca
3960: 6c 6c 0a 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a 3a  ll.<strong>tls::
3970: 70 61 73 73 77 6f 72 64 3c 2f 73 74 72 6f 6e 67  password</strong
3980: 3e 2e 0a 54 68 65 20 64 69 66 66 65 72 65 6e 63  >..The differenc
3990: 65 20 62 65 74 77 65 65 6e 20 74 68 65 73 65 20  e between these 
39a0: 74 77 6f 20 62 65 68 61 76 69 6f 72 73 20 69 73  two behaviors is
39b0: 20 61 20 63 6f 6e 73 65 71 75 65 6e 63 65 20 6f   a consequence o
39c0: 66 20 6d 61 69 6e 74 61 69 6e 69 6e 67 0a 63 6f  f maintaining.co
39d0: 6d 70 61 74 69 62 69 6c 69 74 79 20 77 69 74 68  mpatibility with
39e0: 20 65 61 72 6c 69 65 72 20 69 6d 70 6c 65 6d 65   earlier impleme
39f0: 6e 74 61 74 69 6f 6e 73 2e 0a 3c 2f 70 3e 0a 0a  ntations..</p>..
3a00: 3c 70 3e 0a 54 68 65 20 3c 73 74 72 6f 6e 67 3e  <p>.The <strong>
3a10: 74 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72 6f  tls::debug</stro
3a20: 6e 67 3e 20 76 61 72 69 61 62 6c 65 20 70 72 6f  ng> variable pro
3a30: 76 69 64 65 73 20 73 6f 6d 65 20 61 64 64 69 74  vides some addit
3a40: 69 6f 6e 61 6c 0a 63 6f 6e 74 72 6f 6c 20 6f 76  ional.control ov
3a50: 65 72 20 74 68 65 73 65 20 72 65 66 65 72 65 6e  er these referen
3a60: 63 65 20 63 61 6c 6c 62 61 63 6b 73 2e 20 20 49  ce callbacks.  I
3a70: 74 73 20 76 61 6c 75 65 20 69 73 20 7a 65 72 6f  ts value is zero
3a80: 20 62 79 20 64 65 66 61 75 6c 74 2e 0a 48 69 67   by default..Hig
3a90: 68 65 72 20 76 61 6c 75 65 73 20 70 72 6f 64 75  her values produ
3aa0: 63 65 20 6d 6f 72 65 20 64 69 61 67 6e 6f 73 74  ce more diagnost
3ab0: 69 63 20 6f 75 74 70 75 74 2c 20 61 6e 64 20 77  ic output, and w
3ac0: 69 6c 6c 20 61 6c 73 6f 20 66 6f 72 63 65 20 74  ill also force t
3ad0: 68 65 0a 76 65 72 69 66 79 20 6d 65 74 68 6f 64  he.verify method
3ae0: 20 69 6e 20 3c 73 74 72 6f 6e 67 3e 74 6c 73 3a   in <strong>tls:
3af0: 3a 63 61 6c 6c 62 61 63 6b 3c 2f 73 74 72 6f 6e  :callback</stron
3b00: 67 3e 20 74 6f 20 61 63 63 65 70 74 20 74 68 65  g> to accept the
3b10: 0a 63 65 72 74 69 66 69 63 61 74 65 2c 20 65 76  .certificate, ev
3b20: 65 6e 20 77 68 65 6e 20 69 74 20 69 73 20 69 6e  en when it is in
3b30: 76 61 6c 69 64 2e 0a 3c 2f 70 3e 0a 0a 3c 70 3e  valid..</p>..<p>
3b40: 0a 3c 65 6d 3e 0a 54 68 65 20 75 73 65 20 6f 66  .<em>.The use of
3b50: 20 74 68 65 20 72 65 66 65 72 65 6e 63 65 20 63   the reference c
3b60: 61 6c 6c 62 61 63 6b 73 20 3c 73 74 72 6f 6e 67  allbacks <strong
3b70: 3e 74 6c 73 3a 3a 63 61 6c 6c 62 61 63 6b 3c 2f  >tls::callback</
3b80: 73 74 72 6f 6e 67 3e 20 61 6e 64 0a 3c 73 74 72  strong> and.<str
3b90: 6f 6e 67 3e 74 6c 73 3a 3a 70 61 73 73 77 6f 72  ong>tls::passwor
3ba0: 64 3c 2f 73 74 72 6f 6e 67 3e 20 69 73 20 6e 6f  d</strong> is no
3bb0: 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 20 20  t recommended.  
3bc0: 54 68 65 79 20 6d 61 79 20 62 65 20 72 65 6d 6f  They may be remo
3bd0: 76 65 64 0a 66 72 6f 6d 20 66 75 74 75 72 65 20  ved.from future 
3be0: 72 65 6c 65 61 73 65 73 2e 0a 3c 2f 65 6d 3e 0a  releases..</em>.
3bf0: 3c 2f 70 3e 0a 0a 3c 70 3e 0a 3c 65 6d 3e 0a 54  </p>..<p>.<em>.T
3c00: 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 76 61  he use of the va
3c10: 72 69 61 62 6c 65 20 3c 73 74 72 6f 6e 67 3e 74  riable <strong>t
3c20: 6c 73 3a 3a 64 65 62 75 67 3c 2f 73 74 72 6f 6e  ls::debug</stron
3c30: 67 3e 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d  g> is not recomm
3c40: 65 6e 64 65 64 2e 0a 49 74 20 6d 61 79 20 62 65  ended..It may be
3c50: 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 66 75   removed from fu
3c60: 74 75 72 65 20 72 65 6c 65 61 73 65 73 2e 0a 3c  ture releases..<
3c70: 2f 65 6d 3e 0a 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c  /em>.</p>..<h3><
3c80: 61 20 6e 61 6d 65 3d 22 48 54 54 50 53 20 45 58  a name="HTTPS EX
3c90: 41 4d 50 4c 45 22 3e 48 54 54 50 53 20 45 58 41  AMPLE">HTTPS EXA
3ca0: 4d 50 4c 45 3c 2f 61 3e 3c 2f 68 33 3e 0a 0a 3c  MPLE</a></h3>..<
3cb0: 70 3e 54 68 69 73 20 65 78 61 6d 70 6c 65 20 75  p>This example u
3cc0: 73 65 73 20 61 20 73 61 6d 70 6c 65 20 73 65 72  ses a sample ser
3cd0: 76 65 72 2e 70 65 6d 20 70 72 6f 76 69 64 65 64  ver.pem provided
3ce0: 20 77 69 74 68 20 74 68 65 20 54 4c 53 20 72 65   with the TLS re
3cf0: 6c 65 61 73 65 2c 0a 63 6f 75 72 74 65 73 79 20  lease,.courtesy 
3d00: 6f 66 20 74 68 65 20 3c 73 74 72 6f 6e 67 3e 4f  of the <strong>O
3d10: 70 65 6e 53 53 4c 3c 2f 73 74 72 6f 6e 67 3e 20  penSSL</strong> 
3d20: 70 72 6f 6a 65 63 74 2e 3c 2f 70 3e 0a 0a 3c 70  project.</p>..<p
3d30: 72 65 3e 3c 63 6f 64 65 3e 0a 70 61 63 6b 61 67  re><code>.packag
3d40: 65 20 72 65 71 75 69 72 65 20 68 74 74 70 0a 70  e require http.p
3d50: 61 63 6b 61 67 65 20 72 65 71 75 69 72 65 20 74  ackage require t
3d60: 6c 73 0a 0a 68 74 74 70 3a 3a 72 65 67 69 73 74  ls..http::regist
3d70: 65 72 20 68 74 74 70 73 20 34 34 33 20 5b 6c 69  er https 443 [li
3d80: 73 74 20 3a 3a 74 6c 73 3a 3a 73 6f 63 6b 65 74  st ::tls::socket
3d90: 20 2d 61 75 74 6f 73 65 72 76 65 72 6e 61 6d 65   -autoservername
3da0: 20 74 72 75 65 20 2d 72 65 71 75 69 72 65 20 74   true -require t
3db0: 72 75 65 20 2d 63 61 64 69 72 20 2f 65 74 63 2f  rue -cadir /etc/
3dc0: 73 73 6c 2f 63 65 72 74 73 5d 0a 0a 73 65 74 20  ssl/certs]..set 
3dd0: 74 6f 6b 20 5b 68 74 74 70 3a 3a 67 65 74 75 72  tok [http::getur
3de0: 6c 20 68 74 74 70 73 3a 2f 2f 63 6f 72 65 2e 74  l https://core.t
3df0: 63 6c 2d 6c 61 6e 67 2e 6f 72 67 2f 5d 0a 3c 2f  cl-lang.org/].</
3e00: 63 6f 64 65 3e 3c 2f 70 72 65 3e 0a 0a 3c 68 33  code></pre>..<h3
3e10: 3e 3c 61 20 6e 61 6d 65 3d 22 53 50 45 43 49 41  ><a name="SPECIA
3e20: 4c 20 43 4f 4e 53 49 44 45 52 41 54 49 4f 4e 53  L CONSIDERATIONS
3e30: 22 3e 53 50 45 43 49 41 4c 20 43 4f 4e 53 49 44  ">SPECIAL CONSID
3e40: 45 52 41 54 49 4f 4e 53 3c 2f 61 3e 3c 2f 68 33  ERATIONS</a></h3
3e50: 3e 0a 0a 3c 70 3e 54 68 65 20 63 61 70 61 62 69  >..<p>The capabi
3e60: 6c 69 74 69 65 73 20 6f 66 20 74 68 69 73 20 70  lities of this p
3e70: 61 63 6b 61 67 65 20 63 61 6e 20 76 61 72 79 20  ackage can vary 
3e80: 65 6e 6f 72 6d 6f 75 73 6c 79 20 62 61 73 65 64  enormously based
3e90: 0a 75 70 6f 6e 20 68 6f 77 20 79 6f 75 72 20 4f  .upon how your O
3ea0: 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 77  penSSL library w
3eb0: 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20 61 6e  as configured an
3ec0: 64 20 62 75 69 6c 74 2e 20 41 74 20 74 68 65 0a  d built. At the.
3ed0: 6d 6f 73 74 20 6d 61 63 72 6f 2d 6c 65 76 65 6c  most macro-level
3ee0: 20 4f 70 65 6e 53 53 4c 20 73 75 70 70 6f 72 74   OpenSSL support
3ef0: 73 20 61 20 26 71 75 6f 74 3b 6e 6f 20 70 61 74  s a &quot;no pat
3f00: 65 6e 74 73 26 71 75 6f 74 3b 20 62 75 69 6c 64  ents&quot; build
3f10: 2c 0a 77 68 69 63 68 20 64 69 73 61 62 6c 65 73  ,.which disables
3f20: 20 52 53 41 2c 20 49 44 45 41 2c 20 52 43 28 32   RSA, IDEA, RC(2
3f30: 2c 34 2c 35 29 20 61 6e 64 20 53 53 4c 32 20 2d  ,4,5) and SSL2 -
3f40: 20 69 66 20 79 6f 75 72 20 4f 70 65 6e 53 53 4c   if your OpenSSL
3f50: 20 69 73 0a 63 6f 6e 66 69 67 75 72 65 64 20 74   is.configured t
3f60: 68 69 73 20 77 61 79 20 74 68 65 6e 20 79 6f 75  his way then you
3f70: 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f 20 62 75   will need to bu
3f80: 69 6c 64 20 54 4c 53 20 77 69 74 68 20 74 68 65  ild TLS with the
3f90: 0a 2d 44 4e 4f 5f 50 41 54 45 4e 54 53 20 6f 70  .-DNO_PATENTS op
3fa0: 74 69 6f 6e 20 2d 20 61 6e 64 20 74 68 65 20 72  tion - and the r
3fb0: 65 73 75 6c 74 61 6e 74 20 6d 6f 64 75 6c 65 20  esultant module 
3fc0: 77 69 6c 6c 20 66 75 6e 63 74 69 6f 6e 0a 63 6f  will function.co
3fd0: 72 72 65 63 74 6c 79 20 61 6e 64 20 61 6c 73 6f  rrectly and also
3fe0: 20 73 75 70 70 6f 72 74 20 41 44 48 20 63 65 72   support ADH cer
3ff0: 74 69 66 69 63 61 74 65 2d 6c 65 73 73 20 65 6e  tificate-less en
4000: 63 72 79 70 74 69 6f 6e 2c 0a 68 6f 77 65 76 65  cryption,.howeve
4010: 72 20 79 6f 75 20 77 69 6c 6c 20 62 65 20 75 6e  r you will be un
4020: 61 62 6c 65 20 74 6f 20 75 74 69 6c 69 7a 65 20  able to utilize 
4030: 74 68 69 73 20 74 6f 20 73 70 65 61 6b 20 74 6f  this to speak to
4040: 20 6e 6f 72 6d 61 6c 20 57 65 62 0a 53 65 72 76   normal Web.Serv
4050: 65 72 73 2c 20 77 68 69 63 68 20 74 79 70 69 63  ers, which typic
4060: 61 6c 6c 79 20 72 65 71 75 69 72 65 20 52 53 41  ally require RSA
4070: 20 73 75 70 70 6f 72 74 2e 20 50 6c 65 61 73 65   support. Please
4080: 20 73 65 65 20 3c 61 0a 68 72 65 66 3d 22 68 74   see <a.href="ht
4090: 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 73 73 6c  tp://www.openssl
40a0: 2e 6f 72 67 2f 22 3e 68 74 74 70 3a 2f 2f 77 77  .org/">http://ww
40b0: 77 2e 6f 70 65 6e 73 73 6c 2e 6f 72 67 2f 3c 2f  w.openssl.org/</
40c0: 61 3e 20 66 6f 72 0a 6d 6f 72 65 20 69 6e 66 6f  a> for.more info
40d0: 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 77  rmation on the w
40e0: 68 6f 6c 65 20 69 73 73 75 65 20 6f 66 20 70 61  hole issue of pa
40f0: 74 65 6e 74 73 20 61 6e 64 20 55 53 20 65 78 70  tents and US exp
4100: 6f 72 74 0a 72 65 73 74 72 69 63 74 69 6f 6e 73  ort.restrictions
4110: 2e 20 3c 2f 70 3e 0a 0a 3c 68 33 3e 3c 61 20 6e  . </p>..<h3><a n
4120: 61 6d 65 3d 22 53 45 45 20 41 4c 53 4f 22 3e 53  ame="SEE ALSO">S
4130: 45 45 20 41 4c 53 4f 3c 2f 61 3e 3c 2f 68 33 3e  EE ALSO</a></h3>
4140: 0a 0a 3c 70 3e 3c 73 74 72 6f 6e 67 3e 73 6f 63  ..<p><strong>soc
4150: 6b 65 74 3c 2f 73 74 72 6f 6e 67 3e 2c 20 3c 73  ket</strong>, <s
4160: 74 72 6f 6e 67 3e 66 69 6c 65 65 76 65 6e 74 3c  trong>fileevent<
4170: 2f 73 74 72 6f 6e 67 3e 2c 20 3c 61 0a 68 72 65  /strong>, <a.hre
4180: 66 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70  f="http://www.op
4190: 65 6e 73 73 6c 2e 6f 72 67 2f 22 3e 3c 73 74 72  enssl.org/"><str
41a0: 6f 6e 67 3e 4f 70 65 6e 53 53 4c 3c 2f 73 74 72  ong>OpenSSL</str
41b0: 6f 6e 67 3e 3c 2f 61 3e 3c 2f 70 3e 0a 0a 3c 68  ong></a></p>..<h
41c0: 72 3e 0a 0a 3c 70 72 65 3e 0a 43 6f 70 79 72 69  r>..<pre>.Copyri
41d0: 67 68 74 20 26 63 6f 70 79 3b 20 31 39 39 39 20  ght &copy; 1999 
41e0: 4d 61 74 74 20 4e 65 77 6d 61 6e 2e 0a 43 6f 70  Matt Newman..Cop
41f0: 79 72 69 67 68 74 20 26 63 6f 70 79 3b 20 32 30  yright &copy; 20
4200: 30 34 20 53 74 61 72 66 69 73 68 20 53 79 73 74  04 Starfish Syst
4210: 65 6d 73 2e 0a 3c 2f 70 72 65 3e 0a 3c 2f 62 6f  ems..</pre>.</bo
4220: 64 79 3e 0a 3c 2f 68 74 6d 6c 3e 0a              dy>.</html>.