Tcl Library Source Code

Check-in [8175173735]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Ticket [861f53ff24]. Added proper initialization to CreateNonce when falling back to md5 (no dev/urandom). Bumped version to 1.3.3.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 817517373557d767a79ee55dc361e0c005b4f288
User & Date: andreask 2014-01-21 17:28:38
References
2014-01-21
17:29 Closed ticket [861f53ff24]: md5_bin is used from SASL::SCRAM plus 6 other changes artifact: a4e132ed9a user: aku
Context
2014-01-21
17:39
Ticket [9318a6687f]: Applied patch by Max Jarek to update the code to the IBAN Registry version 47. Bumped package version to 1.4. check-in: 3c45e337d4 user: andreask tags: trunk
17:28
Ticket [861f53ff24]. Added proper initialization to CreateNonce when falling back to md5 (no dev/urandom). Bumped version to 1.3.3. check-in: 8175173735 user: andreask tags: trunk
2014-01-20
05:17
Corrected use of bandwidth, adjusted a test to take care of pecularities of the kernels check-in: 991cdf14aa user: markus tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/sasl/ChangeLog.







1
2
3
4
5
6
7





2013-12-07  Andreas Kupries <[email protected]>

	* gtoken.man: Added mini manpages for the SASL mechanisms
	* ntlm.man: residing in their own packages. They mainly
	* scram.man: refer back to the main SASL documentation.

2013-12-06  Andreas Kupries <[email protected]>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
2014-01-21  Andreas Kupries <[email protected]>

	* pkgIndex.tcl: Ticket [861f53ff24]. Added proper initialization
	* sal.tcl: to CreateNonce when falling back to md5 (no
	* sasl.man: dev/urandom). Bumped version to 1.3.3.

2013-12-07  Andreas Kupries <[email protected]>

	* gtoken.man: Added mini manpages for the SASL mechanisms
	* ntlm.man: residing in their own packages. They mainly
	* scram.man: refer back to the main SASL documentation.

2013-12-06  Andreas Kupries <[email protected]>

Changes to modules/sasl/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
# pkgIndex.tcl                                                -*- tcl -*-
# Copyright (C) 2005 Pat Thoyts <[email protected]>
# $Id: pkgIndex.tcl,v 1.11 2008/01/29 00:51:39 patthoyts Exp $
if {![package vsatisfies [package provide Tcl] 8.2]} {
    # PRAGMA: returnok
    return
}
package ifneeded SASL 1.3.2 [list source [file join $dir sasl.tcl]]
package ifneeded SASL::NTLM 1.1.2 [list source [file join $dir ntlm.tcl]]
package ifneeded SASL::XGoogleToken 1.0.1 [list source [file join $dir gtoken.tcl]]
package ifneeded SASL::SCRAM 0.1 [list source [file join $dir scram.tcl]]






|
|

|
1
2
3
4
5
6
7
8
9
10
11
# pkgIndex.tcl                                                -*- tcl -*-
# Copyright (C) 2005 Pat Thoyts <[email protected]>
# $Id: pkgIndex.tcl,v 1.11 2008/01/29 00:51:39 patthoyts Exp $
if {![package vsatisfies [package provide Tcl] 8.2]} {
    # PRAGMA: returnok
    return
}
package ifneeded SASL               1.3.3 [list source [file join $dir sasl.tcl]]
package ifneeded SASL::NTLM         1.1.2 [list source [file join $dir ntlm.tcl]]
package ifneeded SASL::XGoogleToken 1.0.1 [list source [file join $dir gtoken.tcl]]
package ifneeded SASL::SCRAM        0.1   [list source [file join $dir scram.tcl]]

Changes to modules/sasl/sasl.man.

1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[comment {-*- tcl -*- doctools manpage}]

[manpage_begin SASL n 1.3.0]
[keywords authentication]
[keywords SASL]
[copyright {2005-2006, Pat Thoyts <[email protected]>}]
[moddesc {Simple Authentication and Security Layer (SASL)}]
[titledesc {Implementation of SASL mechanisms for Tcl}]
[category  Networking]
[require Tcl 8.2]
[require SASL [opt 1.3]]
[description]
[para]

The Simple Authentication and Security Layer (SASL) is a framework
for providing authentication and authorization to comunications
protocols. The SASL framework is structured to permit negotiation
among a number of authentication mechanisms. SASL may be used in
>
|







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[comment {-*- tcl -*- doctools manpage}]
[vset SASL_VERSION 1.3.3]
[manpage_begin SASL n [vset SASL_VERSION]]
[keywords authentication]
[keywords SASL]
[copyright {2005-2006, Pat Thoyts <[email protected]>}]
[moddesc {Simple Authentication and Security Layer (SASL)}]
[titledesc {Implementation of SASL mechanisms for Tcl}]
[category  Networking]
[require Tcl 8.2]
[require SASL [opt [vset SASL_VERSION]]]
[description]
[para]

The Simple Authentication and Security Layer (SASL) is a framework
for providing authentication and authorization to comunications
protocols. The SASL framework is structured to permit negotiation
among a number of authentication mechanisms. SASL may be used in

Changes to modules/sasl/sasl.tcl.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
599
600
601
602
603
604
605

606
607
608
609
610
611
612
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.2

namespace eval ::SASL {
    variable version 1.3.2
    variable rcsid {$Id: sasl.tcl,v 1.12 2008/01/29 00:51:39 patthoyts Exp $}

    variable uid
    if {![info exists uid]} { set uid 0 }

    variable mechanisms
    if {![info exists mechanisms]} {
................................................................................
            set f [open /dev/urandom r]
            fconfigure $f -translation binary -buffering none
            set bytes [read $f 16]
            close $f
        }
    }
    if {[string length $bytes] < 1} {

        set bytes [md5_bin [clock seconds]:[pid]:[expr {rand()}]]
    }
    return [binary scan $bytes h* r; set r]
}

::SASL::register DIGEST-MD5 40 \
    ::SASL::DIGEST-MD5:client ::SASL::DIGEST-MD5:server






|







 







>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.2

namespace eval ::SASL {
    variable version 1.3.3
    variable rcsid {$Id: sasl.tcl,v 1.12 2008/01/29 00:51:39 patthoyts Exp $}

    variable uid
    if {![info exists uid]} { set uid 0 }

    variable mechanisms
    if {![info exists mechanisms]} {
................................................................................
            set f [open /dev/urandom r]
            fconfigure $f -translation binary -buffering none
            set bytes [read $f 16]
            close $f
        }
    }
    if {[string length $bytes] < 1} {
        md5_init
        set bytes [md5_bin [clock seconds]:[pid]:[expr {rand()}]]
    }
    return [binary scan $bytes h* r; set r]
}

::SASL::register DIGEST-MD5 40 \
    ::SASL::DIGEST-MD5:client ::SASL::DIGEST-MD5:server