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

Side by Side Diff: chrome/browser/cocoa/page_info_window_mac.mm

Issue 452042: Define X509Certificate::intermediate_ca_certs_ as a std::vector of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Update retain the result comment. Sync to ToT. Created 11 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/x509_certificate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/cocoa/page_info_window_mac.h" 5 #include "chrome/browser/cocoa/page_info_window_mac.h"
6 6
7 #include <Security/Security.h> 7 #include <Security/Security.h>
8 #include <SecurityInterface/SFCertificatePanel.h> 8 #include <SecurityInterface/SFCertificatePanel.h>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return; 69 return;
70 70
71 scoped_cftyperef<CFMutableArrayRef> certificates( 71 scoped_cftyperef<CFMutableArrayRef> certificates(
72 CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks)); 72 CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
73 if (!certificates.get()) { 73 if (!certificates.get()) {
74 NOTREACHED(); 74 NOTREACHED();
75 return; 75 return;
76 } 76 }
77 CFArrayAppendValue(certificates, cert_mac); 77 CFArrayAppendValue(certificates, cert_mac);
78 78
79 CFArrayRef ca_certs = cert->GetIntermediateCertificates(); 79 // Server certificate must be first in the array; subsequent certificates
80 if (ca_certs) { 80 // in the chain can be in any order.
81 // Server certificate must be first in the array; subsequent certificates 81 const std::vector<SecCertificateRef>& ca_certs =
82 // in the chain can be in any order. 82 cert->GetIntermediateCertificates();
83 CFArrayAppendArray(certificates, ca_certs, 83 for (size_t i = 0; i < ca_certs.size(); ++i)
84 CFRangeMake(0, CFArrayGetCount(ca_certs))); 84 CFArrayAppendValue(certificates, ca_certs[i]);
85 }
86 85
87 [[SFCertificatePanel sharedCertificatePanel] 86 [[SFCertificatePanel sharedCertificatePanel]
88 beginSheetForWindow:[controller_ window] 87 beginSheetForWindow:[controller_ window]
89 modalDelegate:nil 88 modalDelegate:nil
90 didEndSelector:NULL 89 didEndSelector:NULL
91 contextInfo:NULL 90 contextInfo:NULL
92 certificates:reinterpret_cast<NSArray*>(certificates.get()) 91 certificates:reinterpret_cast<NSArray*>(certificates.get())
93 showGroup:YES 92 showGroup:YES
94 ]; 93 ];
95 } 94 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 145 }
147 } 146 }
148 } 147 }
149 148
150 void PageInfoWindowMac::ModelChanged() { 149 void PageInfoWindowMac::ModelChanged() {
151 // We have history information, so show the box and extend the window frame. 150 // We have history information, so show the box and extend the window frame.
152 [controller_ setShowHistoryBox:YES]; 151 [controller_ setShowHistoryBox:YES];
153 LayoutSections(); 152 LayoutSections();
154 } 153 }
155 154
OLDNEW
« no previous file with comments | « no previous file | net/base/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698