aboutsummaryrefslogtreecommitdiffstats
path: root/Source/lib/crypto/prf_plus.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/prf_plus.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/prf_plus.c')
-rw-r--r--Source/lib/crypto/prf_plus.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/lib/crypto/prf_plus.c b/Source/lib/crypto/prf_plus.c
index f0f4a11c6..d408d0517 100644
--- a/Source/lib/crypto/prf_plus.c
+++ b/Source/lib/crypto/prf_plus.c
@@ -20,10 +20,10 @@
* for more details.
*/
+#include <string.h>
#include "prf_plus.h"
-#include <utils/allocator.h>
#include <definitions.h>
typedef struct private_prf_plus_t private_prf_plus_t;
@@ -102,7 +102,7 @@ static void get_bytes(private_prf_plus_t *this, size_t length, u_int8_t *buffer)
*/
static void allocate_bytes(private_prf_plus_t *this, size_t length, chunk_t *chunk)
{
- chunk->ptr = allocator_alloc(length);
+ chunk->ptr = malloc(length);
chunk->len = length;
this->public.get_bytes(&(this->public), length, chunk->ptr);
}
@@ -112,9 +112,9 @@ static void allocate_bytes(private_prf_plus_t *this, size_t length, chunk_t *chu
*/
static void destroy(private_prf_plus_t *this)
{
- allocator_free(this->buffer.ptr);
- allocator_free(this->seed.ptr);
- allocator_free(this);
+ free(this->buffer.ptr);
+ free(this->seed.ptr);
+ free(this);
}
/*
@@ -125,7 +125,7 @@ prf_plus_t *prf_plus_create(prf_t *prf, chunk_t seed)
private_prf_plus_t *this;
chunk_t appending_chunk;
- this = allocator_alloc_thing(private_prf_plus_t);
+ this = malloc_thing(private_prf_plus_t);
/* set public methods */
this->public.get_bytes = (void (*)(prf_plus_t *,size_t,u_int8_t*))get_bytes;
@@ -137,12 +137,12 @@ prf_plus_t *prf_plus_create(prf_t *prf, chunk_t seed)
/* allocate buffer for prf output */
this->buffer.len = prf->get_block_size(prf);
- this->buffer.ptr = allocator_alloc(this->buffer.len);
+ this->buffer.ptr = malloc(this->buffer.len);
this->appending_octet = 0x01;
/* clone seed */
- this->seed.ptr = allocator_clone_bytes(seed.ptr, seed.len);
+ this->seed.ptr = clalloc(seed.ptr, seed.len);
this->seed.len = seed.len;
/* do the first run */