@@ -550,7 +550,11 @@ func printProtocolInfo(protocol string, supportedProtocols map[string]bool) {
550550 fmtc .Println ("{y}No{!}" )
551551 }
552552 case protocol == "TLS 1.0" , protocol == "TLS 1.1" :
553- fmtc .Printf ("{y}%s{!}\n " , printBool (supportedProtocols [protocol ]))
553+ if supportedProtocols [protocol ] {
554+ fmtc .Println ("{y}Yes{!}" )
555+ } else {
556+ fmtc .Println ("No" )
557+ }
554558 case protocol == "SSL 3.0" && supportedProtocols [protocol ]:
555559 fmtc .Printf ("{r}%s (INSECURE){!}\n " , printBool (supportedProtocols [protocol ]))
556560 case protocol == "SSL 2.0" && supportedProtocols [protocol ]:
@@ -1099,28 +1103,16 @@ func printEndpointNamedGroups(namedGroups *sslscan.NamedGroups) {
10991103 return
11001104 }
11011105
1102- groups := getNamedGroups ( namedGroups )
1106+ var groups [] string
11031107
1104- for i := 0 ; i < len (groups ); i ++ {
1105- switch i {
1106- case 0 :
1107- // skip
1108- default :
1109- fmtc .NewLine ()
1110- fmtc .Printf (" %-40s {s}|{!} " , "" )
1111- }
1112-
1113- fmtc .Printf (strings .Join (groups [i ], ", " ))
1114-
1115- if i != len (groups )- 1 {
1116- fmtc .Printf ("," )
1117- }
1108+ for _ , group := range namedGroups .List {
1109+ groups = append (groups , group .Name )
11181110 }
11191111
1112+ fmtc .Print (strings .Join (groups , ", " ))
1113+
11201114 if namedGroups .Preference {
11211115 fmtc .Printf (" {s-}(server preferred order){!}\n " )
1122- } else {
1123- fmtc .Printf ("\n " )
11241116 }
11251117}
11261118
@@ -1366,27 +1358,6 @@ func getProtocols(protocols []*sslscan.Protocol) map[string]bool {
13661358 return supported
13671359}
13681360
1369- // getNamedGroups returns slice of slices with named groups
1370- func getNamedGroups (groups * sslscan.NamedGroups ) [][]string {
1371- var result [][]string
1372- var buf []string
1373-
1374- for _ , group := range groups .List {
1375- buf = append (buf , group .Name )
1376-
1377- if len (buf ) == 3 {
1378- result = append (result , buf )
1379- buf = nil
1380- }
1381- }
1382-
1383- if buf != nil {
1384- result = append (result , buf )
1385- }
1386-
1387- return result
1388- }
1389-
13901361// getPinsFromPolicy returns slice with all pins in policy
13911362func getPinsFromPolicy (policy * sslscan.HPKPPolicy ) []string {
13921363 var pins []string
0 commit comments