Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always perform e_cert_unique_identifier_version_not_2_or_3 #711

Merged
merged 10 commits into from
May 14, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ func NewCertUniqueIdVersion() lint.LintInterface {
}

func (l *certUniqueIdVersion) CheckApplies(c *x509.Certificate) bool {
return c.IssuerUniqueId.Bytes != nil || c.SubjectUniqueId.Bytes != nil
return true
}

func (l *certUniqueIdVersion) Execute(c *x509.Certificate) *lint.LintResult {
if (c.Version) != 2 && (c.Version) != 3 {
if (c.IssuerUniqueId.Bytes != nil || c.SubjectUniqueId.Bytes != nil) && (c.Version) != 2 && (c.Version) != 3 {
return &lint.LintResult{Status: lint.Error}
} else {
return &lint.LintResult{Status: lint.Pass}
Expand Down