-
Notifications
You must be signed in to change notification settings - Fork 9
Validate issuing dp #357
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
Validate issuing dp #357
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! Just a couple of comments.
go/rootprogram/issuers.go
Outdated
@@ -233,7 +234,7 @@ func (mi *MozIssuers) LoadEnrolledIssuers(filePath string) error { | |||
if err != nil { | |||
return err | |||
} | |||
mi.InsertIssuerFromCertAndPem(cert, ei.Pem, nil) | |||
mi.InsertIssuerFromCertAndPem(cert, ei.Pem, nil, false) |
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.
Does go have a maybe/option type? It would be nice to ensure we're not accidentally using the value of usesPartitionedCrls
when we don't load from the ccadb.
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 updated this so now we pipe the usesPartitionedCrls
flag through the enrolled.json file for use here.
crl, _ := x509.ParseCertificateListDER(crlBlock.Bytes) | ||
|
||
fetchUrl := "http://example.com/1.crl" | ||
if !crlIssuingDPMatches(crl, fetchUrl) { |
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.
Am I missing something? I'm not seeing where this is defined... (is the review UI messing me up?)
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.
Whoops, refactored and forgot to update this test.
a374df0
to
c320747
Compare
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!
for _, url := range crl.TBSCertList.IssuingDPFullNames.URIs { | ||
urls = append(urls, url) | ||
_, exists := aPartitionedCrlUrlSet[url] | ||
if exists { |
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.
If I'm understanding correctly, the effect of this check is that there could be a completely unrelated URL in the issuingDistributionPoints
, but as long as it's not listed in aPartitionedCrlUrlSet
, that's okay?
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.
Right, it's ok for there to be multiple URLs for the same CRL in issuingDistributionPoints
. But only one URL from issuingDistributionPoints
should appear in aPartitionedCrlUrlSet
since the URLs in that set must point to distinct CRLs.
Add a new CRL audit entry type for when a Partitioned CRL's
issuingDistributionPoint
extension does not match the URL that the CRL was fetched from.Resolves #356.