aboutsummaryrefslogtreecommitdiffstats
path: root/Source/lib/crypto/signers/hmac_signer.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-04-10 08:07:38 +0000
committerMartin Willi <martin@strongswan.org>2006-04-10 08:07:38 +0000
commit5113680f95e522c677cdd37072cfffbdca06831e (patch)
tree973ac57accbc66b042e5307942c6cbbbf4f19579 /Source/lib/crypto/signers/hmac_signer.c
parent6862128151fb78f63685a8da5575783c426d64a7 (diff)
downloadstrongswan-5113680f95e522c677cdd37072cfffbdca06831e.tar.bz2
strongswan-5113680f95e522c677cdd37072cfffbdca06831e.tar.xz
- split up in libstrong, charon, stroke, testing done
- new leak detective with malloc hook in library - useable, but needs improvements - logger_manager has now a single instance per library - allows use of loggers from any linking prog - a LOT of other things
Diffstat (limited to 'Source/lib/crypto/signers/hmac_signer.c')
-rw-r--r--Source/lib/crypto/signers/hmac_signer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/lib/crypto/signers/hmac_signer.c b/Source/lib/crypto/signers/hmac_signer.c
index e4311da1b..cb7d08244 100644
--- a/Source/lib/crypto/signers/hmac_signer.c
+++ b/Source/lib/crypto/signers/hmac_signer.c
@@ -20,9 +20,10 @@
* for more details.
*/
+#include <string.h>
+
#include "hmac_signer.h"
-#include <utils/allocator.h>
#include <crypto/prfs/hmac_prf.h>
/**
@@ -70,7 +71,7 @@ static void allocate_signature (private_hmac_signer_t *this, chunk_t data, chunk
this->hmac_prf->get_bytes(this->hmac_prf,data,full_mac);
- signature.ptr = allocator_alloc(BLOCK_SIZE);
+ signature.ptr = malloc(BLOCK_SIZE);
signature.len = BLOCK_SIZE;
/* copy signature */
@@ -135,7 +136,7 @@ static void set_key (private_hmac_signer_t *this, chunk_t key)
static status_t destroy(private_hmac_signer_t *this)
{
this->hmac_prf->destroy(this->hmac_prf);
- allocator_free(this);
+ free(this);
return SUCCESS;
}
@@ -144,14 +145,14 @@ static status_t destroy(private_hmac_signer_t *this)
*/
hmac_signer_t *hmac_signer_create(hash_algorithm_t hash_algoritm)
{
- private_hmac_signer_t *this = allocator_alloc_thing(private_hmac_signer_t);
+ private_hmac_signer_t *this = malloc_thing(private_hmac_signer_t);
this->hmac_prf = (prf_t *) hmac_prf_create(hash_algoritm);
if (this->hmac_prf == NULL)
{
/* algorithm not supported */
- allocator_free(this);
+ free(this);
return NULL;
}