aboutsummaryrefslogtreecommitdiffstats
path: root/Source/testing/diffie_hellman_test.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/testing/diffie_hellman_test.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/testing/diffie_hellman_test.c')
-rw-r--r--Source/testing/diffie_hellman_test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/testing/diffie_hellman_test.c b/Source/testing/diffie_hellman_test.c
index 66dc8aa93..0a44a022a 100644
--- a/Source/testing/diffie_hellman_test.c
+++ b/Source/testing/diffie_hellman_test.c
@@ -19,15 +19,15 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
-
-#include "diffie_hellman_test.h"
-#include <crypto/diffie_hellman.h>
+#include <string.h>
+
+#include "diffie_hellman_test.h"
#include <daemon.h>
#include <utils/logger_manager.h>
-#include <utils/allocator.h>
#include <encoding/payloads/transform_substructure.h>
+#include <crypto/diffie_hellman.h>
/*
* described in Header-File
@@ -39,7 +39,7 @@ void test_diffie_hellman(protected_tester_t *tester)
chunk_t my_public_value, other_public_value;
chunk_t my_secret, other_secret;
- logger = charon->logger_manager->get_logger(charon->logger_manager,TESTER);
+ logger = logger_manager->get_logger(logger_manager,TESTER);
my_diffie_hellman = diffie_hellman_create(MODP_1024_BIT);
@@ -57,8 +57,8 @@ void test_diffie_hellman(protected_tester_t *tester)
my_diffie_hellman->set_other_public_value(my_diffie_hellman,other_public_value);
other_diffie_hellman->set_other_public_value(other_diffie_hellman,my_public_value);
- allocator_free(my_public_value.ptr);
- allocator_free(other_public_value.ptr);
+ free(my_public_value.ptr);
+ free(other_public_value.ptr);
tester->assert_true(tester,(my_diffie_hellman->get_shared_secret(my_diffie_hellman,&my_secret) == SUCCESS), "get_shared_secret call check");
logger->log_chunk(logger,RAW,"My shared secret",my_secret);
@@ -68,8 +68,8 @@ void test_diffie_hellman(protected_tester_t *tester)
tester->assert_true(tester,(memcmp(my_secret.ptr,other_secret.ptr,other_secret.len) == 0), "shared secret same value check");
- allocator_free(my_secret.ptr);
- allocator_free(other_secret.ptr);
+ free(my_secret.ptr);
+ free(other_secret.ptr);
my_diffie_hellman->destroy(my_diffie_hellman);
other_diffie_hellman->destroy(other_diffie_hellman);