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

Unified Diff: base/crypto/rsa_private_key_mac.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/crypto/cssm_init.cc ('k') | base/crypto/signature_creator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/crypto/rsa_private_key_mac.cc
diff --git a/base/crypto/rsa_private_key_mac.cc b/base/crypto/rsa_private_key_mac.cc
index 0efbd144ce2eb60aed7989ed572b5b58dac03838..f44115ce3ad57756745140a5602a20e898ee7026 100644
--- a/base/crypto/rsa_private_key_mac.cc
+++ b/base/crypto/rsa_private_key_mac.cc
@@ -25,32 +25,6 @@ const uint8 kNullTag = 0x05;
const uint8 kOctetStringTag = 0x04;
const uint8 kBitStringTag = 0x03;
-// TODO(hawk): Move the App* functions into a shared location,
-// perhaps cssm_init.cc.
-void* AppMalloc(CSSM_SIZE size, void *alloc_ref) {
- return malloc(size);
-}
-
-void AppFree(void* mem_ptr, void* alloc_ref) {
- free(mem_ptr);
-}
-
-void* AppRealloc(void* ptr, CSSM_SIZE size, void* alloc_ref) {
- return realloc(ptr, size);
-}
-
-void* AppCalloc(uint32 num, CSSM_SIZE size, void* alloc_ref) {
- return calloc(num, size);
-}
-
-const CSSM_API_MEMORY_FUNCS mem_funcs = {
- AppMalloc,
- AppFree,
- AppRealloc,
- AppCalloc,
- NULL
-};
-
// Helper for error handling during key import.
#define READ_ASSERT(truth) \
if (!(truth)) { \
@@ -317,7 +291,7 @@ RSAPrivateKey::RSAPrivateKey() : csp_handle_(0) {
static CSSM_VERSION version = {2, 0};
CSSM_RETURN crtn;
- crtn = CSSM_ModuleAttach(&gGuidAppleCSP, &version, &mem_funcs, 0,
+ crtn = CSSM_ModuleAttach(&gGuidAppleCSP, &version, &kCssmMemoryFunctions, 0,
CSSM_SERVICE_CSP, 0, CSSM_KEY_HIERARCHY_NONE,
NULL, 0, NULL, &csp_handle_);
DCHECK(crtn == CSSM_OK);
« no previous file with comments | « base/crypto/cssm_init.cc ('k') | base/crypto/signature_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698