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

Update apple 398 cert validity cert to not apply to CA certs #456

Merged
merged 1 commit into from
Jul 22, 2020
Merged

Update apple 398 cert validity cert to not apply to CA certs #456

merged 1 commit into from
Jul 22, 2020

Conversation

cardonator
Copy link
Contributor

Hi all, noticed that the Apple lint is applying to certs marked with the CA basic constraint so added a quick boolean check to confirm. We also double checked with Clint to make sure Apple wasn't intending to apply their policy to CA certs :)

@zakird zakird requested a review from sleevi July 22, 2020 00:06
@zakird zakird merged commit 34310bd into zmap:master Jul 22, 2020
@cardonator cardonator deleted the fix_apple_cert_limit_lint branch July 22, 2020 02:09
@@ -29,7 +29,7 @@ func (l *serverCertValidityTooLong) Initialize() error {
}

func (l *serverCertValidityTooLong) CheckApplies(c *x509.Certificate) bool {
return util.IsServerAuthCert(c)
return util.IsServerAuthCert(c) && !c.IsCA
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cardonator This should really have a unit test to prevent a regression.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, I will get a PR in for that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants