Index: net/base/x509_certificate_mac.cc |
diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc |
index cffcac861a307886e121636f61e2cde40245ab1b..abcd205f01229df31a4957478c8f58cfe702c26b 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_intermediates; |
wtc
2011/07/26 19:32:29
Let's change this back to verified_chain, to be co
|
+ 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_intermediates.push_back(chain_cert); |
+ } |
+ } |
+ if (verified_cert) { |
+ verify_result->verified_cert = CreateFromHandle(verified_cert, |
+ verified_intermediates); |
+ } |
+ |
// Evaluate the results |
OSStatus cssm_result; |
bool got_certificate_error = false; |