82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# Get digest
lassign [split [string map [list "_" "-"] $tail] "-"] kdf digest
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" [string map [list "-" "_"] $kdf] \
[format {[expr {[lsearch -nocase [tls::kdfs] %s] > -1}]} $kdf]]
if {$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]
|
>
>
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# Get digest
lassign [split [string map [list "_" "-"] $tail] "-"] kdf digest
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" [string map [list "-" "_"] $kdf] \
[format {[expr {[lsearch -nocase [tls::kdfs] %s] > -1}]} $kdf]]
if {$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]
|