mirror of
https://github.com/caddyserver/caddy.git
synced 2026-06-29 21:31:41 +00:00
lint fixes
This commit is contained in:
parent
705cb98865
commit
7ee4ea244f
6 changed files with 25 additions and 23 deletions
|
|
@ -161,11 +161,11 @@ func parseRawClientHello(data []byte) (info rawHelloInfo) {
|
|||
if len(data) < 42 {
|
||||
return
|
||||
}
|
||||
sessionIdLen := int(data[38])
|
||||
if sessionIdLen > 32 || len(data) < 39+sessionIdLen {
|
||||
sessionIDLen := int(data[38])
|
||||
if sessionIDLen > 32 || len(data) < 39+sessionIDLen {
|
||||
return
|
||||
}
|
||||
data = data[39+sessionIdLen:]
|
||||
data = data[39+sessionIDLen:]
|
||||
if len(data) < 2 {
|
||||
return
|
||||
}
|
||||
|
|
@ -598,6 +598,7 @@ var greaseCiphers = map[uint16]struct{}{
|
|||
0xFAFA: {},
|
||||
}
|
||||
|
||||
// Define variables used for TLS communication
|
||||
const (
|
||||
extensionOCSPStatusRequest = 5
|
||||
extensionSupportedCurves = 10 // also called "SupportedGroups"
|
||||
|
|
|
|||
|
|
@ -330,9 +330,9 @@ func (r *replacer) getSubstitution(key string) string {
|
|||
if val, ok := r.request.Context().Value(caddy.CtxKey("mitm")).(bool); ok {
|
||||
if val {
|
||||
return "likely"
|
||||
} else {
|
||||
return "unlikely"
|
||||
}
|
||||
|
||||
return "unlikely"
|
||||
}
|
||||
return "unknown"
|
||||
case "{status}":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue