D 2020-10-20T16:11:58.959 J icomment Here\sis\sthe\spatch\sstarting\sfrom\scheckin\s[9c32a526ed]\sfor\syour\sconvenience.\r\n\r\nEnjoy,\r\nHarald\r\n\r\n\r\nIndex:\stls.c\r\n==================================================================\r\n---\stls.c\r\n+++\stls.c\r\n@@\s-1774,11\s+1774,11\s@@\r\n\s\s*\t\screate\sthe\sssl\scommand,\sinitialise\sssl\scontext\r\n\s\s*\r\n\s\s*-------------------------------------------------------------------\r\n\s\s*/\r\n\s\r\n-int\sTls_Init(Tcl_Interp\s*interp)\s{\r\n+DLLEXPORT\sint\sTls_Init(Tcl_Interp\s*interp)\s{\r\n\s\tconst\schar\stlsTclInitScript[]\s=\s{\r\n\s#include\s"tls.tcl.h"\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s0x00\r\n\s\t};\r\n\s\r\n@@\s-1834,11\s+1834,11\s@@\r\n\s\s*\t\tA\sstandard\sTcl\serror\scode.\r\n\s\s*\r\n\s\s*------------------------------------------------------*\r\n\s\s*/\r\n\s\r\n-int\sTls_SafeInit(Tcl_Interp\s*interp)\s{\r\n+DLLEXPORT\sint\sTls_SafeInit(Tcl_Interp\s*interp)\s{\r\n\s\tdprintf("Called");\r\n\s\treturn(Tls_Init(interp));\r\n\s}\r\n\s\r\n\s/*\r\n\r\nIndex:\stls.h\r\n==================================================================\r\n---\stls.h\r\n+++\stls.h\r\n@@\s-21,9\s+21,9\s@@\r\n\s#include\s\r\n\s\r\n\s/*\r\n\s\s*\sInitialization\sroutines\s--\sour\sentire\spublic\sC\sAPI.\r\n\s\s*/\r\n-int\sTls_Init(Tcl_Interp\s*interp);\r\n-int\sTls_SafeInit(Tcl_Interp\s*interp);\r\n+DLLEXPORT\sint\sTls_Init(Tcl_Interp\s*interp);\r\n+DLLEXPORT\sint\sTls_SafeInit(Tcl_Interp\s*interp);\r\n\s\r\n\s#endif\s/*\s_TLS_H\s*/\r\n\r\nADDED\s\s\swin/README.txt\r\nIndex:\swin/README.txt\r\n==================================================================\r\n---\swin/README.txt\r\n+++\swin/README.txt\r\n@@\s-0,0\s+1,66\s@@\r\n+\tWindows\sDLL\sBuild\sinstructions\susing\snmake\sbuild\ssystem\r\n+\t2020-10-15\sHarald.Oehlmann@elmicron.de\r\n+\r\n+Properties:\r\n+-\s32\sbit\sDLL\r\n+-\sVisualStudio\s2015\r\n+Note:\sVuisual\sC++\s6\sdoes\snot\sbuild\sOpenSSL\s(long\slong\ssyntax\serror)\r\n+-\sCygwin32\s(temporary\shelper,\splease\shelp\sto\sreplace\sby\stclsh)\r\n+-\sOpenSSL\sstatically\slinked\sto\sTCLTLS\sDLL.\r\n+Note:\sDynamic\slinking\salso\sworks\sbut\sresults\sin\sa\sDLL\sdependeny\son\sOPENSSL\sDLL's\r\n+\r\n+1)\sBuild\sOpenSSL\sstatic\slibraries:\r\n+\r\n+OpenSSL\ssource\sdistribtution\sunpacked\sin:\r\n+c:\\test\\tcltls\\Openssl_1_1_1h\r\n+\r\n+-\sInstall\sPerl\sfrom\shttp://strawberryperl.com/download/5.32.0.1/strawberry-perl-5.32.0.1-32bit.msi\r\n+\s\sto\sC:\\perl\r\n+\s\s(ActivePerl\sfailed\sdue\sto\smissing\s32\sbit\sconsole\smodule)\r\n+-\sInstall\sNASM\sAssembler:\r\n+\r\n+https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win32/nasm-2.15.05-installer-x86.exe\r\n+\s\sto\sC:\\Program\sFiles\s(x86)\\NASM\r\n+\s\s\r\n+->\sVisual\sStudio\sx86\snative\sprompt.\r\n+\r\n+set\sPath=%PATH%;C:\\Program\sFiles\s(x86)\\NASM;C:\\Perl\\perl\\bin\r\n+\r\n+perl\sConfigure\sVC-WIN32\s--prefix=c:\\test\\tcltls\\openssl\s--openssldir=c:\\test\\tcltls\\openssldir\sno-shared\sno-filenames\sthreads\r\n+\r\n+nmake\r\n+nmake\stest\r\n+namke\sinstall\r\n+\r\n+2)\sBuild\sTCLTLS\r\n+\r\n+Unzip\sdistribution\sin:\r\n+c:\\test\\tcltls\\tcltls-1.7.22\r\n+\r\n+->\sstart\scygwin\sbash\sprompt\r\n+\r\n+cd\s/cygdrive/c/test/tcltls/tcltls-1.7.22\r\n+./gen_dh_params\s>\sdh_params.h\r\n+\r\n+od\s-A\sn\s-v\s-t\sxC\s<\s'tls.tcl'\s>\stls.tcl.h.new.1\r\n+sed\s's@[^0-9A-Fa-f]@@g;s@..@0x&,\s@g'\s<\stls.tcl.h.new.1\s>\stls.tcl.h\r\n+rm\s-f\stls.tcl.h.new.1\r\n+\r\n+->\sVisual\sStudio\sx86\snative\sprompt.\r\n+\r\n+cd\sC:\\test\\tcltls\\tcltls-1.7.22\\win\r\n+\r\n+nmake\s-f\smakefile.vc\sTCLDIR=c:\\test\\tcl8610\sSSL_INSTALL_FOLDER=C:\\test\\tcltls\\openssl\r\n+\r\n+nmake\s-f\smakefile.vc\sinstall\sTCLDIR=c:\\test\\tcl8610\sINSTALLDIR=c:\\test\\tcltls\sSSL_INSTALL_FOLDER=C:\\test\\tcltls\\openssl\r\n+\r\n+tls.c:\s\r\n+Lines\s1779,\s1839:\sreplace\r\n+int\sTls_Init\sby\r\n+DLLEXPORT\sint\s\sTls_Init\r\n+\r\n+tls.h:\ssame\schange\r\n+\r\n+lappend\sauto_path\s{C:\\test\\tcltls\\tls1.7.22}\r\n+package\srequire\stls\r\n+\r\n\r\nADDED\s\s\swin/makefile.vc\r\nIndex:\swin/makefile.vc\r\n==================================================================\r\n---\swin/makefile.vc\r\n+++\swin/makefile.vc\r\n@@\s-0,0\s+1,24\s@@\r\n+#\scall\snmake\swith\sadditional\sparameter\sSSL_INSTALL_FOLDER=\swith\sthe\r\n+#\sOpenSSL\sinstalation\sfolder\sfollowing.\r\n+\r\n+PROJECT=tls\r\n+DOTVERSION\s=\s1.7.22\r\n+\r\n+PRJ_INCLUDES\t=\s-I"$(SSL_INSTALL_FOLDER)\\include"\r\n+PRJ_DEFINES\s=\s\s-D\sNO_SSL2\s-D\sNO_SSL3\s-D\s_CRT_SECURE_NO_WARNINGS\r\n+\r\n+PRJ_LIBS\s=\s\\\r\n+\t"$(SSL_INSTALL_FOLDER)\\lib\\libssl.lib"\s\\\r\n+\t"$(SSL_INSTALL_FOLDER)\\lib\\libcrypto.lib"\s\\\r\n+\tWS2_32.LIB\sGDI32.LIB\sADVAPI32.LIB\sCRYPT32.LIB\sUSER32.LIB\r\n+\r\n+PRJ_OBJS\s=\s$(TMP_DIR)\\tls.obj\s\\\r\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s$(TMP_DIR)\\tlsBIO.obj\s\\\r\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s$(TMP_DIR)\\tlsIO.obj\s\\\r\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s$(TMP_DIR)\\tlsX509.obj\r\n+\r\n+!include\s"rules-ext.vc"\r\n+!include\s"targets.vc"\r\n+\r\n+pkgindex:\sdefault-pkgindex\r\n+\r\n\r\nADDED\s\s\swin/targets.vc\r\nIndex:\swin/targets.vc\r\n==================================================================\r\n---\swin/targets.vc\r\n+++\swin/targets.vc\r\n@@\s-0,0\s+1,98\s@@\r\n+#-------------------------------------------------------------\s-*-\smakefile\s-*-\r\n+#\stargets.vc\s--\r\n+#\r\n+#\sPart\sof\sthe\snmake\sbased\sbuild\ssystem\sfor\sTcl\sand\sits\sextensions.\r\n+#\sThis\sfile\sdefines\ssome\sstandard\stargets\sfor\sthe\sconvenience\sof\sextensions\r\n+#\sand\scan\sbe\soptionally\sincluded\sby\sthe\sextension\smakefile.\r\n+#\sSee\sTIP\s477\s(https://core.tcl-lang.org/tips/doc/trunk/tip/477.md)\sfor\sdocs.\r\n+\r\n+$(PROJECT):\ssetup\spkgindex\s$(PRJLIB)\r\n+\r\n+!ifdef\sPRJ_STUBOBJS\r\n+$(PROJECT):\s$(PRJSTUBLIB)\r\n+$(PRJSTUBLIB):\s$(PRJ_STUBOBJS)\r\n+\t$(LIBCMD)\s$**\r\n+\r\n+$(PRJ_STUBOBJS):\r\n+\t$(CCSTUBSCMD)\s%s\r\n+!endif\s#\sPRJ_STUBOBJS\r\n+\r\n+!ifdef\sPRJ_MANIFEST\r\n+$(PROJECT):\s$(PRJLIB).manifest\r\n+$(PRJLIB).manifest:\s$(PRJ_MANIFEST)\r\n+\t@nmakehlp\s-s\s<<\s$**\s>$@\r\n+@MACHINE@\t\s\s$(MACHINE:IX86=X86)\r\n+<<\r\n+!endif\r\n+\r\n+!if\s"$(PROJECT)"\s!=\s"tcl"\s&&\s"$(PROJECT)"\s!=\s"tk"\r\n+$(PRJLIB):\s$(PRJ_OBJS)\s$(RESFILE)\r\n+!if\s$(STATIC_BUILD)\r\n+\s\s\s\s\s\s\s$(LIBCMD)\s$**\r\n+!else\r\n+\s\s\s\s\s\s\s$(DLLCMD)\s$**\r\n+\s\s\s\s\s\s\s$(_VC_MANIFEST_EMBED_DLL)\r\n+!endif\r\n+\s\s\s\s\s\s\s-@del\s$*.exp\r\n+!endif\r\n+\r\n+!if\s"$(PRJ_HEADERS)"\s!=\s""\s&&\s"$(PRJ_OBJS)"\s!=\s""\r\n+$(PRJ_OBJS):\s$(PRJ_HEADERS)\r\n+!endif\r\n+\r\n+#\sIf\sparent\smakefile\shas\sdefined\sstub\sobjects,\sadd\stheir\sinstallation\r\n+#\sto\sthe\sdefault\sinstall\r\n+!if\s"$(PRJ_STUBOBJS)"\s!=\s""\r\n+default-install:\sdefault-install-stubs\r\n+!endif\r\n+\r\n+#\sUnlike\sthe\sother\sdefault\stargets,\sthese\scannot\sbe\sin\srules.vc\sbecause\r\n+#\sthe\sexecuted\scommand\sdepends\son\sexistence\sof\smacro\sPRJ_HEADERS_PUBLIC\r\n+#\sthat\sthe\sparent\smakefile\swill\snot\sdefine\suntil\safter\sincluding\srules-ext.vc\r\n+!if\s"$(PRJ_HEADERS_PUBLIC)"\s!=\s""\r\n+default-install:\sdefault-install-headers\r\n+default-install-headers:\r\n+\t@echo\sInstalling\sheaders\sto\s'$(INCLUDE_INSTALL_DIR)'\r\n+\t@for\s%f\sin\s($(PRJ_HEADERS_PUBLIC))\sdo\s@$(COPY)\s%f\s"$(INCLUDE_INSTALL_DIR)"\r\n+!endif\r\n+\r\n+!if\s"$(DISABLE_STANDARD_TARGETS)"\s==\s""\r\n+DISABLE_STANDARD_TARGETS\s=\s0\r\n+!endif\r\n+\r\n+!if\s"$(DISABLE_TARGET_setup)"\s==\s""\r\n+DISABLE_TARGET_setup\s=\s0\r\n+!endif\r\n+!if\s"$(DISABLE_TARGET_install)"\s==\s""\r\n+DISABLE_TARGET_install\s=\s0\r\n+!endif\r\n+!if\s"$(DISABLE_TARGET_clean)"\s==\s""\r\n+DISABLE_TARGET_clean\s=\s0\r\n+!endif\r\n+!if\s"$(DISABLE_TARGET_test)"\s==\s""\r\n+DISABLE_TARGET_test\s=\s0\r\n+!endif\r\n+!if\s"$(DISABLE_TARGET_shell)"\s==\s""\r\n+DISABLE_TARGET_shell\s=\s0\r\n+!endif\r\n+\r\n+!if\s!$(DISABLE_STANDARD_TARGETS)\r\n+!if\s!$(DISABLE_TARGET_setup)\r\n+setup:\sdefault-setup\r\n+!endif\r\n+!if\s!$(DISABLE_TARGET_install)\r\n+install:\sdefault-install\r\n+!endif\r\n+!if\s!$(DISABLE_TARGET_clean)\r\n+clean:\sdefault-clean\r\n+realclean:\shose\r\n+hose:\sdefault-hose\r\n+distclean:\srealclean\sdefault-distclean\r\n+!endif\r\n+!if\s!$(DISABLE_TARGET_test)\r\n+test:\sdefault-test\r\n+!endif\r\n+!if\s!$(DISABLE_TARGET_shell)\r\n+shell:\sdefault-shell\r\n+!endif\r\n+!endif\s#\sDISABLE_STANDARD_TARGETS\r\n\r\n J login oehhar J mimetype text/x-fossil-wiki J username oehhar K 604bb68b5c25a5c670b2f89dba68b92f7c57cb62 U oehhar Z af93efacc703b01d879fb94e9f6a0e0a