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

Side by Side Diff: base/crypto/cssm_init.cc

Issue 259026: Implement signature_creator_mac (Closed)
Patch Set: cr change Created 11 years, 2 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 | « base/crypto/cssm_init.h ('k') | base/crypto/rsa_private_key_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) 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 "base/crypto/cssm_init.h" 5 #include "base/crypto/cssm_init.h"
6
7 #include <Security/cssm.h>
8
9 #include "base/logging.h" 6 #include "base/logging.h"
10 #include "base/singleton.h" 7 #include "base/singleton.h"
11 8
12 // When writing crypto code for Mac OS X, you may find the following 9 // When writing crypto code for Mac OS X, you may find the following
13 // documentation useful: 10 // documentation useful:
14 // - Common Security: CDSA and CSSM, Version 2 (with corrigenda) 11 // - Common Security: CDSA and CSSM, Version 2 (with corrigenda)
15 // http://www.opengroup.org/security/cdsa.htm 12 // http://www.opengroup.org/security/cdsa.htm
16 // - Apple Cryptographic Service Provider Functional Specification 13 // - Apple Cryptographic Service Provider Functional Specification
17 // - CryptoSample: http://developer.apple.com/SampleCode/CryptoSample/ 14 // - CryptoSample: http://developer.apple.com/SampleCode/CryptoSample/
18 15
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 }; 59 };
63 60
64 } // namespace 61 } // namespace
65 62
66 namespace base { 63 namespace base {
67 64
68 void EnsureCSSMInit() { 65 void EnsureCSSMInit() {
69 Singleton<CSSMInitSingleton>::get(); 66 Singleton<CSSMInitSingleton>::get();
70 } 67 }
71 68
69 void* CSSMMalloc(CSSM_SIZE size, void *alloc_ref) {
70 return malloc(size);
71 }
72
73 void CSSMFree(void* mem_ptr, void* alloc_ref) {
74 free(mem_ptr);
75 }
76
77 void* CSSMRealloc(void* ptr, CSSM_SIZE size, void* alloc_ref) {
78 return realloc(ptr, size);
79 }
80
81 void* CSSMCalloc(uint32 num, CSSM_SIZE size, void* alloc_ref) {
82 return calloc(num, size);
83 }
84
85 const CSSM_API_MEMORY_FUNCS kCssmMemoryFunctions = {
86 CSSMMalloc,
87 CSSMFree,
88 CSSMRealloc,
89 CSSMCalloc,
90 NULL
91 };
92
72 } // namespace base 93 } // namespace base
OLDNEW
« no previous file with comments | « base/crypto/cssm_init.h ('k') | base/crypto/rsa_private_key_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698