Check-in [ae4bd8026c]
Overview
Comment:Updated test comparisons to handle OpenSSL 3 format data
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | crypto
Files: files | file ages | folders
SHA3-256: ae4bd8026c02e70f059a1c48d902e7737f28350e145b12b78fe54b2da2638a3b
User & Date: bohagan on 2024-03-10 04:44:35
Other Links: branch diff | manifest | tags
Context
2024-03-10
05:06
Reformatted test case helper procedures check-in: 89706c884d user: bohagan tags: crypto
04:44
Updated test comparisons to handle OpenSSL 3 format data check-in: ae4bd8026c user: bohagan tags: crypto
04:27
Updated make test scripts tool to better embed TCL procedures and handle quoted data check-in: e650e24320 user: bohagan tags: crypto
Changes

Modified tests/info.csv from [8ef01eecbc] to [3df08db6b4].

26
27
28
29
30
31
32


33
34
35
36
37
38
39
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41







+
+







",,,,,,,,,
command,proc exec_get {delim args} {return [split [exec openssl {*}$args] $delim]},,,,,,,,,
command,"proc exec_get_ciphers {} {
    set list [list]
    set data [exec openssl list -cipher-algorithms]
    foreach line [split $data ""\n""] {
        set line [string trim $line]
        if {$line eq ""Legacy:""} continue
        if {$line eq ""Provided:""} break
        foreach {cipher ptr alias} [split [string trim $line]] {
            lappend list [string tolower $cipher]
        }
    }
    return [lsort -unique $list]
}
",,,,,,,,,
50
51
52
53
54
55
56
57


58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

75
76
77
78
79
80
81
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

77
78
79
80
81
82
83
84







-
+
+
















-
+







}
",,,,,,,,,
command,"proc exec_get_pkeys {} {
    set list [list]
    set data [exec openssl list -public-key-methods]
    foreach line [split $data ""\n""] {
        set line [string trim $line]
        if {[string match ""Type:*"" $line]} continue
        if {$line eq ""Legacy:"" || [string match ""Type:*"" $line]} continue
        if {$line eq ""Provided:""} break
        lappend list [string trim $line]
    }
    return $list
}
",,,,,,,,,
command,proc exec_get_macs {} {return [list cmac hmac]},,,,,,,,,
command,"proc list_tolower {list} {
    set result [list]
    foreach element $list {
        lappend result [string tolower $element]
    }
    return $result
}
",,,,,,,,,
,,,,,,,,,,
command,# Test list ciphers,,,,,,,,,
Ciphers List,All,,,lcompare [lsort [exec_get_ciphers]] [list_tolower [lsort [::tls::ciphers]]],,,missing {rc5 rc5-cbc rc5-cfb rc5-ecb rc5-ofb} unexpected {aes-128-ccm aes-128-gcm aes-192-ccm aes-192-gcm aes-256-ccm aes-256-gcm},,,
Ciphers List,All,,,lcompare [lsort [exec_get_ciphers]] [list_tolower [lsort [::tls::ciphers]]],,,missing {} unexpected {aes-128-ccm aes-128-gcm aes-192-ccm aes-192-gcm aes-256-ccm aes-256-gcm},,,
,,,,,,,,,,
command,# Test list ciphers for protocols,,,,,,,,,
Ciphers By Protocol,SSL2,ssl2,,"lcompare [exec_get "":"" ciphers -ssl2] [::tls::ciphers ssl2]",,,missing {} unexpected {},,,
Ciphers By Protocol,SSL3,ssl3,,"lcompare [exec_get "":"" ciphers -ssl3] [::tls::ciphers ssl3]",,,missing {} unexpected {},,,
Ciphers By Protocol,TLS1.0,tls1,,"lcompare [exec_get "":"" ciphers -tls1] [::tls::ciphers tls1]",,,missing {} unexpected {},,,
Ciphers By Protocol,TLS1.1,tls1.1,,"lcompare [exec_get "":"" ciphers -tls1_1] [::tls::ciphers tls1.1]",,,missing {} unexpected {},,,
Ciphers By Protocol,TLS1.2,tls1.2,,"lcompare [exec_get "":"" ciphers -tls1_2] [::tls::ciphers tls1.2]",,,missing {} unexpected {},,,

Modified tests/info.test from [203c5a421e] to [855ee5e7e2].

35
36
37
38
39
40
41


42
43
44
45
46
47
48
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50







+
+








proc exec_get {delim args} {return [split [exec openssl {*}$args] $delim]}
proc exec_get_ciphers {} {
    set list [list]
    set data [exec openssl list -cipher-algorithms]
    foreach line [split $data "\n"] {
        set line [string trim $line]
        if {$line eq "Legacy:"} continue
        if {$line eq "Provided:"} break
        foreach {cipher ptr alias} [split [string trim $line]] {
            lappend list [string tolower $cipher]
        }
    }
    return [lsort -unique $list]
}

59
60
61
62
63
64
65
66


67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

88
89
90
91
92
93
94
61
62
63
64
65
66
67

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

90
91
92
93
94
95
96
97







-
+
+




















-
+







}

proc exec_get_pkeys {} {
    set list [list]
    set data [exec openssl list -public-key-methods]
    foreach line [split $data "\n"] {
        set line [string trim $line]
        if {[string match "Type:*" $line]} continue
        if {$line eq "Legacy:" || [string match "Type:*" $line]} continue
        if {$line eq "Provided:"} break
        lappend list [string trim $line]
    }
    return $list
}

proc exec_get_macs {} {return [list cmac hmac]}
proc list_tolower {list} {
    set result [list]
    foreach element $list {
        lappend result [string tolower $element]
    }
    return $result
}


# Test list ciphers


test Ciphers_List-1.1 {All} -body {
	lcompare [lsort [exec_get_ciphers]] [list_tolower [lsort [::tls::ciphers]]]
    } -result {missing {rc5 rc5-cbc rc5-cfb rc5-ecb rc5-ofb} unexpected {aes-128-ccm aes-128-gcm aes-192-ccm aes-192-gcm aes-256-ccm aes-256-gcm}}
    } -result {missing {} unexpected {aes-128-ccm aes-128-gcm aes-192-ccm aes-192-gcm aes-256-ccm aes-256-gcm}}

# Test list ciphers for protocols


test Ciphers_By_Protocol-2.1 {SSL2} -constraints {ssl2} -body {
	lcompare [exec_get ":" ciphers -ssl2] [::tls::ciphers ssl2]
    } -result {missing {} unexpected {}}