Index: chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm b/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm |
index 51357220ff2cd237f169315502f99701ff2bd8fa..680d24e203b57bec8a34027959c1284ea3812e7b 100644 |
--- a/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm |
@@ -208,8 +208,11 @@ void ClearTableViewDataSourcesIfNeeded(NSWindow*) {} |
identities_.reset(CFArrayCreateMutable( |
kCFAllocatorDefault, numCerts, &kCFTypeArrayCallBacks)); |
for (size_t i = 0; i < numCerts; ++i) { |
- SecCertificateRef cert = |
- observer_->cert_request_info()->client_certs[i]->os_cert_handle(); |
+ base::ScopedCFTypeRef<SecCertificateRef> cert( |
+ net::x509_util::CreateSecCertificateFromX509Certificate( |
+ observer_->cert_request_info()->client_certs[i].get())); |
+ if (!cert) |
+ continue; |
SecIdentityRef identity; |
if (SecIdentityCreateWithCertificate(NULL, cert, &identity) == noErr) { |
CFArrayAppendValue(identities_, identity); |