Skip to content

Qc type web also smime#919

Merged
christopher-henderson merged 42 commits intozmap:masterfrom
mtgag:qc_type_web_also_smime
Mar 16, 2025
Merged

Qc type web also smime#919
christopher-henderson merged 42 commits intozmap:masterfrom
mtgag:qc_type_web_also_smime

Conversation

@mtgag
Copy link
Copy Markdown
Contributor

@mtgag mtgag commented Feb 27, 2025

This lint was implemented before the S/MIME BRs were introduced. This PR considers S/MIME certificates. One change is that it checks that IdEtsiQcsQctWeb must be present only when the certificate is a server certificate. A second change is that it checks that either IdEtsiQcsQctEsign (natural persons) or IdEtsiQcsQctEseal (legal persons) must be present when the certificate is an S/MIME one. Additionally, the warning has been replaced with an error, as having both warnings and errors in the same lint is not considered good practice.

mtg and others added 30 commits February 4, 2020 17:45
util: gtld_map autopull updates for 2021-10-21T07:25:20 UTC
@christopher-henderson christopher-henderson self-requested a review March 8, 2025 14:34
LintMetadata: lint.LintMetadata{
Name: "w_qcstatem_qctype_web",
Description: "Checks that a QC Statement of the type Id-etsi-qcs-QcType features at least the type IdEtsiQcsQctWeb",
Name: "e_qcstatem_qctype_web_esign_eseal",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe that I would consider the name of the lint to actually be in the public interface of ZLint. Library usages pull up individual lints by name. Additionally, downstream automation may be parsing ZLint's JSON output and looking for a particular name

Now, the only reason I can think someone would do that is if the CA had a history of failing that particular lint, and thus have a particular interest in referring to it specifically. Regardless, however much more accurate the new name may be, I don't think the risk of breaking downstream automation is quite worth it.

Suggested change
Name: "e_qcstatem_qctype_web_esign_eseal",
Name: "e_qcstatem_qctype_web,

Name: "w_qcstatem_qctype_web",
Description: "Checks that a QC Statement of the type Id-etsi-qcs-QcType features at least the type IdEtsiQcsQctWeb",
Name: "e_qcstatem_qctype_web_esign_eseal",
Description: "Checks that a QC Statement of the type Id-etsi-qcs-QcType features at least the type IdEtsiQcsQctWeb, in case of a server certificate, or it features one of the types IdEtsiQcsQctEsign or IdEtsiQcsQctEseal, in case of an S/MIME certificate.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One clause applies to server certificates and the other clause refers to S/MIME certificates. I can't help but feel that original lint (for server certificates) should be left as-is and that a new lint should be introduced that focuses on S/MIME.

Thoughts? Did you have a particular reason extending this lint rather than creating a new one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

One clause applies to server certificates and the other clause refers to S/MIME certificates. I can't help but feel that original lint (for server certificates) should be left as-is and that a new lint should be introduced that focuses on S/MIME.

Thoughts? Did you have a particular reason extending this lint rather than creating a new one?

No, actually not. I believe the main reason was that the original lint mixed warnings and errors. The warning was issued because the non-positive path was not considered an error, as other ETSI-QC certificates could have uses beyond the web. Having two separate lints feels better to me as well. Still, the original lint needs some adjustments, specifically, it should be refactored to produce only errors and not mix warnings and errors. I will start working on this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have incorporated the comments. Now, two distinct lints exist, with only minor refactoring done to the first one. The integration tests do not run, but I am not sure whether this is something I can fix.

Copy link
Copy Markdown
Member

@christopher-henderson christopher-henderson left a comment

Choose a reason for hiding this comment

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

Ah, I see that the bits rotted. I went out to the store and got us some fresh bits, so the integration tests are good again.


/*
* ZLint Copyright 2024 Regents of the University of Michigan
* ZLint Copyright 2025 Regents of the University of Michigan
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah. Good point. I should do the annual +10000/-10000.

@christopher-henderson christopher-henderson merged commit 502f687 into zmap:master Mar 16, 2025
5 checks passed
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.

3 participants