-
Notifications
You must be signed in to change notification settings - Fork 110
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
Fix eku check for BRs #171
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % nits
util/eku.go
Outdated
@@ -0,0 +1,17 @@ | |||
package util |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well just make this part of ca.go
. https://github.com/zmap/zlint/blob/master/util/ca.go
@@ -97,6 +98,9 @@ func (l *Lint) CheckEffective(c *x509.Certificate) bool { | |||
// CheckEffective() | |||
// Execute() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the first paragraph of the above comment to describe the additional checks you just added, e.g. lints that are checking for BR compliance are only ran against certs that fall under the purview of the BR's.
Does this work for CA certificates? |
@titanous can you take a look at this too? |
util/ca.go
Outdated
@@ -29,3 +29,15 @@ func IsSelfSigned(c *x509.Certificate) bool { | |||
func IsSubscriberCert(c *x509.Certificate) bool { | |||
return !IsCACert(c) && !IsSelfSigned(c) | |||
} | |||
|
|||
func IsTestableBRCertificate(cert *x509.Certificate) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this should be renamed? It checks if a certificate can be used for ServerAuth, so IsServerAuthCert
or similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do that.
@titanous i've updated the name. |
Addresses #167