Index: generic/tls.c ================================================================== --- generic/tls.c +++ generic/tls.c @@ -1066,11 +1066,14 @@ *------------------------------------------------------------------- */ void ListCallback(const OBJ_NAME *obj, void *arg) { Tcl_Obj *objPtr = (Tcl_Obj *) arg; if (1 || !obj->alias) { - Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewStringObj(obj->name,-1)); + /* Filter out signed digests (a.k.a signature algorithms) */ + if (strstr(obj->name, "rsa") == NULL && strstr(obj->name, "RSA") == NULL) { + Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewStringObj(obj->name,-1)); + } } } int DigestListCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Index: tests/ciphers.csv ================================================================== --- tests/ciphers.csv +++ tests/ciphers.csv @@ -13,11 +13,10 @@ command,# Helper functions,,,,,,,,, command,"proc lcompare {list1 list2} {set m """";set u """";foreach i $list1 {if {$i ni $list2} {lappend m $i}};foreach i $list2 {if {$i ni $list1} {lappend u $i}};return [list ""missing"" $m ""unexpected"" $u]}",,,,,,,,, command,proc exec_get {delim args} {return [split [exec openssl {*}$args] $delim]},,,,,,,,, command,"proc exec_get_ciphers {} {set list [list];set data [exec openssl ciphers ALL];foreach cipher [split $data "":""] {lappend list [string tolower $cipher]};return [lsort $list]}",,,,,,,,, command,"proc exec_get_digests {} {set list [list];set data [exec openssl dgst -list];foreach line [split $data ""\n""] {foreach digest $line {if {[string match ""-*"" $digest]} {lappend list [string trimleft $digest ""-""]}}};return [lsort $list]}",,,,,,,,, -command,"proc no_rsa {digests} {set list [list];foreach digest $digests {if {![string match -nocase ""*RSA*"" $digest]} {lappend list $digest}};return [lsort $list]}",,,,,,,,, ,,,,,,,,,, command,# Test list ciphers,,,,,,,,, CiphersAll,,,,lcompare [lsort [exec_get_ciphers]] [lsort [::tls::ciphers]],,,missing {} unexpected {},,, ,,,,,,,,,, command,# Test list ciphers for protocols,,,,,,,,, @@ -47,11 +46,11 @@ command,# Test version,,,,,,,,, Version,All,,,::tls::version,,glob,*,,, Version,OpenSSL,OpenSSL,,::tls::version,,glob,OpenSSL*,,, ,,,,,,,,,, command,# Test list digests,,,,,,,,, -Digest List,Digest List,,,lcompare [exec_get_digests] [no-rsa [tls::digests]],,,missing {} unexpected {},,, +Digest List,Digest List,,,lcompare [lsort [exec_get_digests]] [lsort [tls::digests]],,,missing {} unexpected {},,, ,,,,,,,,,, command,# Test Digests,,,,,,,,, Digest,md4 opt,,,"tls::md4 ""Example string for message digest tests.""",,,181CDCF9DB9B6FA8FC0A3BF9C34E29D9,,, Digest,md5 opt,,,"tls::md5 ""Example string for message digest tests.""",,,CCB1BE2E11D8183E843FF73DA8C6D206,,, Digest,sha1 opt,,,"tls::sha1 ""Example string for message digest tests.""",,,3AEFE840CA492C387E903F15ED6019E7AD833B47,,, Index: tests/ciphers.test ================================================================== --- tests/ciphers.test +++ tests/ciphers.test @@ -21,11 +21,10 @@ # Helper functions proc lcompare {list1 list2} {set m "";set u "";foreach i $list1 {if {$i ni $list2} {lappend m $i}};foreach i $list2 {if {$i ni $list1} {lappend u $i}};return [list "missing" $m "unexpected" $u]} proc exec_get {delim args} {return [split [exec openssl {*}$args] $delim]} proc exec_get_ciphers {} {set list [list];set data [exec openssl ciphers ALL];foreach cipher [split $data ":"] {lappend list [string tolower $cipher]};return [lsort $list]} proc exec_get_digests {} {set list [list];set data [exec openssl dgst -list];foreach line [split $data "\n"] {foreach digest $line {if {[string match "-*" $digest]} {lappend list [string trimleft $digest "-"]}}};return [lsort $list]} -proc no_rsa {digests} {set list [list];foreach digest $digests {if {![string match -nocase "*RSA*" $digest]} {lappend list $digest}};return [lsort $list]} # Test list ciphers test CiphersAll-1.1 {} -body { lcompare [lsort [exec_get_ciphers]] [lsort [::tls::ciphers]] @@ -120,11 +119,11 @@ } -match {glob} -result {OpenSSL*} # Test list digests test Digest_List-6.1 {Digest List} -body { - lcompare [exec_get_digests] [no-rsa [tls::digests]] + lcompare [lsort [exec_get_digests]] [lsort [tls::digests]] } -result {missing {} unexpected {}} # Test Digests test Digest-7.1 {md4 opt} -body {