From 4ed1ddb30e8aa20a7015dd5e85fd8a6bcf009ffc Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Wed, 22 Aug 2018 13:46:00 -0400 Subject: [PATCH] Godeps: Update zlint dependency to 02fe9a2 (tip of master) (#3822) Notably this brings an [updated gTLD list](https://github.com/zmap/zlint/pull/233). Tests are confirmed to pass: ``` go test ./... ok github.com/zmap/zlint 0.157s ? github.com/zmap/zlint/cmd/zlint [no test files] ok github.com/zmap/zlint/lints 0.130s ok github.com/zmap/zlint/util 0.005s ``` --- Godeps/Godeps.json | 6 ++--- vendor/github.com/zmap/zlint/lints/base.go | 1 + ...fkc.go => lint_idn_dnsname_must_be_nfc.go} | 22 +++++++++---------- vendor/github.com/zmap/zlint/updateTLDs.sh | 7 ++++-- vendor/github.com/zmap/zlint/util/gtld_map.go | 13 +++++++---- vendor/github.com/zmap/zlint/util/time.go | 1 + 6 files changed, 30 insertions(+), 20 deletions(-) rename vendor/github.com/zmap/zlint/lints/{lint_idn_dnsname_must_be_nfkc.go => lint_idn_dnsname_must_be_nfc.go} (74%) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 4a5eafc1e..ef4f5d1cf 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -280,15 +280,15 @@ }, { "ImportPath": "github.com/zmap/zlint", - "Rev": "9bebe5e32c2c4b27892021e8e2f0459ef3b075ab" + "Rev": "02fe9a29bbae57da0c77db7afb53734dc262b130" }, { "ImportPath": "github.com/zmap/zlint/lints", - "Rev": "9bebe5e32c2c4b27892021e8e2f0459ef3b075ab" + "Rev": "02fe9a29bbae57da0c77db7afb53734dc262b130" }, { "ImportPath": "github.com/zmap/zlint/util", - "Rev": "9bebe5e32c2c4b27892021e8e2f0459ef3b075ab" + "Rev": "02fe9a29bbae57da0c77db7afb53734dc262b130" }, { "ImportPath": "golang.org/x/crypto/cryptobyte", diff --git a/vendor/github.com/zmap/zlint/lints/base.go b/vendor/github.com/zmap/zlint/lints/base.go index 112fce35b..4cf6e8cf4 100644 --- a/vendor/github.com/zmap/zlint/lints/base.go +++ b/vendor/github.com/zmap/zlint/lints/base.go @@ -50,6 +50,7 @@ const ( UnknownLintSource LintSource = iota CABFBaselineRequirements RFC5280 + RFC5891 ZLint AWSLabs ) diff --git a/vendor/github.com/zmap/zlint/lints/lint_idn_dnsname_must_be_nfkc.go b/vendor/github.com/zmap/zlint/lints/lint_idn_dnsname_must_be_nfc.go similarity index 74% rename from vendor/github.com/zmap/zlint/lints/lint_idn_dnsname_must_be_nfkc.go rename to vendor/github.com/zmap/zlint/lints/lint_idn_dnsname_must_be_nfc.go index 17ad092f7..081d57a5d 100644 --- a/vendor/github.com/zmap/zlint/lints/lint_idn_dnsname_must_be_nfkc.go +++ b/vendor/github.com/zmap/zlint/lints/lint_idn_dnsname_must_be_nfc.go @@ -23,17 +23,17 @@ import ( "golang.org/x/text/unicode/norm" ) -type IDNNotNFKC struct{} +type IDNNotNFC struct{} -func (l *IDNNotNFKC) Initialize() error { +func (l *IDNNotNFC) Initialize() error { return nil } -func (l *IDNNotNFKC) CheckApplies(c *x509.Certificate) bool { +func (l *IDNNotNFC) CheckApplies(c *x509.Certificate) bool { return util.IsExtInCert(c, util.SubjectAlternateNameOID) } -func (l *IDNNotNFKC) Execute(c *x509.Certificate) *LintResult { +func (l *IDNNotNFC) Execute(c *x509.Certificate) *LintResult { for _, dns := range c.DNSNames { labels := strings.Split(dns, ".") for _, label := range labels { @@ -42,7 +42,7 @@ func (l *IDNNotNFKC) Execute(c *x509.Certificate) *LintResult { if err != nil { return &LintResult{Status: NA} } - if !norm.NFKC.IsNormalString(unicodeLabel) { + if !norm.NFC.IsNormalString(unicodeLabel) { return &LintResult{Status: Error} } } @@ -53,11 +53,11 @@ func (l *IDNNotNFKC) Execute(c *x509.Certificate) *LintResult { func init() { RegisterLint(&Lint{ - Name: "e_international_dns_name_not_nfkc", - Description: "Internationalized DNSNames must be normalized by unicode normalization form KC", - Citation: "RFC 3490", - Source: RFC5280, - EffectiveDate: util.RFC3490Date, - Lint: &IDNNotNFKC{}, + Name: "e_international_dns_name_not_nfc", + Description: "Internationalized DNSNames must be normalized by unicode normalization form C", + Citation: "RFC 8399", + Source: RFC5891, + EffectiveDate: util.RFC8399Date, + Lint: &IDNNotNFC{}, }) } diff --git a/vendor/github.com/zmap/zlint/updateTLDs.sh b/vendor/github.com/zmap/zlint/updateTLDs.sh index 66246b7bc..457c0ab59 100755 --- a/vendor/github.com/zmap/zlint/updateTLDs.sh +++ b/vendor/github.com/zmap/zlint/updateTLDs.sh @@ -1,6 +1,9 @@ # Script to update the list of gTLDs -curl -o data/newgtlds.txt http://data.iana.org/TLD/tlds-alpha-by-domain.txt -echo "ONION" >> data/newgtlds.txt +curl -o data/iana_gtlds.txt http://data.iana.org/TLD/tlds-alpha-by-domain.txt +echo "ONION" >> data/iana_gtlds.txt +sort data/iana_gtlds.txt data/newgtlds.txt | uniq > data/tmp_gtlds.txt +rm data/iana_gtlds.txt +mv data/tmp_gtlds.txt data/newgtlds.txt curl -o data/removedtlds.txt https://raw.githubusercontent.com/pzb/TLDs/master/removed/rmtlds.csv python scripts/consolidate_tlds.py data/newgtlds.txt data/removedtlds.txt util/gtld_map.go gofmt -w . diff --git a/vendor/github.com/zmap/zlint/util/gtld_map.go b/vendor/github.com/zmap/zlint/util/gtld_map.go index c0f4f57e2..c80e39d92 100644 --- a/vendor/github.com/zmap/zlint/util/gtld_map.go +++ b/vendor/github.com/zmap/zlint/util/gtld_map.go @@ -186,7 +186,7 @@ var tldMap = map[string]bool{ "BBC": true, "COOKINGCHANNEL": true, "WHOSWHO": true, - "CLUBMED": true, + "WORLD": true, "BBT": true, "AUDIBLE": true, "CHANNEL": true, @@ -227,6 +227,7 @@ var tldMap = map[string]bool{ "WED": true, "COOKING": true, "ANDROID": true, + "SPORT": true, "MASERATI": true, "LIDL": true, "KM": true, @@ -407,6 +408,7 @@ var tldMap = map[string]bool{ "HOW": true, "HOT": true, "XN--NQV7F": true, + "XN--OTU796D": true, "XN--1QQW23A": true, "RMIT": true, "VERISIGN": true, @@ -467,7 +469,7 @@ var tldMap = map[string]bool{ "ING": true, "MY": true, "MX": true, - "MZ": true, + "INC": true, "XN--MIX891F": true, "READ": true, "CUISINELLA": true, @@ -556,7 +558,7 @@ var tldMap = map[string]bool{ "SES": true, "FINANCE": true, "SEX": true, - "WORLD": true, + "CLUBMED": true, "XN--MGBI4ECEXP": true, "CARS": true, "FRL": true, @@ -721,6 +723,7 @@ var tldMap = map[string]bool{ "XN--CG4BKI": true, "TATAMOTORS": true, "CREDIT": true, + "SD": true, "FLY": true, "XN--0ZWM56D": true, "MOSCOW": true, @@ -866,7 +869,7 @@ var tldMap = map[string]bool{ "SA": true, "OLAYAN": true, "SE": true, - "SD": true, + "CHARITY": true, "JOBURG": true, "IBM": true, "CAR": true, @@ -1062,6 +1065,7 @@ var tldMap = map[string]bool{ "DIAMONDS": true, "LADBROKES": true, "HOTELES": true, + "MZ": true, "XN--ROVU88B": true, "CAMP": true, "HISAMITSU": true, @@ -1516,6 +1520,7 @@ var tldMap = map[string]bool{ "REPORT": true, "CENTER": true, "TEVA": true, + "LLC": true, "SAMSUNG": true, "SCIENCE": true, "XN--J1AMH": true, diff --git a/vendor/github.com/zmap/zlint/util/time.go b/vendor/github.com/zmap/zlint/util/time.go index 71771814a..721340201 100644 --- a/vendor/github.com/zmap/zlint/util/time.go +++ b/vendor/github.com/zmap/zlint/util/time.go @@ -27,6 +27,7 @@ var ( RFC2459Date = time.Date(1999, time.January, 1, 0, 0, 0, 0, time.UTC) RFC3280Date = time.Date(2002, time.April, 1, 0, 0, 0, 0, time.UTC) RFC3490Date = time.Date(2003, time.March, 1, 0, 0, 0, 0, time.UTC) + RFC8399Date = time.Date(2018, time.May, 1, 0, 0, 0, 0, time.UTC) RFC4325Date = time.Date(2005, time.December, 1, 0, 0, 0, 0, time.UTC) RFC4630Date = time.Date(2006, time.August, 1, 0, 0, 0, 0, time.UTC) RFC5280Date = time.Date(2008, time.May, 1, 0, 0, 0, 0, time.UTC)