-
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
Lints: add new lints for Mozilla Root Store Policy (adopted) #353
Conversation
Mozilla Root Store Policy contains multiple different requirements on RSA keys. All these were tested in a single lint. These split into two different lints based on the different requirement.
Co-Authored-By: Daniel McCarney <daniel@binaryparadox.net>
Co-Authored-By: Daniel McCarney <daniel@binaryparadox.net>
Co-Authored-By: Daniel McCarney <daniel@binaryparadox.net>
Co-Authored-By: Daniel McCarney <daniel@binaryparadox.net>
Co-Authored-By: Daniel McCarney <daniel@binaryparadox.net>
Co-Authored-By: Daniel McCarney <daniel@binaryparadox.net>
Co-Authored-By: Daniel McCarney <daniel@binaryparadox.net>
We'll return to this requirement in a subsequent PR when the tooling to generate the data can be reviewed and automated.
I don't have a strong opinion given that there's a check above for whether
it applies.
…On Wed, Jan 15, 2020 at 8:20 AM Daniel McCarney ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In lints/mozilla/lint_mp_authority_key_identifier_correct.go
<#353 (comment)>:
> +
+func (l *authorityKeyIdentifierCorrect) Initialize() error {
+ return nil
+}
+
+func (l *authorityKeyIdentifierCorrect) CheckApplies(c *x509.Certificate) bool {
+ return util.IsExtInCert(c, util.AuthkeyOID)
+}
+
+func (l *authorityKeyIdentifierCorrect) Execute(c *x509.Certificate) *lint.LintResult {
+ var keyID keyIdentifier
+
+ ext := util.GetExtFromCert(c, util.AuthkeyOID)
+ if ext == nil {
+ return &lint.LintResult{
+ Status: lint.Fatal,
I think I might have recommended being defensive in the event that Execute
is called with a cert that doesn't have the extension despite CheckApplies
checking it during my reviews of the original work. In retrospect that
doesn't seem worth it. I'll axe this check and leave a comment.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#353?email_source=notifications&email_token=AABREUHMORUGFJENGHVCSMLQ54ZURA5CNFSM4KHFT5UKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCR3QMMI#discussion_r366970883>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABREUHUGDR66EDIY24QGODQ54ZURANCNFSM4KHFT5UA>
.
|
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.
Yes, this is https://bugzilla.mozilla.org/show_bug.cgi?id=1586860 |
@sleevi Aha, thanks! I didn't think to check Bugzilla for overlap. |
This is an updated copy of #323 by @fotisl that addresses the outstanding review feedback.
It adds five new lints to the
lints/mozilla
package, specyfing the sourcelint.MozillaRootStorePolicy
n_mp_allowed_eku
e_mp_authority_key_identifier_correct
e_mp_exponent_cannot_be_one
e_mp_modulus_must_be_2048_bits_or_more
e_mp_modulus_must_be_divisible_by_8
Notable changes from #323:
e_mp_allowed_eku
lint was changed to not rely on Mozilla trusted SPKI data (see Mozilla trusted roots data set and assoc. tooling #352 ) and so returns a notice level lint result instead of error since we accept it will have false positives in the current state.e_mp_ecdsa_allowed_algorithm
lint and tests were removed. There was too much disagreement about the approach/description. We'll address this Mozilla requirement in a follow-up: Lint for Mozilla PKI policy allowed ECDSA curves #355To be done: