diff options
Diffstat (limited to 'src/charon/plugins/medsrv')
-rw-r--r-- | src/charon/plugins/medsrv/Makefile.in | 2 | ||||
-rw-r--r-- | src/charon/plugins/medsrv/medsrv_config.c | 8 | ||||
-rw-r--r-- | src/charon/plugins/medsrv/medsrv_creds.c | 11 | ||||
-rw-r--r-- | src/charon/plugins/medsrv/medsrv_plugin.c | 4 |
4 files changed, 14 insertions, 11 deletions
diff --git a/src/charon/plugins/medsrv/Makefile.in b/src/charon/plugins/medsrv/Makefile.in index b6561e15e..2162afa77 100644 --- a/src/charon/plugins/medsrv/Makefile.in +++ b/src/charon/plugins/medsrv/Makefile.in @@ -189,6 +189,8 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ +nm_CFLAGS = @nm_CFLAGS@ +nm_LIBS = @nm_LIBS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ piddir = @piddir@ diff --git a/src/charon/plugins/medsrv/medsrv_config.c b/src/charon/plugins/medsrv/medsrv_config.c index 1017b9de0..bec6837c0 100644 --- a/src/charon/plugins/medsrv/medsrv_config.c +++ b/src/charon/plugins/medsrv/medsrv_config.c @@ -99,8 +99,7 @@ static enumerator_t* create_peer_cfg_enumerator(private_medsrv_config_t *this, peer_cfg = peer_cfg_create( name, 2, this->ike->get_ref(this->ike), me->clone(me), other->clone(other), - CERT_NEVER_SEND, UNIQUE_REPLACE, CONF_AUTH_PUBKEY, - 0, 0, /* EAP method, vendor */ + CERT_NEVER_SEND, UNIQUE_REPLACE, 1, this->rekey*60, 0, /* keytries, rekey, reauth */ this->rekey*5, this->rekey*3, /* jitter, overtime */ TRUE, this->dpd, /* mobike, dpddelay */ @@ -136,9 +135,8 @@ medsrv_config_t *medsrv_config_create(database_t *db) this->public.destroy = (void(*)(medsrv_config_t*))destroy; this->db = db; - this->rekey = lib->settings->get_int(lib->settings, - "medsrv.rekey", 20) * 60; - this->dpd = lib->settings->get_int(lib->settings, "medsrv.dpd", 300); + this->rekey = lib->settings->get_time(lib->settings, "medsrv.rekey", 1200); + this->dpd = lib->settings->get_time(lib->settings, "medsrv.dpd", 300); this->ike = ike_cfg_create(FALSE, FALSE, "0.0.0.0", "0.0.0.0"); this->ike->add_proposal(this->ike, proposal_create_default(PROTO_IKE)); diff --git a/src/charon/plugins/medsrv/medsrv_creds.c b/src/charon/plugins/medsrv/medsrv_creds.c index 48e05c38e..5d2d46e53 100644 --- a/src/charon/plugins/medsrv/medsrv_creds.c +++ b/src/charon/plugins/medsrv/medsrv_creds.c @@ -12,7 +12,7 @@ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * - * $Id: medsrv_creds.c 4061 2008-06-11 14:13:24Z martin $ + * $Id: medsrv_creds.c 4317 2008-09-02 11:00:13Z martin $ */ #include "medsrv_creds.h" @@ -67,7 +67,7 @@ static bool cert_enumerator_enumerate(cert_enumerator_t *this, while (this->inner->enumerate(this->inner, &chunk)) { public = lib->creds->create(lib->creds, CRED_PUBLIC_KEY, KEY_ANY, - BUILD_BLOB_ASN1_DER, chunk_clone(chunk), + BUILD_BLOB_ASN1_DER, chunk, BUILD_END); if (public) { @@ -76,14 +76,17 @@ static bool cert_enumerator_enumerate(cert_enumerator_t *this, trusted = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_TRUSTED_PUBKEY, BUILD_PUBLIC_KEY, public, BUILD_END); + public->destroy(public); if (trusted) { *cert = this->current = trusted; return TRUE; } - continue; } - public->destroy(public); + else + { + public->destroy(public); + } } } this->current = NULL; diff --git a/src/charon/plugins/medsrv/medsrv_plugin.c b/src/charon/plugins/medsrv/medsrv_plugin.c index f29120337..e34a1d4de 100644 --- a/src/charon/plugins/medsrv/medsrv_plugin.c +++ b/src/charon/plugins/medsrv/medsrv_plugin.c @@ -12,7 +12,7 @@ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * - * $Id: medsrv_plugin.c 3915 2008-05-08 12:11:30Z martin $ + * $Id: medsrv_plugin.c 4137 2008-07-01 13:57:47Z martin $ */ #include "medsrv_plugin.h" @@ -74,7 +74,7 @@ plugin_t *plugin_create() this->public.plugin.destroy = (void(*)(plugin_t*))destroy; uri = lib->settings->get_str(lib->settings, - "medmanager.database", NULL); + "medsrv.database", NULL); if (!uri) { DBG1(DBG_CFG, "mediation database URI not defined, skipped"); |