Hex Artifact Content

Artifact 9649986d92d6475ddde9bad1191937302ba349c61bb6f4de743538e13554f5c1:


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 20 0a 0a 73 65 74 20 50 41 54 48 3d 25 50  p. ..set PATH=%P
0250: 41 54 48 25 3b 43 3a 5c 74 63 6c 2d 74 72 75 6e  ATH%;C:\tcl-trun
0260: 6b 5c 6c 69 62 5c 6f 70 65 6e 73 73 6c 2d 33 5c  k\lib\openssl-3\
0270: 78 36 34 5c 62 69 6e 0a 73 65 74 20 49 4e 43 4c  x64\bin.set INCL
0280: 55 44 45 3d 25 49 4e 43 4c 55 44 45 25 3b 43 3a  UDE=%INCLUDE%;C:
0290: 5c 74 63 6c 2d 74 72 75 6e 6b 5c 74 63 6c 5c 6c  \tcl-trunk\tcl\l
02a0: 69 62 5c 6f 70 65 6e 73 73 6c 2d 33 5c 78 36 34  ib\openssl-3\x64
02b0: 5c 69 6e 63 6c 75 64 65 5c 6f 70 65 6e 73 73 6c  \include\openssl
02c0: 0a 73 65 74 20 4c 49 42 3d 25 4c 49 42 25 3b 43  .set LIB=%LIB%;C
02d0: 3a 5c 74 63 6c 2d 74 72 75 6e 6b 5c 74 63 6c 5c  :\tcl-trunk\tcl\
02e0: 6c 69 62 5c 6f 70 65 6e 73 73 6c 2d 33 5c 78 36  lib\openssl-3\x6
02f0: 34 5c 62 69 6e 0a 0a 0a 32 29 20 42 75 69 6c 64  4\bin...2) Build
0300: 20 54 43 4c 54 4c 53 0a 0a 2d 3e 20 55 6e 7a 69   TCLTLS..-> Unzi
0310: 70 20 64 69 73 74 72 69 62 75 74 69 6f 6e 20 6f  p distribution o
0320: 6e 20 79 6f 75 72 20 73 79 73 74 65 6d 2e 0a 2d  n your system..-
0330: 3e 20 53 74 61 72 74 20 57 53 4c 2e 0a 2d 3e 20  > Start WSL..-> 
0340: 63 64 20 2f 6d 6e 74 2f 63 2f 70 61 74 68 2f 74  cd /mnt/c/path/t
0350: 6f 2f 74 63 6c 74 6c 73 0a 0a 2e 2f 67 65 6e 5f  o/tcltls.../gen_
0360: 64 68 5f 70 61 72 61 6d 73 20 3e 20 64 68 5f 70  dh_params > dh_p
0370: 61 72 61 6d 73 2e 68 0a 0a 6f 64 20 2d 41 20 6e  arams.h..od -A n
0380: 20 2d 76 20 2d 74 20 78 43 20 3c 20 27 74 6c 73   -v -t xC < 'tls
0390: 2e 74 63 6c 27 20 3e 20 74 6c 73 2e 74 63 6c 2e  .tcl' > tls.tcl.
03a0: 68 2e 6e 65 77 2e 31 0a 73 65 64 20 27 73 40 5b  h.new.1.sed 's@[
03b0: 5e 30 2d 39 41 2d 46 61 2d 66 5d 40 40 67 3b 73  ^0-9A-Fa-f]@@g;s
03c0: 40 2e 2e 40 30 78 26 2c 20 40 67 27 20 3c 20 74  @..@0x&, @g' < t
03d0: 6c 73 2e 74 63 6c 2e 68 2e 6e 65 77 2e 31 20 3e  ls.tcl.h.new.1 >
03e0: 20 74 6c 73 2e 74 63 6c 2e 68 0a 72 6d 20 2d 66   tls.tcl.h.rm -f
03f0: 20 74 6c 73 2e 74 63 6c 2e 68 2e 6e 65 77 2e 31   tls.tcl.h.new.1
0400: 0a 0a 2d 3e 20 56 69 73 75 61 6c 20 53 74 75 64  ..-> Visual Stud
0410: 69 6f 20 78 36 34 20 6e 61 74 69 76 65 20 70 72  io x64 native pr
0420: 6f 6d 70 74 2e 0a 0a 63 64 20 43 3a 70 61 74 68  ompt...cd C:path
0430: 5c 74 6f 5c 74 63 6c 74 6c 73 5c 77 69 6e 0a 0a  \to\tcltls\win..
0440: 52 75 6e 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e  Run the followin
0450: 67 20 63 6f 6d 6d 61 6e 64 73 20 28 6d 6f 64 69  g commands (modi
0460: 66 79 20 74 68 65 20 66 6c 61 67 73 20 74 6f 20  fy the flags to 
0470: 79 6f 75 72 20 73 70 65 63 69 66 69 63 20 69 6e  your specific in
0480: 73 74 61 6c 6c 61 74 69 6f 6e 73 29 2e 0a 0a 6e  stallations)...n
0490: 6d 61 6b 65 20 2d 66 20 6d 61 6b 65 66 69 6c 65  make -f makefile
04a0: 2e 76 63 20 54 43 4c 44 49 52 3d 63 3a 5c 75 73  .vc TCLDIR=c:\us
04b0: 65 72 73 5c 77 6f 72 64 74 5c 74 63 6c 20 49 4e  ers\wordt\tcl IN
04c0: 53 54 41 4c 4c 44 49 52 3d 63 3a 5c 74 63 6c 2d  STALLDIR=c:\tcl-
04d0: 74 72 75 6e 6b 5c 74 63 6c 5c 6c 69 62 20 53 53  trunk\tcl\lib SS
04e0: 4c 5f 49 4e 53 54 41 4c 4c 5f 46 4f 4c 44 45 52  L_INSTALL_FOLDER
04f0: 3d 43 3a 5c 74 63 6c 2d 74 72 75 6e 6b 5c 74 63  =C:\tcl-trunk\tc
0500: 6c 5c 6c 69 62 5c 6f 70 65 6e 73 73 6c 2d 33 5c  l\lib\openssl-3\
0510: 78 36 34 0a 0a 6e 6d 61 6b 65 20 2d 66 20 6d 61  x64..nmake -f ma
0520: 6b 65 66 69 6c 65 2e 76 63 20 54 43 4c 44 49 52  kefile.vc TCLDIR
0530: 3d 63 3a 5c 75 73 65 72 73 5c 77 6f 72 64 74 5c  =c:\users\wordt\
0540: 74 63 6c 20 49 4e 53 54 41 4c 4c 44 49 52 3d 63  tcl INSTALLDIR=c
0550: 3a 5c 74 63 6c 2d 74 72 75 6e 6b 5c 74 63 6c 5c  :\tcl-trunk\tcl\
0560: 6c 69 62 20 53 53 4c 5f 49 4e 53 54 41 4c 4c 5f  lib SSL_INSTALL_
0570: 46 4f 4c 44 45 52 3d 43 3a 5c 74 63 6c 2d 74 72  FOLDER=C:\tcl-tr
0580: 75 6e 6b 5c 74 63 6c 5c 6c 69 62 5c 6f 70 65 6e  unk\tcl\lib\open
0590: 73 73 6c 2d 33 5c 78 36 34 20 69 6e 73 74 61 6c  ssl-3\x64 instal
05a0: 6c 0a 0a 54 68 65 20 72 65 73 75 6c 74 69 6e 67  l..The resulting
05b0: 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 77 69   installation wi
05c0: 6c 6c 20 69 6e 63 6c 75 64 65 20 62 6f 74 68 20  ll include both 
05d0: 74 68 65 20 74 63 6c 74 6c 73 20 70 61 63 6b 61  the tcltls packa
05e0: 67 65 20 61 6e 64 20 61 6c 73 6f 20 68 61 76 65  ge and also have
05f0: 20 6c 69 62 63 72 79 70 74 6f 2e 64 6c 6c 20 61   libcrypto.dll a
0600: 6e 64 20 6c 69 62 73 73 6c 2e 64 6c 6c 20 63 6f  nd libssl.dll co
0610: 70 69 65 64 20 69 6e 74 6f 20 74 68 65 20 73 61  pied into the sa
0620: 6d 65 20 64 69 72 65 63 74 6f 72 79 2e 0a 0a 33  me directory...3
0630: 29 20 54 65 73 74 0a 0a 53 74 61 72 74 20 74 63  ) Test..Start tc
0640: 6c 73 68 0a 0a 70 61 63 6b 61 67 65 20 72 65 71  lsh..package req
0650: 75 69 72 65 20 74 6c 73 0a 70 61 63 6b 61 67 65  uire tls.package
0660: 20 72 65 71 75 69 72 65 20 68 74 74 70 0a 68 74   require http.ht
0670: 74 70 3a 3a 72 65 67 69 73 74 65 72 20 68 74 74  tp::register htt
0680: 70 73 20 34 34 33 20 5b 6c 69 73 74 20 3a 3a 74  ps 443 [list ::t
0690: 6c 73 3a 3a 73 6f 63 6b 65 74 20 2d 61 75 74 6f  ls::socket -auto
06a0: 73 65 72 76 65 72 6e 61 6d 65 20 74 72 75 65 5d  servername true]
06b0: 0a 73 65 74 20 74 6f 6b 20 5b 68 74 74 70 3a 3a  .set tok [http::
06c0: 64 61 74 61 20 5b 68 74 74 70 3a 3a 67 65 74 75  data [http::getu
06d0: 72 6c 20 68 74 74 70 73 3a 2f 2f 77 77 77 2e 74  rl https://www.t
06e0: 63 6c 2d 6c 61 6e 67 2e 6f 72 67 5d 5d           cl-lang.org]]