| Index: net/base/x509_certificate_mac.cc
|
| diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc
|
| index 1f16f20aca2399a13bd976c9c5ee94bf70c1ee52..705ea9e8b3d6e00bb66336c4cfb28b69923c2e73 100644
|
| --- a/net/base/x509_certificate_mac.cc
|
| +++ b/net/base/x509_certificate_mac.cc
|
| @@ -848,6 +848,23 @@ int X509Certificate::VerifyInternal(const std::string& hostname,
|
| return NetErrorFromOSStatus(status);
|
| ScopedCFTypeRef<CFArrayRef> scoped_completed_chain(completed_chain);
|
|
|
| + SecCertificateRef verified_cert = NULL;
|
| + std::vector<SecCertificateRef> verified_chain;
|
| + for (CFIndex i = 0, count = CFArrayGetCount(completed_chain);
|
| + i < count; ++i) {
|
| + SecCertificateRef chain_cert = reinterpret_cast<SecCertificateRef>(
|
| + const_cast<void*>(CFArrayGetValueAtIndex(completed_chain, i)));
|
| + if (i == 0) {
|
| + verified_cert = chain_cert;
|
| + } else {
|
| + verified_chain.push_back(chain_cert);
|
| + }
|
| + }
|
| + if (verified_cert) {
|
| + verify_result->verified_cert = CreateFromHandle(verified_cert,
|
| + verified_chain);
|
| + }
|
| +
|
| // Evaluate the results
|
| OSStatus cssm_result;
|
| bool got_certificate_error = false;
|
|
|