- 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
This commit is contained in:
Martin Willi
2006-04-10 08:07:38 +00:00
parent 6862128151
commit 5113680f95
116 changed files with 1399 additions and 1610 deletions
+5 -4
View File
@@ -25,10 +25,11 @@
* for more details.
*/
#include <string.h>
#include "md5_hasher.h"
#include <definitions.h>
#include <utils/allocator.h>
#define BLOCK_SIZE_MD5 16
@@ -334,7 +335,7 @@ static void allocate_hash(private_md5_hasher_t *this, chunk_t chunk, chunk_t *ha
MD5Update(this, chunk.ptr, chunk.len);
if (hash != NULL)
{
allocated_hash.ptr = allocator_alloc(BLOCK_SIZE_MD5);
allocated_hash.ptr = malloc(BLOCK_SIZE_MD5);
allocated_hash.len = BLOCK_SIZE_MD5;
MD5Final(this, allocated_hash.ptr);
@@ -370,7 +371,7 @@ static void reset(private_md5_hasher_t *this)
*/
static void destroy(private_md5_hasher_t *this)
{
allocator_free(this);
free(this);
}
/*
@@ -378,7 +379,7 @@ static void destroy(private_md5_hasher_t *this)
*/
md5_hasher_t *md5_hasher_create()
{
private_md5_hasher_t *this = allocator_alloc_thing(private_md5_hasher_t);
private_md5_hasher_t *this = malloc_thing(private_md5_hasher_t);
this->public.hasher_interface.get_hash = (void (*) (hasher_t*, chunk_t, u_int8_t*))get_hash;
this->public.hasher_interface.allocate_hash = (void (*) (hasher_t*, chunk_t, chunk_t*))allocate_hash;
+5 -4
View File
@@ -23,10 +23,11 @@
* for more details.
*/
#include <string.h>
#include "sha1_hasher.h"
#include <definitions.h>
#include <utils/allocator.h>
#define BLOCK_SIZE_SHA1 20
@@ -208,7 +209,7 @@ static void allocate_hash(private_sha1_hasher_t *this, chunk_t chunk, chunk_t *h
SHA1Update(this, chunk.ptr, chunk.len);
if (hash != NULL)
{
allocated_hash.ptr = allocator_alloc(BLOCK_SIZE_SHA1);
allocated_hash.ptr = malloc(BLOCK_SIZE_SHA1);
allocated_hash.len = BLOCK_SIZE_SHA1;
SHA1Final(this, allocated_hash.ptr);
@@ -244,7 +245,7 @@ static void reset(private_sha1_hasher_t *this)
*/
static void destroy(private_sha1_hasher_t *this)
{
allocator_free(this);
free(this);
}
@@ -253,7 +254,7 @@ static void destroy(private_sha1_hasher_t *this)
*/
sha1_hasher_t *sha1_hasher_create()
{
private_sha1_hasher_t *this = allocator_alloc_thing(private_sha1_hasher_t);
private_sha1_hasher_t *this = malloc_thing(private_sha1_hasher_t);
this->public.hasher_interface.get_hash = (void (*) (hasher_t*, chunk_t, u_int8_t*))get_hash;
this->public.hasher_interface.allocate_hash = (void (*) (hasher_t*, chunk_t, chunk_t*))allocate_hash;