Overview
References
Context
Changes
Modified tls.c
from [2675578b45]
to [b7a88587d1].
︙ | | |
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
|
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
|
-
+
|
*
* Side effects:
* create the ssl command, initialise ssl context
*
*-------------------------------------------------------------------
*/
int Tls_Init(Tcl_Interp *interp) {
DLLEXPORT int Tls_Init(Tcl_Interp *interp) {
const char tlsTclInitScript[] = {
#include "tls.tcl.h"
0x00
};
dprintf("Called");
|
︙ | | |
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
|
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
|
-
+
|
*
* Result:
* A standard Tcl error code.
*
*------------------------------------------------------*
*/
int Tls_SafeInit(Tcl_Interp *interp) {
DLLEXPORT int Tls_SafeInit(Tcl_Interp *interp) {
dprintf("Called");
return(Tls_Init(interp));
}
/*
*------------------------------------------------------*
*
|
︙ | | |
Modified tls.h
from [5e9dbae35a]
to [625cff2305].
︙ | | |
19
20
21
22
23
24
25
26
27
28
29
|
19
20
21
22
23
24
25
26
27
28
29
|
-
-
+
+
|
#define _TLS_H
#include <tcl.h>
/*
* Initialization routines -- our entire public C API.
*/
int Tls_Init(Tcl_Interp *interp);
int Tls_SafeInit(Tcl_Interp *interp);
DLLEXPORT int Tls_Init(Tcl_Interp *interp);
DLLEXPORT int Tls_SafeInit(Tcl_Interp *interp);
#endif /* _TLS_H */
|
Added win/README.txt version [3b89a850d2].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
Windows DLL Build instructions using nmake build system
2020-10-15 [email protected]
Properties:
- 32 bit DLL
- VisualStudio 2015
Note: Vuisual C++ 6 does not build OpenSSL (long long syntax error)
- Cygwin32 (temporary helper, please help to replace by tclsh)
- OpenSSL statically linked to TCLTLS DLL.
Note: Dynamic linking also works but results in a DLL dependeny on OPENSSL DLL's
1) Build OpenSSL static libraries:
OpenSSL source distribtution unpacked in:
c:\test\tcltls\Openssl_1_1_1h
- Install Perl from http://strawberryperl.com/download/5.32.0.1/strawberry-perl-5.32.0.1-32bit.msi
to C:\perl
(ActivePerl failed due to missing 32 bit console module)
- Install NASM Assembler:
https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win32/nasm-2.15.05-installer-x86.exe
to C:\Program Files (x86)\NASM
-> Visual Studio x86 native prompt.
set Path=%PATH%;C:\Program Files (x86)\NASM;C:\Perl\perl\bin
perl Configure VC-WIN32 --prefix=c:\test\tcltls\openssl --openssldir=c:\test\tcltls\openssldir no-shared no-filenames threads
nmake
nmake test
namke install
2) Build TCLTLS
Unzip distribution in:
c:\test\tcltls\tcltls-1.7.22
-> start cygwin bash prompt
cd /cygdrive/c/test/tcltls/tcltls-1.7.22
./gen_dh_params > dh_params.h
od -A n -v -t xC < 'tls.tcl' > tls.tcl.h.new.1
sed 's@[^0-9A-Fa-f]@@g;s@..@0x&, @g' < tls.tcl.h.new.1 > tls.tcl.h
rm -f tls.tcl.h.new.1
-> Visual Studio x86 native prompt.
cd C:\test\tcltls\tcltls-1.7.22\win
nmake -f makefile.vc TCLDIR=c:\test\tcl8610 SSL_INSTALL_FOLDER=C:\test\tcltls\openssl
nmake -f makefile.vc install TCLDIR=c:\test\tcl8610 INSTALLDIR=c:\test\tcltls SSL_INSTALL_FOLDER=C:\test\tcltls\openssl
tls.c:
Lines 1779, 1839: replace
int Tls_Init by
DLLEXPORT int Tls_Init
tls.h: same change
lappend auto_path {C:\test\tcltls\tls1.7.22}
package require tls
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added win/makefile.vc version [88282c8491].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
# call nmake with additional parameter SSL_INSTALL_FOLDER= with the
# OpenSSL instalation folder following.
PROJECT=tls
DOTVERSION = 1.7.22
PRJ_INCLUDES = -I"$(SSL_INSTALL_FOLDER)\include"
PRJ_DEFINES = -D NO_SSL2 -D NO_SSL3 -D _CRT_SECURE_NO_WARNINGS
PRJ_LIBS = \
"$(SSL_INSTALL_FOLDER)\lib\libssl.lib" \
"$(SSL_INSTALL_FOLDER)\lib\libcrypto.lib" \
WS2_32.LIB GDI32.LIB ADVAPI32.LIB CRYPT32.LIB USER32.LIB
PRJ_OBJS = $(TMP_DIR)\tls.obj \
$(TMP_DIR)\tlsBIO.obj \
$(TMP_DIR)\tlsIO.obj \
$(TMP_DIR)\tlsX509.obj
!include "rules-ext.vc"
!include "targets.vc"
pkgindex: default-pkgindex
|
| | | | | | | | | | | | | | | | | | | | | | |
Added win/targets.vc version [77a0a274fa].