Overview
Comment: | Extracted from https://www.codebykevin.com/fossil.cgi/tcltls |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | codebykevin | nijtmans |
Files: | files | file ages | folders |
SHA3-256: |
737ebb95769e2500f394cc1cd2227bba |
User & Date: | jan.nijtmans on 2024-01-25 22:56:39 |
Other Links: | branch diff | manifest | tags |
Context
2024-02-12
| ||
10:39 | Merge 1.8 check-in: 3824e80ab5 user: jan.nijtmans tags: codebykevin, nijtmans | |
2024-01-25
| ||
22:56 | Extracted from https://www.codebykevin.com/fossil.cgi/tcltls check-in: 737ebb9576 user: jan.nijtmans tags: codebykevin, nijtmans | |
22:41 | Add some newer TEA files, not enough to build yet check-in: 6a87953d33 user: jan.nijtmans tags: nijtmans | |
Changes
Modified ChangeLog
from [7400a29b58]
to [03077231f7].
|
Modified README.txt
from [4d858d5c33]
to [3dc72eec51].
|
Modified pkgIndex.tcl.in
from [6c4c62dd82]
to [13eb9e8d80].
| 1 2 3 4 5 6 7 8 | - + |
|
︙ |
Modified tclOpts.h
from [1a6cf1121d]
to [38710f0c1f].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + | #define OPTOBJ(option, var) \ OPT_PROLOG(option) \ var = objv[idx]; \ OPT_POSTLOG() #define OPTSTR(option, var) \ OPT_PROLOG(option) \ |
︙ |
Modified tests/all.tcl
from [d55b3d9c74]
to [07b66e84a3].
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | + | #set auto_path [linsert $auto_path 0 [file normalize [file join [file dirname [info script]] ..]]] set auto_path [linsert $auto_path 0 [file normalize [pwd]]] if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import ::tcltest::* } set ::tcltest::testSingleFile false set ::tcltest::testsDirectory [file dir [info script]] # We should ensure that the testsDirectory is absolute. # This was introduced in Tcl 8.3+'s tcltest, so we need a catch. catch {::tcltest::normalizePath ::tcltest::testsDirectory} |
︙ |
Modified tls.c
from [ff2cf80f27]
to [8a6e3d7442].
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + + + | * */ #include "tlsInt.h" #include "tclOpts.h" #include <stdlib.h> #if TCL_MAJOR_VERSION < 9 typedef int Tcl_Size; #endif /* * External functions */ /* * Forward declarations */ |
︙ | |||
269 270 271 272 273 274 275 | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | - + | *------------------------------------------------------------------- */ static int VerifyCallback(int ok, X509_STORE_CTX *ctx) { Tcl_Obj *cmdPtr, *result; char *errStr, *string; |
︙ | |||
365 366 367 368 369 370 371 | 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - + | Tcl_Obj *cmdPtr; dprintf("Called"); if (msg && *msg) { Tcl_SetErrorCode(statePtr->interp, "SSL", msg, (char *)NULL); } else { |
︙ | |||
647 648 649 650 651 652 653 | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 | - + | dprintf("Called"); if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "channel"); return(TCL_ERROR); } |
︙ | |||
778 779 780 781 782 783 784 | 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 | - + - + | #endif if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "channel ?options?"); return TCL_ERROR; } |
︙ | |||
1412 1413 1414 1415 1416 1417 1418 | 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 | - + - + | char *channelName, *ciphers; int mode; dprintf("Called"); switch (objc) { case 2: |
︙ | |||
1772 1773 1774 1775 1776 1777 1778 | 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 | - + - + | * * Side effects: * create the ssl command, initialise ssl context * *------------------------------------------------------------------- */ |
︙ | |||
1832 1833 1834 1835 1836 1837 1838 | 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 | - + | * * Result: * A standard Tcl error code. * *------------------------------------------------------* */ |
︙ |
Modified tls.h
from [625cff2305]
to [302eba7b94].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 | - - + + | #define _TLS_H #include <tcl.h> /* * Initialization routines -- our entire public C API. */ |
Modified tlsIO.c
from [14842554dd]
to [89e9d74f31].
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 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 | + + + + + | * Also work done by the follow people provided the impetus to do this "right": * tclSSL (Colin McCormack, Shared Technology) * SSLtcl (Peter Antman) * */ #include "tlsInt.h" /* * Forward declarations */ static int TlsBlockModeProc (ClientData instanceData, int mode); #if TCL_MAJOR_VERSION < 9 static int TlsCloseProc (ClientData instanceData, Tcl_Interp *interp); #else static int TlsClose2Proc (ClientData instanceData, Tcl_Interp *interp, int flags); #endif static int TlsInputProc (ClientData instanceData, char *buf, int bufSize, int *errorCodePtr); static int TlsOutputProc (ClientData instanceData, const char *buf, int toWrite, int *errorCodePtr); static int TlsGetOptionProc (ClientData instanceData, Tcl_Interp *interp, const char *optionName, Tcl_DString *dsPtr); static void TlsWatchProc (ClientData instanceData, int mask); static int TlsGetHandleProc (ClientData instanceData, int direction, ClientData *handlePtr); static int TlsNotifyProc (ClientData instanceData, int mask); #if 0 |
︙ | |||
76 77 78 79 80 81 82 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + + + + + | * (2) With stubs we just determine the difference between the older * and modern variant and overallocate accordingly if compiled * against an older variant. */ size = sizeof(Tcl_ChannelType); /* Base size */ tlsChannelType = (Tcl_ChannelType *) ckalloc(size); |
︙ | |||
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | + + + + + + + + + + + + + + + + + - - - + + + + | * * Side effects: * Closes the socket of the channel. * *------------------------------------------------------------------- */ static int TlsCloseProc(ClientData instanceData, Tcl_Interp *interp) { State *statePtr = (State *) instanceData; dprintf("TlsCloseProc(%p)", (void *) statePtr); Tls_Clean(statePtr); Tcl_EventuallyFree((ClientData)statePtr, Tls_Free); dprintf("Returning TCL_OK"); return(TCL_OK); /* Interp is unused. */ interp = interp; } static int TlsClose2Proc(ClientData instanceData, Tcl_Interp *interp, int flags) { if ((flags & (TCL_CLOSE_READ|TCL_CLOSE_WRITE)) == 0) { State *statePtr = (State *) instanceData; dprintf("TlsCloseProc(%p)", (void *) statePtr); Tls_Clean(statePtr); Tcl_EventuallyFree((ClientData)statePtr, Tls_Free); dprintf("Returning TCL_OK"); return(TCL_OK); |
︙ | |||
639 640 641 642 643 644 645 | 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | - + | * None. * *------------------------------------------------------------------- */ static int TlsGetOptionProc(ClientData instanceData, /* Socket state. */ Tcl_Interp *interp, /* For errors - can be NULL. */ |
︙ | |||
820 821 822 823 824 825 826 827 828 829 | 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 | + - - | if (statePtr->flags & TLS_TCL_CALLBACK) { dprintf("Returning 0 due to callback"); return 0; } dprintf("Calling Tls_WaitForConnect"); errorCode = 0; if (Tls_WaitForConnect(statePtr, &errorCode, 1) < 0) { if (errorCode == EAGAIN) { dprintf("Async flag could be set (didn't check) and errorCode == EAGAIN: Returning 0"); |
︙ |
Modified win/README.txt
from [196e5f2ba2]
to [fb324cb603].
1 2 3 4 | 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 | + - - + + - - + - - - + - - - - + - - - - - - - + - - + - - + - - - - - + - - - + + - + - + + - + + - + + - + - - - + + + | Windows DLL Build instructions using nmake build system 2020-10-15 Harald.Oehlmann@elmicron.de 2023-08-22 Kevin Walzer (kw@codebykevin.com) Properties: |
Modified win/makefile.vc
from [77c38ff3cf]
to [a945692c7e].
1 2 3 4 5 6 7 8 9 10 11 12 | 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 | + + + + + - + + - + - + + + | # call nmake with additional parameter SSL_INSTALL_FOLDER= with the # OpenSSL instalation folder following. PROJECT=tls DOTVERSION = 1.8.0 PRJLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT) PRJLIB = $(OUT_DIR)\$(PRJLIBNAME) !include "rules-ext.vc" 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" \ |