MCPcopy Create free account
hub / github.com/XTLS/REALITY / checkKeySize

Function checkKeySize

handshake_client.go:1092–1102  ·  view source on GitHub ↗

var tlsmaxrsasize = godebug.New("tlsmaxrsasize")

(n int)

Source from the content-addressed store, hash-verified

1090//var tlsmaxrsasize = godebug.New("tlsmaxrsasize")
1091
1092func checkKeySize(n int) (max int, ok bool) {
1093 // if v := tlsmaxrsasize.Value(); v != "" {
1094 // if max, err := strconv.Atoi(v); err == nil {
1095 // if (n <= max) != (n <= defaultMaxRSAKeySize) {
1096 // tlsmaxrsasize.IncNonDefault()
1097 // }
1098 // return max, n <= max
1099 // }
1100 // }
1101 return defaultMaxRSAKeySize, n <= defaultMaxRSAKeySize
1102}
1103
1104// verifyServerCertificate parses and verifies the provided chain, setting
1105// c.verifiedChains and c.peerCertificates or sending the appropriate alert.

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…