Index: chrome/browser/ui/certificate_viewer_mac.mm |
diff --git a/chrome/browser/ui/certificate_viewer_mac.mm b/chrome/browser/ui/certificate_viewer_mac.mm |
index 6415e99f9486ec9d986d58e0d47de12fc838e489..370ee6d234fb201f976d78c44891e0dca3ff8301 100644 |
--- a/chrome/browser/ui/certificate_viewer_mac.mm |
+++ b/chrome/browser/ui/certificate_viewer_mac.mm |
@@ -99,7 +99,10 @@ void MaybeConstrainPanelSizeForSierraBug() { |
forWebContents:(content::WebContents*)webContents { |
if ((self = [super init])) { |
base::ScopedCFTypeRef<CFArrayRef> certChain( |
- certificate->CreateOSCertChainForCert()); |
+ net::x509_util::CreateSecCertificateArrayForX509Certificate( |
+ certificate)); |
+ if (!certChain) |
+ return self; |
NSArray* certificates = base::mac::CFToNSCast(certChain.get()); |
certificates_.reset([certificates retain]); |
} |