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

Side by Side Diff: net/base/x509_certificate_mac.cc

Issue 125120: Use LOAD_VERIFY_EV_CERT to verify EV-ness in Verify().... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/x509_certificate.h ('k') | net/base/x509_certificate_nss.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "net/base/x509_certificate.h" 5 #include "net/base/x509_certificate.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <time.h> 8 #include <time.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 dns_names->clear(); 256 dns_names->clear();
257 257
258 GetCertGeneralNamesForOID(cert_handle_, CSSMOID_SubjectAltName, GNT_DNSName, 258 GetCertGeneralNamesForOID(cert_handle_, CSSMOID_SubjectAltName, GNT_DNSName,
259 dns_names); 259 dns_names);
260 260
261 if (dns_names->empty()) 261 if (dns_names->empty())
262 dns_names->push_back(subject_.common_name); 262 dns_names->push_back(subject_.common_name);
263 } 263 }
264 264
265 int X509Certificate::Verify(const std::string& hostname, 265 int X509Certificate::Verify(const std::string& hostname,
266 bool rev_checking_enabled, 266 int flags, CertVerifyResult* verify_result) const {
267 CertVerifyResult* verify_result) const {
268 NOTIMPLEMENTED(); 267 NOTIMPLEMENTED();
269 return ERR_NOT_IMPLEMENTED; 268 return ERR_NOT_IMPLEMENTED;
270 } 269 }
271 270
272 // Returns true if the certificate is an extended-validation certificate. 271 // Returns true if the certificate is an extended-validation certificate.
273 // 272 //
274 // The certificate has already been verified by the HTTP library. cert_status 273 // The certificate has already been verified by the HTTP library. cert_status
275 // represents the result of that verification. This function performs 274 // represents the result of that verification. This function performs
276 // additional checks of the certificatePolicies extensions of the certificates 275 // additional checks of the certificatePolicies extensions of the certificates
277 // in the certificate chain according to Section 7 (pp. 11-12) of the EV 276 // in the certificate chain according to Section 7 (pp. 11-12) of the EV
278 // Certificate Guidelines Version 1.0 at 277 // Certificate Guidelines Version 1.0 at
279 // http://cabforum.org/EV_Certificate_Guidelines.pdf. 278 // http://cabforum.org/EV_Certificate_Guidelines.pdf.
280 bool X509Certificate::IsEV(int cert_status) const { 279 bool X509Certificate::VerifyEV() const {
281 // TODO(avi): implement this 280 // TODO(avi): implement this
282 NOTIMPLEMENTED(); 281 NOTIMPLEMENTED();
283 return false; 282 return false;
284 } 283 }
285 284
286 // static 285 // static
287 X509Certificate::OSCertHandle X509Certificate::CreateOSCertHandleFromBytes( 286 X509Certificate::OSCertHandle X509Certificate::CreateOSCertHandleFromBytes(
288 const char* data, int length) { 287 const char* data, int length) {
289 CSSM_DATA cert_data; 288 CSSM_DATA cert_data;
290 cert_data.Data = const_cast<uint8*>(reinterpret_cast<const uint8*>(data)); 289 cert_data.Data = const_cast<uint8*>(reinterpret_cast<const uint8*>(data));
(...skipping 28 matching lines...) Expand all
319 318
320 DCHECK(NULL != cert_data.Data); 319 DCHECK(NULL != cert_data.Data);
321 DCHECK(0 != cert_data.Length); 320 DCHECK(0 != cert_data.Length);
322 321
323 CC_SHA1(cert_data.Data, cert_data.Length, sha1.data); 322 CC_SHA1(cert_data.Data, cert_data.Length, sha1.data);
324 323
325 return sha1; 324 return sha1;
326 } 325 }
327 326
328 } // namespace net 327 } // namespace net
OLDNEW
« no previous file with comments | « net/base/x509_certificate.h ('k') | net/base/x509_certificate_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698