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

Side by Side Diff: crypto/cssm_init.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 | « crypto/cssm_init.h ('k') | net/base/keygen_handler_mac.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) 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 "crypto/cssm_init.h" 5 #include "crypto/cssm_init.h"
6 6
7 #include <Security/SecBase.h> 7 #include <Security/SecBase.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/mac/scoped_cftyperef.h" 11 #include "base/mac/scoped_cftyperef.h"
12 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
13 #include "base/strings/sys_string_conversions.h" 13 #include "base/strings/sys_string_conversions.h"
14 14
15 // When writing crypto code for Mac OS X, you may find the following 15 // When writing crypto code for Mac OS X, you may find the following
16 // documentation useful: 16 // documentation useful:
17 // - Common Security: CDSA and CSSM, Version 2 (with corrigenda) 17 // - Common Security: CDSA and CSSM, Version 2 (with corrigenda)
18 // http://www.opengroup.org/security/cdsa.htm 18 // http://www.opengroup.org/security/cdsa.htm
19 // - Apple Cryptographic Service Provider Functional Specification 19 // - Apple Cryptographic Service Provider Functional Specification
20 // - CryptoSample: http://developer.apple.com/SampleCode/CryptoSample/ 20 // - CryptoSample: http://developer.apple.com/SampleCode/CryptoSample/
21 21
22 // CSSM functions are deprecated as of OSX 10.7, but have no replacement.
23 // https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1
24 #pragma clang diagnostic push
25 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
26
22 namespace { 27 namespace {
23 28
24 void* CSSMMalloc(CSSM_SIZE size, void* alloc_ref) { 29 void* CSSMMalloc(CSSM_SIZE size, void* alloc_ref) {
25 return malloc(size); 30 return malloc(size);
26 } 31 }
27 32
28 void CSSMFree(void* mem_ptr, void* alloc_ref) { 33 void CSSMFree(void* mem_ptr, void* alloc_ref) {
29 free(mem_ptr); 34 free(mem_ptr);
30 } 35 }
31 36
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 201 }
197 202
198 ScopedCSSMData::~ScopedCSSMData() { 203 ScopedCSSMData::~ScopedCSSMData() {
199 if (data_.Data) { 204 if (data_.Data) {
200 CSSMFree(data_.Data); 205 CSSMFree(data_.Data);
201 data_.Data = NULL; 206 data_.Data = NULL;
202 } 207 }
203 } 208 }
204 209
205 } // namespace crypto 210 } // namespace crypto
211
212 #pragma clang diagnostic pop // "-Wdeprecated-declarations"
OLDNEW
« no previous file with comments | « crypto/cssm_init.h ('k') | net/base/keygen_handler_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698