summaryrefslogtreecommitdiffstats
path: root/base/crypto/rsa_private_key_mac.cc
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 18:55:35 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 18:55:35 +0000
commite90ed8ae06d460f74fc32207ddaca7e1d1de787d (patch)
tree65d98d20e777c0cc1aab3c31cf9ed05e1dc550bd /base/crypto/rsa_private_key_mac.cc
parenta112832e7f2b611a814f68b6f1335159f8f4dec0 (diff)
downloadchromium_src-e90ed8ae06d460f74fc32207ddaca7e1d1de787d.zip
chromium_src-e90ed8ae06d460f74fc32207ddaca7e1d1de787d.tar.gz
chromium_src-e90ed8ae06d460f74fc32207ddaca7e1d1de787d.tar.bz2
Implement signature_creator_mac. Also moved CSSM memory functions to a common shared location.
BUG=20669 Review URL: http://codereview.chromium.org/259026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28135 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/crypto/rsa_private_key_mac.cc')
-rw-r--r--base/crypto/rsa_private_key_mac.cc28
1 files changed, 1 insertions, 27 deletions
diff --git a/base/crypto/rsa_private_key_mac.cc b/base/crypto/rsa_private_key_mac.cc
index 0efbd14..f44115c 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);