Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1255)

Unified Diff: chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm

Issue 2746103003: Add X509CertificateBytes which uses CRYPTO_BUFFER instead of macOS-native certificate types. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/certificate_viewer_mac.mm ('k') | net/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/ui/certificate_viewer_mac.mm ('k') | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698