| Index: net/base/x509_certificate_mac.cc
|
| diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc
|
| index 2c959812c596a05f3db9986fbfb1555217861107..046e64ad0c93513bda914cc68b970680bba1f9d8 100644
|
| --- a/net/base/x509_certificate_mac.cc
|
| +++ b/net/base/x509_certificate_mac.cc
|
| @@ -27,6 +27,7 @@
|
| #include "net/base/net_errors.h"
|
| #include "net/base/test_root_certs.h"
|
| #include "net/base/x509_certificate_known_roots_mac.h"
|
| +#include "net/base/x509_util_mac.h"
|
| #include "third_party/apple_apsl/cssmapplePriv.h"
|
| #include "third_party/nss/mozilla/security/nss/lib/certdb/cert.h"
|
|
|
| @@ -768,14 +769,8 @@ int X509Certificate::VerifyInternal(const std::string& hostname,
|
| // array of certificates, the first of which is the certificate we're
|
| // verifying, and the subsequent (optional) certificates are used for
|
| // chain building.
|
| - CFMutableArrayRef cert_array = CFArrayCreateMutable(kCFAllocatorDefault, 0,
|
| - &kCFTypeArrayCallBacks);
|
| - if (!cert_array)
|
| - return ERR_OUT_OF_MEMORY;
|
| - ScopedCFTypeRef<CFArrayRef> scoped_cert_array(cert_array);
|
| - CFArrayAppendValue(cert_array, cert_handle_);
|
| - for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i)
|
| - CFArrayAppendValue(cert_array, intermediate_ca_certs_[i]);
|
| + ScopedCFTypeRef<CFArrayRef> cert_array(
|
| + x509_util::CreateOSCertChainForCert(this));
|
|
|
| // From here on, only one thread can be active at a time. We have had a number
|
| // of sporadic crashes in the SecTrustEvaluate call below, way down inside
|
|
|