Skip to content

Commit

Permalink
Fix: an issue where supported protocols are not unique
Browse files Browse the repository at this point in the history
  • Loading branch information
adedayo committed Jun 13, 2019
1 parent cd63f34 commit 9adf3a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkg/model/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ func (cc *CipherConfig) getAuthPerf() int {
return 10
case "SRP":
return 10

}
if strings.Contains(cc.Cipher, "SCSV") {
//these are signalling ciphers just return a large multiplier
Expand Down
14 changes: 14 additions & 0 deletions pkg/tlsscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,20 @@ func scanHost(hostPort tlsmodel.HostAndPort, config tlsmodel.ScanConfig, serverN
for res := range mergeHandShakeChannels(handshakeChannels...) {
process(res, &result)
}

//ensure supported protocols are unique
if len(result.SupportedProtocols) > 1 {
protocols := make(map[uint16]bool)
for _, p := range result.SupportedProtocols {
protocols[p] = true
}
supported := []uint16{}
for p := range protocols {
supported = append(supported, p)
}
result.SupportedProtocols = supported
}

sort.Sort(uint16Sorter(result.SupportedProtocols))

//check support for TLS_FALLBACK_SCSV
Expand Down

0 comments on commit 9adf3a5

Please sign in to comment.