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 ```
This commit is contained in:
parent
876c727b6f
commit
4ed1ddb30e
|
|
@ -280,15 +280,15 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/zmap/zlint",
|
"ImportPath": "github.com/zmap/zlint",
|
||||||
"Rev": "9bebe5e32c2c4b27892021e8e2f0459ef3b075ab"
|
"Rev": "02fe9a29bbae57da0c77db7afb53734dc262b130"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/zmap/zlint/lints",
|
"ImportPath": "github.com/zmap/zlint/lints",
|
||||||
"Rev": "9bebe5e32c2c4b27892021e8e2f0459ef3b075ab"
|
"Rev": "02fe9a29bbae57da0c77db7afb53734dc262b130"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/zmap/zlint/util",
|
"ImportPath": "github.com/zmap/zlint/util",
|
||||||
"Rev": "9bebe5e32c2c4b27892021e8e2f0459ef3b075ab"
|
"Rev": "02fe9a29bbae57da0c77db7afb53734dc262b130"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "golang.org/x/crypto/cryptobyte",
|
"ImportPath": "golang.org/x/crypto/cryptobyte",
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ const (
|
||||||
UnknownLintSource LintSource = iota
|
UnknownLintSource LintSource = iota
|
||||||
CABFBaselineRequirements
|
CABFBaselineRequirements
|
||||||
RFC5280
|
RFC5280
|
||||||
|
RFC5891
|
||||||
ZLint
|
ZLint
|
||||||
AWSLabs
|
AWSLabs
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -23,17 +23,17 @@ import (
|
||||||
"golang.org/x/text/unicode/norm"
|
"golang.org/x/text/unicode/norm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IDNNotNFKC struct{}
|
type IDNNotNFC struct{}
|
||||||
|
|
||||||
func (l *IDNNotNFKC) Initialize() error {
|
func (l *IDNNotNFC) Initialize() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *IDNNotNFKC) CheckApplies(c *x509.Certificate) bool {
|
func (l *IDNNotNFC) CheckApplies(c *x509.Certificate) bool {
|
||||||
return util.IsExtInCert(c, util.SubjectAlternateNameOID)
|
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 {
|
for _, dns := range c.DNSNames {
|
||||||
labels := strings.Split(dns, ".")
|
labels := strings.Split(dns, ".")
|
||||||
for _, label := range labels {
|
for _, label := range labels {
|
||||||
|
|
@ -42,7 +42,7 @@ func (l *IDNNotNFKC) Execute(c *x509.Certificate) *LintResult {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &LintResult{Status: NA}
|
return &LintResult{Status: NA}
|
||||||
}
|
}
|
||||||
if !norm.NFKC.IsNormalString(unicodeLabel) {
|
if !norm.NFC.IsNormalString(unicodeLabel) {
|
||||||
return &LintResult{Status: Error}
|
return &LintResult{Status: Error}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -53,11 +53,11 @@ func (l *IDNNotNFKC) Execute(c *x509.Certificate) *LintResult {
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
RegisterLint(&Lint{
|
RegisterLint(&Lint{
|
||||||
Name: "e_international_dns_name_not_nfkc",
|
Name: "e_international_dns_name_not_nfc",
|
||||||
Description: "Internationalized DNSNames must be normalized by unicode normalization form KC",
|
Description: "Internationalized DNSNames must be normalized by unicode normalization form C",
|
||||||
Citation: "RFC 3490",
|
Citation: "RFC 8399",
|
||||||
Source: RFC5280,
|
Source: RFC5891,
|
||||||
EffectiveDate: util.RFC3490Date,
|
EffectiveDate: util.RFC8399Date,
|
||||||
Lint: &IDNNotNFKC{},
|
Lint: &IDNNotNFC{},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
# Script to update the list of gTLDs
|
# Script to update the list of gTLDs
|
||||||
curl -o data/newgtlds.txt http://data.iana.org/TLD/tlds-alpha-by-domain.txt
|
curl -o data/iana_gtlds.txt http://data.iana.org/TLD/tlds-alpha-by-domain.txt
|
||||||
echo "ONION" >> data/newgtlds.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
|
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
|
python scripts/consolidate_tlds.py data/newgtlds.txt data/removedtlds.txt util/gtld_map.go
|
||||||
gofmt -w .
|
gofmt -w .
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ var tldMap = map[string]bool{
|
||||||
"BBC": true,
|
"BBC": true,
|
||||||
"COOKINGCHANNEL": true,
|
"COOKINGCHANNEL": true,
|
||||||
"WHOSWHO": true,
|
"WHOSWHO": true,
|
||||||
"CLUBMED": true,
|
"WORLD": true,
|
||||||
"BBT": true,
|
"BBT": true,
|
||||||
"AUDIBLE": true,
|
"AUDIBLE": true,
|
||||||
"CHANNEL": true,
|
"CHANNEL": true,
|
||||||
|
|
@ -227,6 +227,7 @@ var tldMap = map[string]bool{
|
||||||
"WED": true,
|
"WED": true,
|
||||||
"COOKING": true,
|
"COOKING": true,
|
||||||
"ANDROID": true,
|
"ANDROID": true,
|
||||||
|
"SPORT": true,
|
||||||
"MASERATI": true,
|
"MASERATI": true,
|
||||||
"LIDL": true,
|
"LIDL": true,
|
||||||
"KM": true,
|
"KM": true,
|
||||||
|
|
@ -407,6 +408,7 @@ var tldMap = map[string]bool{
|
||||||
"HOW": true,
|
"HOW": true,
|
||||||
"HOT": true,
|
"HOT": true,
|
||||||
"XN--NQV7F": true,
|
"XN--NQV7F": true,
|
||||||
|
"XN--OTU796D": true,
|
||||||
"XN--1QQW23A": true,
|
"XN--1QQW23A": true,
|
||||||
"RMIT": true,
|
"RMIT": true,
|
||||||
"VERISIGN": true,
|
"VERISIGN": true,
|
||||||
|
|
@ -467,7 +469,7 @@ var tldMap = map[string]bool{
|
||||||
"ING": true,
|
"ING": true,
|
||||||
"MY": true,
|
"MY": true,
|
||||||
"MX": true,
|
"MX": true,
|
||||||
"MZ": true,
|
"INC": true,
|
||||||
"XN--MIX891F": true,
|
"XN--MIX891F": true,
|
||||||
"READ": true,
|
"READ": true,
|
||||||
"CUISINELLA": true,
|
"CUISINELLA": true,
|
||||||
|
|
@ -556,7 +558,7 @@ var tldMap = map[string]bool{
|
||||||
"SES": true,
|
"SES": true,
|
||||||
"FINANCE": true,
|
"FINANCE": true,
|
||||||
"SEX": true,
|
"SEX": true,
|
||||||
"WORLD": true,
|
"CLUBMED": true,
|
||||||
"XN--MGBI4ECEXP": true,
|
"XN--MGBI4ECEXP": true,
|
||||||
"CARS": true,
|
"CARS": true,
|
||||||
"FRL": true,
|
"FRL": true,
|
||||||
|
|
@ -721,6 +723,7 @@ var tldMap = map[string]bool{
|
||||||
"XN--CG4BKI": true,
|
"XN--CG4BKI": true,
|
||||||
"TATAMOTORS": true,
|
"TATAMOTORS": true,
|
||||||
"CREDIT": true,
|
"CREDIT": true,
|
||||||
|
"SD": true,
|
||||||
"FLY": true,
|
"FLY": true,
|
||||||
"XN--0ZWM56D": true,
|
"XN--0ZWM56D": true,
|
||||||
"MOSCOW": true,
|
"MOSCOW": true,
|
||||||
|
|
@ -866,7 +869,7 @@ var tldMap = map[string]bool{
|
||||||
"SA": true,
|
"SA": true,
|
||||||
"OLAYAN": true,
|
"OLAYAN": true,
|
||||||
"SE": true,
|
"SE": true,
|
||||||
"SD": true,
|
"CHARITY": true,
|
||||||
"JOBURG": true,
|
"JOBURG": true,
|
||||||
"IBM": true,
|
"IBM": true,
|
||||||
"CAR": true,
|
"CAR": true,
|
||||||
|
|
@ -1062,6 +1065,7 @@ var tldMap = map[string]bool{
|
||||||
"DIAMONDS": true,
|
"DIAMONDS": true,
|
||||||
"LADBROKES": true,
|
"LADBROKES": true,
|
||||||
"HOTELES": true,
|
"HOTELES": true,
|
||||||
|
"MZ": true,
|
||||||
"XN--ROVU88B": true,
|
"XN--ROVU88B": true,
|
||||||
"CAMP": true,
|
"CAMP": true,
|
||||||
"HISAMITSU": true,
|
"HISAMITSU": true,
|
||||||
|
|
@ -1516,6 +1520,7 @@ var tldMap = map[string]bool{
|
||||||
"REPORT": true,
|
"REPORT": true,
|
||||||
"CENTER": true,
|
"CENTER": true,
|
||||||
"TEVA": true,
|
"TEVA": true,
|
||||||
|
"LLC": true,
|
||||||
"SAMSUNG": true,
|
"SAMSUNG": true,
|
||||||
"SCIENCE": true,
|
"SCIENCE": true,
|
||||||
"XN--J1AMH": true,
|
"XN--J1AMH": true,
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ var (
|
||||||
RFC2459Date = time.Date(1999, time.January, 1, 0, 0, 0, 0, time.UTC)
|
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)
|
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)
|
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)
|
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)
|
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)
|
RFC5280Date = time.Date(2008, time.May, 1, 0, 0, 0, 0, time.UTC)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue