CABF SMIME 7.1.4.2.h If present, the subject:emailAddress SHALL contain a single Mailbox Address#752
Merged
christopher-henderson merged 2 commits intomasterfrom Oct 16, 2023
Merged
Conversation
…in a single Mailbox Address
zakird
reviewed
Oct 15, 2023
| } | ||
|
|
||
| func (l *singleEmailIfPresent) CheckApplies(c *x509.Certificate) bool { | ||
| return util.IsSubscriberCert(c) && c.EmailAddresses != nil && len(c.EmailAddresses) != 0 |
Member
There was a problem hiding this comment.
Just want to check that this last part len(c.EmailAddresses) != 0 is correct. It would seem that, if present, the field shouldn't be empty either. (I suspect though that this could just be an idiosyncrasy with Go X.509 and how fields are parsed)
Member
Author
There was a problem hiding this comment.
I suspect though that this could just be an idiosyncrasy with Go X.509 and how fields are parsed
I precisely wanted to avoid any such shenanigans being possible. I was uncertain what upstream systems would generate in a not present scenario. I reckoned that both nil and empty would count as not being present (generally speaking, rather than speaking to the specific Go implementation).
zakird
approved these changes
Oct 15, 2023
42 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #753 and accomplishes the following from #712