In OSX certificate verification we currently do a strange dance where we ask the OS to verify the site's hostname, and then we ignore the result of its check and do a more spec-compliant hostname check ourself.
I discovered while working on issue 570909 that this can in some cases break the looping & chopping workaround in CertVerifyProcMac::VerifyInternal, since the OSX hostname check can fail in cases where ours would succeed. All the iterations of the loop fail, making it pointless.
Issue 92678 documents some of the history behind the hostname check. Briefly, giving the OS the hostname is required to handle certificates that were whitelisted within Safari, since the whitelisting is limited to a given hostname. There is a workaround of using Keychain Access to set the preferences for the certificate, rather than through Safari.
Given that this is a fairly niche case with an easy work around, I'd like to just remove the OS hostname check. (The alternative would be some fairly messy refactoring of CertVerifyProcMac to apply the hostname check override in each iteration of the loop instead of just at the end.)
Adrienne: wdyt?
Comment 1 by rsleevi@chromium.org
, Jun 20 2016