mirror of
https://github.com/golang/go
synced 2024-11-21 11:14:40 -07:00
fix maxConstraintComparisions typo (should be maxConstraintComparisons)
This commit is contained in:
parent
36b45bca66
commit
b419975022
@ -42,7 +42,7 @@ pkg crypto/x509, type Certificate struct, PermittedURIDomains []string
|
||||
pkg crypto/x509, type Certificate struct, URIs []*url.URL
|
||||
pkg crypto/x509, type CertificateInvalidError struct, Detail string
|
||||
pkg crypto/x509, type CertificateRequest struct, URIs []*url.URL
|
||||
pkg crypto/x509, type VerifyOptions struct, MaxConstraintComparisions int
|
||||
pkg crypto/x509, type VerifyOptions struct, MaxConstraintComparisons int
|
||||
pkg crypto/x509/pkix, method (Name) String() string
|
||||
pkg crypto/x509/pkix, method (RDNSequence) String() string
|
||||
pkg database/sql, func OpenDB(driver.Connector) *DB
|
||||
|
2
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
generated
vendored
2
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
generated
vendored
@ -1269,7 +1269,7 @@ var PackageSymbols = map[string][]Symbol{
|
||||
{"VerifyOptions.DNSName", Field, 0},
|
||||
{"VerifyOptions.Intermediates", Field, 0},
|
||||
{"VerifyOptions.KeyUsages", Field, 1},
|
||||
{"VerifyOptions.MaxConstraintComparisions", Field, 10},
|
||||
{"VerifyOptions.MaxConstraintComparisons", Field, 10},
|
||||
{"VerifyOptions.Roots", Field, 0},
|
||||
},
|
||||
"crypto/x509/pkix": {
|
||||
|
@ -49,7 +49,7 @@ const (
|
||||
UnconstrainedName
|
||||
// TooManyConstraints results when the number of comparison operations
|
||||
// needed to check a certificate exceeds the limit set by
|
||||
// VerifyOptions.MaxConstraintComparisions. This limit exists to
|
||||
// VerifyOptions.MaxConstraintComparisons. This limit exists to
|
||||
// prevent pathological certificates can consuming excessive amounts of
|
||||
// CPU time to verify.
|
||||
TooManyConstraints
|
||||
@ -195,12 +195,12 @@ type VerifyOptions struct {
|
||||
// means ExtKeyUsageServerAuth. To accept any key usage, include ExtKeyUsageAny.
|
||||
KeyUsages []ExtKeyUsage
|
||||
|
||||
// MaxConstraintComparisions is the maximum number of comparisons to
|
||||
// MaxConstraintComparisons is the maximum number of comparisons to
|
||||
// perform when checking a given certificate's name constraints. If
|
||||
// zero, a sensible default is used. This limit prevents pathological
|
||||
// certificates from consuming excessive amounts of CPU time when
|
||||
// validating. It does not apply to the platform verifier.
|
||||
MaxConstraintComparisions int
|
||||
MaxConstraintComparisons int
|
||||
}
|
||||
|
||||
const (
|
||||
@ -590,7 +590,7 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V
|
||||
}
|
||||
}
|
||||
|
||||
maxConstraintComparisons := opts.MaxConstraintComparisions
|
||||
maxConstraintComparisons := opts.MaxConstraintComparisons
|
||||
if maxConstraintComparisons == 0 {
|
||||
maxConstraintComparisons = 250000
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user