frontend: add special case for RENEGOTIATION_INFO_SCSV cipher suite
TLS_EMPTY_RENEGOTIATION_INFO_SCSV is not a real cipher suite, it is a signal indicating support for secure renegotiation. This commit removes its broken ciphersuite.info link and its misapplied "(not recommended)" string from the HTML and gemtext frontends.
This commit is contained in:
parent
690bb167a4
commit
6bbec77a83
|
@ -36,7 +36,7 @@ type CipherSuiteInfo = struct {
|
|||
|
||||
// TLS signaling cipher suite values
|
||||
const (
|
||||
scsvRenegotiation uint16 = 0x00ff
|
||||
SCSVRenegotiation uint16 = 0x00ff
|
||||
)
|
||||
|
||||
func parseCipherSuitesCSV() map[uint16]CipherSuiteInfo {
|
||||
|
|
|
@ -125,7 +125,7 @@ func (m *ClientHelloMsg) Unmarshal(data []byte) bool {
|
|||
if !cipherSuites.ReadUint16(&suite) {
|
||||
return false
|
||||
}
|
||||
if suite == scsvRenegotiation {
|
||||
if suite == SCSVRenegotiation {
|
||||
m.Highlights.SecureRenegotiationSupport = true
|
||||
}
|
||||
m.CipherSuites = append(m.CipherSuites, suite)
|
||||
|
|
|
@ -69,8 +69,11 @@ func getCipherSuiteHTML(cs clienthello.CipherSuite) string {
|
|||
s = "<span class=\"dim\">0x" + csInfo.HexCode + " (GREASE)</span>"
|
||||
} else {
|
||||
visibleName := strings.Join(strings.Split(csInfo.Name, "_"), "_<wbr/>")
|
||||
if csInfo.Recommended {
|
||||
if csInfo.HexCode[:2] == "13" {
|
||||
if csInfo.Code == clienthello.SCSVRenegotiation {
|
||||
// TLS_EMPTY_RENEGOTIATION_INFO_SCSV
|
||||
s = visibleName
|
||||
} else if csInfo.Recommended {
|
||||
if csInfo.HexCode[:2] == "13" { // TLS 1.3 cipher suites
|
||||
s = "<a href=\"https://ciphersuite.info/cs/" + csInfo.Name +
|
||||
"/\" class=\"good\" target=\"_blank\">" + visibleName + "</a>"
|
||||
} else {
|
||||
|
@ -224,6 +227,9 @@ func getCipherSuiteGemtext(cs clienthello.CipherSuite, link bool) string {
|
|||
csInfo := clienthello.GetCipherSuiteInfo(cs.(uint16), true)
|
||||
if csInfo.Name == "GREASE" {
|
||||
s = "0x" + csInfo.HexCode + " (GREASE)"
|
||||
} else if csInfo.Code == clienthello.SCSVRenegotiation {
|
||||
// TLS_EMPTY_RENEGOTIATION_INFO_SCSV
|
||||
s = csInfo.Name
|
||||
} else {
|
||||
if link {
|
||||
s = "=> https://ciphersuite.info/cs/" + csInfo.Name + "/ "
|
||||
|
|
Loading…
Reference in New Issue