Skip to content

Conversation

@adamkaplan
Copy link
Owner

No description provided.

// against the SSL leaf certificate. If this operation is successful, then
// we can trust the certificate, otherwise continue treating as invalid
// trust chain.
CFIndex leafCertIndex = certificateChainLen - 1;

Choose a reason for hiding this comment

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

This appears to assume the "break glass" certificate is used directly. What if it is used as a CA to endorse a chain of trust. Shouldn't we loop down the chain like we do below?

NSSet<NSData *> *knownPins,
TSKSPKIHashCache *hashCache)
{
CFStringRef certificateSubject = SecCertificateCopySubjectSummary(certificate);

Choose a reason for hiding this comment

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

Pretty wasteful to extract certificateSubject in production just in case we need it for debugging. But I can respect that it was already there in the previous version.

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