Diff

Differences From Artifact [6510cbad4a]:

To Artifact [37d1b71b39]:


112
113
114
115
116
117
118

119
120
121
122
123
124
125
126
127
128
129

130
131
132
133
134
135
136
	set digest ""
	set cipher ""
    }
    set params [list]

    # Add config info
    puts $out [format "# Auto generated from \"%s\"" [file tail $filename]]

    puts $out "package require tls"
    puts $out "package require tcltest\n"
    puts $out [format "tcltest::testConstraint %s %s" $mac \
	[format {[expr {[lsearch -nocase [tls::macs] %s] > -1}]} [string map [list "-" "_"] $mac]]]
    if {[string match -nocase "CMAC" $mac] && $cipher ne ""} {
	puts $out [format "tcltest::testConstraint %s %s" [string map [list "-" "_"] $cipher] \
	    [format {[expr {[lsearch -nocase [tls::ciphers] %s] > -1}]} $cipher]]
    } elseif {[string match -nocase "HMAC" $mac] && $digest ne ""} {
	puts $out [format "tcltest::testConstraint %s %s" [string map [list "-" "_"] $digest] \
	    [format {[expr {[lsearch -nocase [tls::digests] %s] > -1}]} $digest]]
    }

    puts $out ""

    # Process file
    while {![eof $ch]} {
	gets $ch line
	set line [string trim $line]
	set len [string length $line]







>











>







112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
	set digest ""
	set cipher ""
    }
    set params [list]

    # Add config info
    puts $out [format "# Auto generated from \"%s\"" [file tail $filename]]
    puts $out [format "lappend auto_path %s" {[file dirname [file dirname [file dirname [file dirname [file join [pwd] [info script]]]]]]}]
    puts $out "package require tls"
    puts $out "package require tcltest\n"
    puts $out [format "tcltest::testConstraint %s %s" $mac \
	[format {[expr {[lsearch -nocase [tls::macs] %s] > -1}]} [string map [list "-" "_"] $mac]]]
    if {[string match -nocase "CMAC" $mac] && $cipher ne ""} {
	puts $out [format "tcltest::testConstraint %s %s" [string map [list "-" "_"] $cipher] \
	    [format {[expr {[lsearch -nocase [tls::ciphers] %s] > -1}]} $cipher]]
    } elseif {[string match -nocase "HMAC" $mac] && $digest ne ""} {
	puts $out [format "tcltest::testConstraint %s %s" [string map [list "-" "_"] $digest] \
	    [format {[expr {[lsearch -nocase [tls::digests] %s] > -1}]} $digest]]
    }
    puts $out "catch {tls::provider legacy}"
    puts $out ""

    # Process file
    while {![eof $ch]} {
	gets $ch line
	set line [string trim $line]
	set len [string length $line]