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

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

Issue 1753553002: Suppress the clang warning "-Wdeprecated-declarations" for CSSM API calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp5_gtm2
Patch Set: nits Created 4 years, 9 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
« no previous file with comments | « net/cert/x509_cert_types_mac.cc ('k') | net/cert/x509_util_mac.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/cert/x509_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <CoreServices/CoreServices.h> 8 #include <CoreServices/CoreServices.h>
9 #include <Security/Security.h> 9 #include <Security/Security.h>
10 10
(...skipping 11 matching lines...) Expand all
22 #include "base/synchronization/lock.h" 22 #include "base/synchronization/lock.h"
23 #include "crypto/cssm_init.h" 23 #include "crypto/cssm_init.h"
24 #include "crypto/mac_security_services_lock.h" 24 #include "crypto/mac_security_services_lock.h"
25 #include "net/cert/x509_util_mac.h" 25 #include "net/cert/x509_util_mac.h"
26 26
27 using base::ScopedCFTypeRef; 27 using base::ScopedCFTypeRef;
28 using base::Time; 28 using base::Time;
29 29
30 namespace net { 30 namespace net {
31 31
32 // CSSM functions are deprecated as of OSX 10.7, but have no replacement.
33 // https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1
34 #pragma clang diagnostic push
35 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
36
32 namespace { 37 namespace {
33 38
34 void GetCertDistinguishedName( 39 void GetCertDistinguishedName(
35 const x509_util::CSSMCachedCertificate& cached_cert, 40 const x509_util::CSSMCachedCertificate& cached_cert,
36 const CSSM_OID* oid, 41 const CSSM_OID* oid,
37 CertPrincipal* result) { 42 CertPrincipal* result) {
38 x509_util::CSSMFieldValue distinguished_name; 43 x509_util::CSSMFieldValue distinguished_name;
39 OSStatus status = cached_cert.GetField(oid, &distinguished_name); 44 OSStatus status = cached_cert.GetField(oid, &distinguished_name);
40 if (status || !distinguished_name.field()) 45 if (status || !distinguished_name.field())
41 return; 46 return;
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 CSSM_DATA cert_data; 571 CSSM_DATA cert_data;
567 status = SecCertificateGetData(cert_handle, &cert_data); 572 status = SecCertificateGetData(cert_handle, &cert_data);
568 if (status) 573 if (status)
569 return false; 574 return false;
570 575
571 if (CSSM_CL_CertVerify(cl_handle, 0, &cert_data, &cert_data, NULL, 0)) 576 if (CSSM_CL_CertVerify(cl_handle, 0, &cert_data, &cert_data, NULL, 0))
572 return false; 577 return false;
573 return true; 578 return true;
574 } 579 }
575 580
581 #pragma clang diagnostic pop // "-Wdeprecated-declarations"
582
576 } // namespace net 583 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_cert_types_mac.cc ('k') | net/cert/x509_util_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698