diff --git a/linter/lints/chrome/e_scts_from_same_operator.go b/linter/lints/chrome/e_scts_from_same_operator.go index c68b1406e..eb50e43c8 100644 --- a/linter/lints/chrome/e_scts_from_same_operator.go +++ b/linter/lints/chrome/e_scts_from_same_operator.go @@ -17,17 +17,19 @@ type sctsFromSameOperator struct { } func init() { - lint.RegisterLint(&lint.Lint{ - Name: "e_scts_from_same_operator", - Description: "Let's Encrypt Subscriber Certificates have two SCTs from logs run by different operators", - Citation: "Chrome CT Policy", - Source: lints.ChromeCTPolicy, - EffectiveDate: time.Date(2022, time.April, 15, 0, 0, 0, 0, time.UTC), - Lint: NewSCTsFromSameOperator, + lint.RegisterCertificateLint(&lint.CertificateLint{ + LintMetadata: lint.LintMetadata{ + Name: "e_scts_from_same_operator", + Description: "Let's Encrypt Subscriber Certificates have two SCTs from logs run by different operators", + Citation: "Chrome CT Policy", + Source: lints.ChromeCTPolicy, + EffectiveDate: time.Date(2022, time.April, 15, 0, 0, 0, 0, time.UTC), + }, + Lint: NewSCTsFromSameOperator, }) } -func NewSCTsFromSameOperator() lint.LintInterface { +func NewSCTsFromSameOperator() lint.CertificateLintInterface { return &sctsFromSameOperator{logList: loglist.GetLintList()} } diff --git a/linter/lints/cpcps/lint_root_ca_cert_validity_period_greater_than_25_years.go b/linter/lints/cpcps/lint_root_ca_cert_validity_period_greater_than_25_years.go index 2952f5cf0..a963cf195 100644 --- a/linter/lints/cpcps/lint_root_ca_cert_validity_period_greater_than_25_years.go +++ b/linter/lints/cpcps/lint_root_ca_cert_validity_period_greater_than_25_years.go @@ -13,17 +13,19 @@ import ( type rootCACertValidityTooLong struct{} func init() { - lint.RegisterLint(&lint.Lint{ - Name: "e_root_ca_cert_validity_period_greater_than_25_years", - Description: "Let's Encrypt Root CA Certificates have Validity Periods of up to 25 years", - Citation: "CPS: 7.1", - Source: lints.LetsEncryptCPS, - EffectiveDate: lints.CPSV33Date, - Lint: NewRootCACertValidityTooLong, + lint.RegisterCertificateLint(&lint.CertificateLint{ + LintMetadata: lint.LintMetadata{ + Name: "e_root_ca_cert_validity_period_greater_than_25_years", + Description: "Let's Encrypt Root CA Certificates have Validity Periods of up to 25 years", + Citation: "CPS: 7.1", + Source: lints.LetsEncryptCPS, + EffectiveDate: lints.CPSV33Date, + }, + Lint: NewRootCACertValidityTooLong, }) } -func NewRootCACertValidityTooLong() lint.LintInterface { +func NewRootCACertValidityTooLong() lint.CertificateLintInterface { return &rootCACertValidityTooLong{} } diff --git a/linter/lints/cpcps/lint_subordinate_ca_cert_validity_period_greater_than_8_years.go b/linter/lints/cpcps/lint_subordinate_ca_cert_validity_period_greater_than_8_years.go index 0f99a2814..fdf5906c9 100644 --- a/linter/lints/cpcps/lint_subordinate_ca_cert_validity_period_greater_than_8_years.go +++ b/linter/lints/cpcps/lint_subordinate_ca_cert_validity_period_greater_than_8_years.go @@ -13,17 +13,19 @@ import ( type subordinateCACertValidityTooLong struct{} func init() { - lint.RegisterLint(&lint.Lint{ - Name: "e_validity_period_greater_than_8_years", - Description: "Let's Encrypt Intermediate CA Certificates have Validity Periods of up to 8 years", - Citation: "CPS: 7.1", - Source: lints.LetsEncryptCPS, - EffectiveDate: lints.CPSV33Date, - Lint: NewSubordinateCACertValidityTooLong, + lint.RegisterCertificateLint(&lint.CertificateLint{ + LintMetadata: lint.LintMetadata{ + Name: "e_validity_period_greater_than_8_years", + Description: "Let's Encrypt Intermediate CA Certificates have Validity Periods of up to 8 years", + Citation: "CPS: 7.1", + Source: lints.LetsEncryptCPS, + EffectiveDate: lints.CPSV33Date, + }, + Lint: NewSubordinateCACertValidityTooLong, }) } -func NewSubordinateCACertValidityTooLong() lint.LintInterface { +func NewSubordinateCACertValidityTooLong() lint.CertificateLintInterface { return &subordinateCACertValidityTooLong{} } diff --git a/linter/lints/cpcps/lint_subscriber_cert_validity_greater_than_100_days.go b/linter/lints/cpcps/lint_subscriber_cert_validity_greater_than_100_days.go index 4fee10393..e91e187c4 100644 --- a/linter/lints/cpcps/lint_subscriber_cert_validity_greater_than_100_days.go +++ b/linter/lints/cpcps/lint_subscriber_cert_validity_greater_than_100_days.go @@ -13,17 +13,19 @@ import ( type subscriberCertValidityTooLong struct{} func init() { - lint.RegisterLint(&lint.Lint{ - Name: "e_subscriber_cert_validity_period_greater_than_100_days", - Description: "Let's Encrypt Subscriber Certificates have Validity Periods of up to 100 days", - Citation: "CPS: 7.1", - Source: lints.LetsEncryptCPS, - EffectiveDate: lints.CPSV33Date, - Lint: NewSubscriberCertValidityTooLong, + lint.RegisterCertificateLint(&lint.CertificateLint{ + LintMetadata: lint.LintMetadata{ + Name: "e_subscriber_cert_validity_period_greater_than_100_days", + Description: "Let's Encrypt Subscriber Certificates have Validity Periods of up to 100 days", + Citation: "CPS: 7.1", + Source: lints.LetsEncryptCPS, + EffectiveDate: lints.CPSV33Date, + }, + Lint: NewSubscriberCertValidityTooLong, }) } -func NewSubscriberCertValidityTooLong() lint.LintInterface { +func NewSubscriberCertValidityTooLong() lint.CertificateLintInterface { return &subscriberCertValidityTooLong{} } diff --git a/linter/lints/cpcps/lint_validity_period_has_extra_second.go b/linter/lints/cpcps/lint_validity_period_has_extra_second.go index 956e63b8a..e8ea34831 100644 --- a/linter/lints/cpcps/lint_validity_period_has_extra_second.go +++ b/linter/lints/cpcps/lint_validity_period_has_extra_second.go @@ -12,17 +12,19 @@ import ( type certValidityNotRound struct{} func init() { - lint.RegisterLint(&lint.Lint{ - Name: "w_validity_period_has_extra_second", - Description: "Let's Encrypt Certificates have Validity Periods that are a round number of seconds", - Citation: "CPS: 7.1", - Source: lints.LetsEncryptCPS, - EffectiveDate: lints.CPSV33Date, - Lint: NewCertValidityNotRound, + lint.RegisterCertificateLint(&lint.CertificateLint{ + LintMetadata: lint.LintMetadata{ + Name: "w_validity_period_has_extra_second", + Description: "Let's Encrypt Certificates have Validity Periods that are a round number of seconds", + Citation: "CPS: 7.1", + Source: lints.LetsEncryptCPS, + EffectiveDate: lints.CPSV33Date, + }, + Lint: NewCertValidityNotRound, }) } -func NewCertValidityNotRound() lint.LintInterface { +func NewCertValidityNotRound() lint.CertificateLintInterface { return &certValidityNotRound{} }