Tcl Library Source Code

Changes On Branch audit-critcl-code
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch audit-critcl-code Excluding Merge-Ins

This is equivalent to a diff from 498c380fbb to e5180e9f92

2013-10-29
22:51
Merge sha* fixes. Audit of the other critcl parts was done, and no other misuse of cheaders was found. check-in: ad20454023 user: andreask tags: trunk
21:52
Fix issues with critcl usage in the sha code. Do audit of the other critcl-based parts for anologous issues. Closed-Leaf check-in: e5180e9f92 user: andreask tags: audit-critcl-code
07:03
Ticket [1d2b62d10d]: Fixed unwanted double-close of channel when accessing a non-existing thumbnail in a file. Introduced by the refactoring. Bumped version to 0.5. check-in: 498c380fbb user: aku tags: trunk
06:35
Ticket [a761133422]. cleanup called imap close, not channel close. Fixed. isableto failed to initialize the result variable. Fixed. Bumped version to 0.5.2. check-in: 28487136f1 user: aku tags: trunk

Changes to modules/sha1/ChangeLog.









1
2
3
4
5
6
7








2013-02-01  Andreas Kupries  <[email protected]>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <[email protected]>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2013-10-29  Andreas Kupries  <[email protected]>

	* sha1.c: Replaced misuse of cheaders for -D... with proper
	* sha1c.tcl: cflags. Depending on whether critcl v2 or v3
	* sha256.c: was used the TCL_BYTE_ORDER was not set, allowing
	* sha256c.tcl: build of tcllibc with code for wrong byte order.
	  Also added code to detect missing definition, and fail build.

2013-02-01  Andreas Kupries  <[email protected]>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <[email protected]>

Changes to modules/sha1/sha1.c.

20
21
22
23
24
25
26




27
28
29
30
31
32
33
#endif

#define SHA1HANDSOFF		/* Copies data before messing with it. */

#include <assert.h>
#include <string.h>
#include "sha1.h"





#ifndef _DIAGASSERT
#define _DIAGASSERT(cond)	assert(cond)
#endif

#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))








>
>
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#endif

#define SHA1HANDSOFF		/* Copies data before messing with it. */

#include <assert.h>
#include <string.h>
#include "sha1.h"

#ifndef TCL_BYTE_ORDER
#error "-DTCL_BYTE_ORDER missing"
#endif

#ifndef _DIAGASSERT
#define _DIAGASSERT(cond)	assert(cond)
#endif

#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))

Changes to modules/sha1/sha1c.tcl.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
critcl::csources sha1.c;                # NetBSD SHA1 implementation

if {$tcl_platform(byteOrder) eq "littleEndian"} {
    set byteOrder 1234
} else {
    set byteOrder 4321
}
critcl::cheaders -DTCL_BYTE_ORDER=$byteOrder

namespace eval ::sha1 {

    critcl::ccode {
        #include "sha1.h"
        #include <stdlib.h>
        #include <assert.h>







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
critcl::csources sha1.c;                # NetBSD SHA1 implementation

if {$tcl_platform(byteOrder) eq "littleEndian"} {
    set byteOrder 1234
} else {
    set byteOrder 4321
}
critcl::cflags -DTCL_BYTE_ORDER=$byteOrder

namespace eval ::sha1 {

    critcl::ccode {
        #include "sha1.h"
        #include <stdlib.h>
        #include <assert.h>

Changes to modules/sha1/sha256.c.

54
55
56
57
58
59
60




61
62
63
64
65
66
67

#include "sha256.h"

#ifndef lint
static const char rcsid[] =
	"$Id: sha256.c,v 1.3 2007/03/25 11:33:41 patthoyts Exp $";
#endif /* !lint */





#if TCL_BYTE_ORDER==1234
#else
#define WORDS_BIGENDIAN
#endif









>
>
>
>







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

#include "sha256.h"

#ifndef lint
static const char rcsid[] =
	"$Id: sha256.c,v 1.3 2007/03/25 11:33:41 patthoyts Exp $";
#endif /* !lint */

#ifndef TCL_BYTE_ORDER
#error "-DTCL_BYTE_ORDER missing"
#endif

#if TCL_BYTE_ORDER==1234
#else
#define WORDS_BIGENDIAN
#endif


Changes to modules/sha1/sha256c.tcl.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
critcl::csources sha256.c;     # FreeBSD SHA256 implementation

if {$tcl_platform(byteOrder) eq "littleEndian"} {
    set byteOrder 1234
} else {
    set byteOrder 4321
}
critcl::cheaders -DTCL_BYTE_ORDER=$byteOrder

namespace eval ::sha2 {
    # Supporting code for the main command.
    catch {
        #critcl::debug memory symbols
    }








|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
critcl::csources sha256.c;     # FreeBSD SHA256 implementation

if {$tcl_platform(byteOrder) eq "littleEndian"} {
    set byteOrder 1234
} else {
    set byteOrder 4321
}
critcl::cflags -DTCL_BYTE_ORDER=$byteOrder

namespace eval ::sha2 {
    # Supporting code for the main command.
    catch {
        #critcl::debug memory symbols
    }

Changes to modules/tcllibc.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
# Umbrella, i.e. Bundle, to put all of the critcl modules which are
# found in Tcllib in one shared library.

package require critcl
package provide tcllibc 0.3.9

namespace eval ::tcllib {
    variable tcllibc_rcsid {$Id: tcllibc.tcl,v 1.13 2010/05/25 19:26:17 andreas_kupries Exp $}
    critcl::ccode {
        /* no code required in this file */
    }
}




|







1
2
3
4
5
6
7
8
9
10
11
12
# Umbrella, i.e. Bundle, to put all of the critcl modules which are
# found in Tcllib in one shared library.

package require critcl
package provide tcllibc 0.3.10

namespace eval ::tcllib {
    variable tcllibc_rcsid {$Id: tcllibc.tcl,v 1.13 2010/05/25 19:26:17 andreas_kupries Exp $}
    critcl::ccode {
        /* no code required in this file */
    }
}