aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/daemon.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2005-12-04 01:30:35 +0000
committerMartin Willi <martin@strongswan.org>2005-12-04 01:30:35 +0000
commit8ff8c33d1d720a227db193c2105cbdcf119e5746 (patch)
tree7de51ee9de420cf13eca9c91f4dfb70901d41e10 /Source/charon/daemon.c
parenta374d1ee669a6b7674f242119369770cb9e5705c (diff)
downloadstrongswan-8ff8c33d1d720a227db193c2105cbdcf119e5746.tar.bz2
strongswan-8ff8c33d1d720a227db193c2105cbdcf119e5746.tar.xz
- implemented RSA, only signing and verifying esma_pkcs1 padded
- removed gmp-helper: chunk_to_mpz is now done with gmp functions, prime generation in prime-pool - added prime-pool (needs priority fix) - proof of concept RSA authentication - mpz uses LEAK_DETECTIVE - configuration-manager supports rsa keys
Diffstat (limited to 'Source/charon/daemon.c')
-rw-r--r--Source/charon/daemon.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/charon/daemon.c b/Source/charon/daemon.c
index d1e0c13c2..be9900757 100644
--- a/Source/charon/daemon.c
+++ b/Source/charon/daemon.c
@@ -179,6 +179,7 @@ static void initialize(private_daemon_t *this)
this->public.sender = sender_create();
this->public.receiver = receiver_create();
this->public.scheduler = scheduler_create();
+ this->public.prime_pool = prime_pool_create(0);
this->public.thread_pool = thread_pool_create(NUMBER_OF_WORKING_THREADS);
}
@@ -203,6 +204,10 @@ static void destroy(private_daemon_t *this)
{
this->public.thread_pool->destroy(this->public.thread_pool);
}
+ if (this->public.prime_pool != NULL)
+ {
+ this->public.prime_pool->destroy(this->public.prime_pool);
+ }
if (this->public.job_queue != NULL)
{
this->public.job_queue->destroy(this->public.job_queue);
@@ -240,7 +245,7 @@ static void destroy(private_daemon_t *this)
* @return created daemon_t
*/
private_daemon_t *daemon_create()
-{
+{
private_daemon_t *this = allocator_alloc_thing(private_daemon_t);
/* assign methods */
@@ -285,6 +290,9 @@ int main(int argc, char *argv[])
{
private_daemon_t *private_charon;
+ /* allocation needs initialization, before any allocs are done */
+ allocator_init();
+
private_charon = daemon_create();
charon = (daemon_t*)private_charon;