Hex Artifact Content

Artifact a5d881083e58cac38d31b60e60695bb38d634d9202cf8f899b6be9e0ab6988ec:


0000: 09 57 69 6e 64 6f 77 73 20 44 4c 4c 20 42 75 69  .Windows DLL Bui
0010: 6c 64 20 69 6e 73 74 72 75 63 74 69 6f 6e 73 20  ld instructions 
0020: 75 73 69 6e 67 20 6e 6d 61 6b 65 20 62 75 69 6c  using nmake buil
0030: 64 20 73 79 73 74 65 6d 0a 09 32 30 32 30 2d 31  d system..2020-1
0040: 30 2d 31 35 20 48 61 72 61 6c 64 2e 4f 65 68 6c  0-15 Harald.Oehl
0050: 6d 61 6e 6e 40 65 6c 6d 69 63 72 6f 6e 2e 64 65  mann@elmicron.de
0060: 0a 09 32 30 32 33 2d 30 38 2d 32 32 20 4b 65 76  ..2023-08-22 Kev
0070: 69 6e 20 57 61 6c 7a 65 72 20 28 6b 77 40 63 6f  in Walzer (kw@co
0080: 64 65 62 79 6b 65 76 69 6e 2e 63 6f 6d 29 0a 0a  debykevin.com)..
0090: 50 72 6f 70 65 72 74 69 65 73 3a 0a 2d 20 36 34  Properties:.- 64
00a0: 20 62 69 74 20 44 4c 4c 0a 2d 20 56 69 73 75 61   bit DLL.- Visua
00b0: 6c 53 74 75 64 69 6f 20 32 30 31 39 0a 2d 20 57  lStudio 2019.- W
00c0: 53 4c 0a 2d 20 4f 70 65 6e 53 53 4c 20 64 79 6e  SL.- OpenSSL dyn
00d0: 61 6d 69 63 61 6c 6c 79 20 6c 69 6e 6b 65 64 20  amically linked 
00e0: 74 6f 20 54 43 4c 54 4c 53 20 44 4c 4c 2e 20 57  to TCLTLS DLL. W
00f0: 65 20 75 73 65 64 20 61 20 66 72 65 65 6c 79 20  e used a freely 
0100: 72 65 64 69 73 74 72 69 62 75 74 61 62 6c 65 20  redistributable 
0110: 62 75 69 6c 64 20 6f 66 20 4f 70 65 6e 53 53 4c  build of OpenSSL
0120: 20 66 72 6f 6d 20 68 74 74 70 73 3a 2f 2f 77 77   from https://ww
0130: 77 2e 66 69 72 65 64 61 65 6d 6f 6e 2e 63 6f 6d  w.firedaemon.com
0140: 2f 66 69 72 65 64 61 65 6d 6f 6e 2d 6f 70 65 6e  /firedaemon-open
0150: 73 73 6c 2e 20 55 6e 7a 69 70 20 61 6e 64 20 69  ssl. Unzip and i
0160: 6e 73 74 61 6c 6c 20 4f 70 65 6e 53 53 4c 20 69  nstall OpenSSL i
0170: 6e 20 61 6e 20 61 63 63 65 73 73 69 62 6c 65 20  n an accessible 
0180: 70 6c 61 63 65 20 28 77 65 20 75 73 65 64 20 74  place (we used t
0190: 68 65 20 6c 69 62 20 73 75 62 64 69 72 65 63 74  he lib subdirect
01a0: 6f 72 79 20 6f 66 20 6f 75 72 20 54 63 6c 20 69  ory of our Tcl i
01b0: 6e 73 74 61 6c 6c 61 74 69 6f 6e 29 2e 0a 0a 31  nstallation)...1
01c0: 2e 20 56 69 73 75 61 6c 20 53 74 75 64 69 6f 20  . Visual Studio 
01d0: 78 36 34 20 6e 61 74 69 76 65 20 70 72 6f 6d 70  x64 native promp
01e0: 74 2e 20 55 70 64 61 74 65 20 65 6e 76 69 72 6f  t. Update enviro
01f0: 6e 6d 65 6e 74 61 6c 20 76 61 72 69 61 62 6c 65  nmental variable
0200: 73 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 54  s for building T
0210: 63 6c 74 6c 73 2e 20 43 75 73 74 6f 6d 69 7a 65  cltls. Customize
0220: 20 74 68 65 20 62 65 6c 6f 77 20 65 6e 74 72 69   the below entri
0230: 65 73 20 66 6f 72 20 79 6f 75 72 20 73 65 74 75  es for your setu
0240: 70 2e 0a 0a 73 65 74 20 50 41 54 48 3d 25 50 41  p...set PATH=%PA
0250: 54 48 25 3b 43 3a 5c 74 63 6c 2d 74 72 75 6e 6b  TH%;C:\tcl-trunk
0260: 5c 6c 69 62 5c 6f 70 65 6e 73 73 6c 2d 33 5c 78  \lib\openssl-3\x
0270: 36 34 5c 62 69 6e 0a 73 65 74 20 49 4e 43 4c 55  64\bin.set INCLU
0280: 44 45 3d 25 49 4e 43 4c 55 44 45 25 3b 43 3a 5c  DE=%INCLUDE%;C:\
0290: 74 63 6c 2d 74 72 75 6e 6b 5c 74 63 6c 5c 6c 69  tcl-trunk\tcl\li
02a0: 62 5c 6f 70 65 6e 73 73 6c 2d 33 5c 78 36 34 5c  b\openssl-3\x64\
02b0: 69 6e 63 6c 75 64 65 5c 6f 70 65 6e 73 73 6c 0a  include\openssl.
02c0: 73 65 74 20 4c 49 42 3d 25 4c 49 42 25 3b 43 3a  set LIB=%LIB%;C:
02d0: 5c 74 63 6c 2d 74 72 75 6e 6b 5c 74 63 6c 5c 6c  \tcl-trunk\tcl\l
02e0: 69 62 5c 6f 70 65 6e 73 73 6c 2d 33 5c 78 36 34  ib\openssl-3\x64
02f0: 5c 62 69 6e 0a 0a 0a 32 29 20 42 75 69 6c 64 20  \bin...2) Build 
0300: 54 43 4c 54 4c 53 0a 0a 2d 3e 20 55 6e 7a 69 70  TCLTLS..-> Unzip
0310: 20 64 69 73 74 72 69 62 75 74 69 6f 6e 20 6f 6e   distribution on
0320: 20 79 6f 75 72 20 73 79 73 74 65 6d 2e 0a 2d 3e   your system..->
0330: 20 53 74 61 72 74 20 57 53 4c 2e 0a 2d 3e 20 63   Start WSL..-> c
0340: 64 20 2f 6d 6e 74 2f 63 2f 70 61 74 68 2f 74 6f  d /mnt/c/path/to
0350: 2f 74 63 6c 74 6c 73 0a 0a 2e 2f 67 65 6e 5f 64  /tcltls.../gen_d
0360: 68 5f 70 61 72 61 6d 73 20 3e 20 64 68 5f 70 61  h_params > dh_pa
0370: 72 61 6d 73 2e 68 0a 0a 6f 64 20 2d 41 20 6e 20  rams.h..od -A n 
0380: 2d 76 20 2d 74 20 78 43 20 3c 20 27 74 6c 73 2e  -v -t xC < 'tls.
0390: 74 63 6c 27 20 3e 20 74 6c 73 2e 74 63 6c 2e 68  tcl' > tls.tcl.h
03a0: 2e 6e 65 77 2e 31 0a 73 65 64 20 27 73 40 5b 5e  .new.1.sed 's@[^
03b0: 30 2d 39 41 2d 46 61 2d 66 5d 40 40 67 3b 73 40  0-9A-Fa-f]@@g;s@
03c0: 2e 2e 40 30 78 26 2c 20 40 67 27 20 3c 20 74 6c  ..@0x&, @g' < tl
03d0: 73 2e 74 63 6c 2e 68 2e 6e 65 77 2e 31 20 3e 20  s.tcl.h.new.1 > 
03e0: 74 6c 73 2e 74 63 6c 2e 68 0a 72 6d 20 2d 66 20  tls.tcl.h.rm -f 
03f0: 74 6c 73 2e 74 63 6c 2e 68 2e 6e 65 77 2e 31 0a  tls.tcl.h.new.1.
0400: 0a 2d 3e 20 56 69 73 75 61 6c 20 53 74 75 64 69  .-> Visual Studi
0410: 6f 20 78 36 34 20 6e 61 74 69 76 65 20 70 72 6f  o x64 native pro
0420: 6d 70 74 2e 0a 0a 63 64 20 43 3a 70 61 74 68 5c  mpt...cd C:path\
0430: 74 6f 5c 74 63 6c 74 6c 73 5c 77 69 6e 0a 0a 52  to\tcltls\win..R
0440: 75 6e 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  un the following
0450: 20 63 6f 6d 6d 61 6e 64 73 20 28 6d 6f 64 69 66   commands (modif
0460: 79 20 74 68 65 20 66 6c 61 67 73 20 74 6f 20 79  y the flags to y
0470: 6f 75 72 20 73 70 65 63 69 66 69 63 20 69 6e 73  our specific ins
0480: 74 61 6c 6c 61 74 69 6f 6e 73 29 2e 0a 0a 6e 6d  tallations)...nm
0490: 61 6b 65 20 2d 66 20 6d 61 6b 65 66 69 6c 65 2e  ake -f makefile.
04a0: 76 63 20 54 43 4c 44 49 52 3d 63 3a 5c 75 73 65  vc TCLDIR=c:\use
04b0: 72 73 5c 77 6f 72 64 74 5c 74 63 6c 20 49 4e 53  rs\wordt\tcl INS
04c0: 54 41 4c 4c 44 49 52 3d 63 3a 5c 74 63 6c 2d 74  TALLDIR=c:\tcl-t
04d0: 72 75 6e 6b 5c 74 63 6c 5c 6c 69 62 20 53 53 4c  runk\tcl\lib SSL
04e0: 5f 49 4e 53 54 41 4c 4c 5f 46 4f 4c 44 45 52 3d  _INSTALL_FOLDER=
04f0: 43 3a 5c 74 63 6c 2d 74 72 75 6e 6b 5c 74 63 6c  C:\tcl-trunk\tcl
0500: 5c 6c 69 62 5c 6f 70 65 6e 73 73 6c 2d 33 5c 78  \lib\openssl-3\x
0510: 36 34 0a 0a 6e 6d 61 6b 65 20 2d 66 20 6d 61 6b  64..nmake -f mak
0520: 65 66 69 6c 65 2e 76 63 20 54 43 4c 44 49 52 3d  efile.vc TCLDIR=
0530: 63 3a 5c 75 73 65 72 73 5c 77 6f 72 64 74 5c 74  c:\users\wordt\t
0540: 63 6c 20 49 4e 53 54 41 4c 4c 44 49 52 3d 63 3a  cl INSTALLDIR=c:
0550: 5c 74 63 6c 2d 74 72 75 6e 6b 5c 74 63 6c 5c 6c  \tcl-trunk\tcl\l
0560: 69 62 20 53 53 4c 5f 49 4e 53 54 41 4c 4c 5f 46  ib SSL_INSTALL_F
0570: 4f 4c 44 45 52 3d 43 3a 5c 74 63 6c 2d 74 72 75  OLDER=C:\tcl-tru
0580: 6e 6b 5c 74 63 6c 5c 6c 69 62 5c 6f 70 65 6e 73  nk\tcl\lib\opens
0590: 73 6c 2d 33 5c 78 36 34 20 69 6e 73 74 61 6c 6c  sl-3\x64 install
05a0: 0a 0a 54 68 65 20 72 65 73 75 6c 74 69 6e 67 20  ..The resulting 
05b0: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 77 69 6c  installation wil
05c0: 6c 20 69 6e 63 6c 75 64 65 20 62 6f 74 68 20 74  l include both t
05d0: 68 65 20 74 63 6c 74 6c 73 20 70 61 63 6b 61 67  he tcltls packag
05e0: 65 20 61 6e 64 20 61 6c 73 6f 20 68 61 76 65 20  e and also have 
05f0: 6c 69 62 63 72 79 70 74 6f 2e 64 6c 6c 20 61 6e  libcrypto.dll an
0600: 64 20 6c 69 62 73 73 6c 2e 64 6c 6c 20 63 6f 70  d libssl.dll cop
0610: 69 65 64 20 69 6e 74 6f 20 74 68 65 20 73 61 6d  ied into the sam
0620: 65 20 64 69 72 65 63 74 6f 72 79 2e 0a 0a 33 29  e directory...3)
0630: 20 54 65 73 74 0a 0a 53 74 61 72 74 20 74 63 6c   Test..Start tcl
0640: 73 68 0a 0a 70 61 63 6b 61 67 65 20 72 65 71 75  sh..package requ
0650: 69 72 65 20 74 6c 73 0a 70 61 63 6b 61 67 65 20  ire tls.package 
0660: 72 65 71 75 69 72 65 20 68 74 74 70 0a 68 74 74  require http.htt
0670: 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74 70  p::register http
0680: 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74 6c  s 443 [list ::tl
0690: 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f 73  s::socket -autos
06a0: 65 72 76 65 72 6e 61 6d 65 20 74 72 75 65 5d 0a  ervername true].
06b0: 73 65 74 20 74 6f 6b 20 5b 68 74 74 70 3a 3a 64  set tok [http::d
06c0: 61 74 61 20 5b 68 74 74 70 3a 3a 67 65 74 75 72  ata [http::getur
06d0: 6c 20 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74 63  l https://www.tc
06e0: 6c 2d 6c 61 6e 67 2e 6f 72 67 5d 5d              l-lang.org]]