diff options
author | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2008-10-29 20:30:44 +0000 |
---|---|---|
committer | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2008-10-29 20:30:44 +0000 |
commit | 74f0bbfc53cb5fa519e4e27ece53735ab51b397c (patch) | |
tree | 0dbab9c835be15577ff05b474b6361bb326d66ce /src/charon/plugins/medcli | |
parent | 5c1fa2516bda1ccf8eb00178c0beb196c2020a94 (diff) | |
download | vyos-strongswan-74f0bbfc53cb5fa519e4e27ece53735ab51b397c.tar.gz vyos-strongswan-74f0bbfc53cb5fa519e4e27ece53735ab51b397c.zip |
- New upstream release.
Diffstat (limited to 'src/charon/plugins/medcli')
-rw-r--r-- | src/charon/plugins/medcli/Makefile.in | 2 | ||||
-rw-r--r-- | src/charon/plugins/medcli/medcli_config.c | 14 | ||||
-rw-r--r-- | src/charon/plugins/medcli/medcli_creds.c | 11 | ||||
-rw-r--r-- | src/charon/plugins/medcli/medcli_listener.c | 7 |
4 files changed, 18 insertions, 16 deletions
diff --git a/src/charon/plugins/medcli/Makefile.in b/src/charon/plugins/medcli/Makefile.in index 85be6bae7..605ee1399 100644 --- a/src/charon/plugins/medcli/Makefile.in +++ b/src/charon/plugins/medcli/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/medcli/medcli_config.c b/src/charon/plugins/medcli/medcli_config.c index 96dfa7c94..d1e6c0c9e 100644 --- a/src/charon/plugins/medcli/medcli_config.c +++ b/src/charon/plugins/medcli/medcli_config.c @@ -120,8 +120,7 @@ static peer_cfg_t *get_peer_cfg_by_name(private_medcli_config_t *this, char *nam "mediation", 2, ike_cfg, identification_create_from_encoding(ID_KEY_ID, me), identification_create_from_encoding(ID_KEY_ID, 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 */ @@ -149,8 +148,7 @@ static peer_cfg_t *get_peer_cfg_by_name(private_medcli_config_t *this, char *nam name, 2, this->ike->get_ref(this->ike), identification_create_from_encoding(ID_KEY_ID, me), identification_create_from_encoding(ID_KEY_ID, 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 */ @@ -213,8 +211,7 @@ static bool peer_enumerator_enumerate(peer_enumerator_t *this, peer_cfg_t **cfg) name, 2, this->ike->get_ref(this->ike), identification_create_from_encoding(ID_KEY_ID, me), identification_create_from_encoding(ID_KEY_ID, other), - CERT_NEVER_SEND, UNIQUE_REPLACE, AUTH_RSA, - 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 */ @@ -357,9 +354,8 @@ medcli_config_t *medcli_config_create(database_t *db) this->public.destroy = (void(*)(medcli_config_t*))destroy; this->db = db; - this->rekey = lib->settings->get_int(lib->settings, - "medclient.rekey", 20) * 60; - this->dpd = lib->settings->get_int(lib->settings, "medclient.dpd", 300); + this->rekey = lib->settings->get_time(lib->settings, "medcli.rekey", 1200); + this->dpd = lib->settings->get_time(lib->settings, "medcli.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/medcli/medcli_creds.c b/src/charon/plugins/medcli/medcli_creds.c index 685f34271..1e99f6990 100644 --- a/src/charon/plugins/medcli/medcli_creds.c +++ b/src/charon/plugins/medcli/medcli_creds.c @@ -63,7 +63,7 @@ static bool private_enumerator_enumerate(private_enumerator_t *this, while (this->inner->enumerate(this->inner, &chunk)) { this->current = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, KEY_RSA, - BUILD_BLOB_ASN1_DER, chunk_clone(chunk), + BUILD_BLOB_ASN1_DER, chunk, BUILD_END); if (this->current) { @@ -143,7 +143,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) { @@ -152,14 +152,17 @@ static bool cert_enumerator_enumerate(cert_enumerator_t *this, this->current = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_TRUSTED_PUBKEY, BUILD_PUBLIC_KEY, public, BUILD_END); + public->destroy(public); if (this->current) { *cert = this->current; return TRUE; } - continue; } - public->destroy(public); + else + { + public->destroy(public); + } } } this->current = NULL; diff --git a/src/charon/plugins/medcli/medcli_listener.c b/src/charon/plugins/medcli/medcli_listener.c index cb370ba2a..3b4156903 100644 --- a/src/charon/plugins/medcli/medcli_listener.c +++ b/src/charon/plugins/medcli/medcli_listener.c @@ -51,8 +51,9 @@ struct private_medcli_listener_t { /** * Implementation of bus_listener_t.signal. */ -static bool signal_(private_medcli_listener_t *this, signal_t signal, level_t level, - int thread, ike_sa_t* ike_sa, char *format, va_list args) +static bool signal_(private_medcli_listener_t *this, signal_t signal, + level_t level, int thread, ike_sa_t* ike_sa, void *data, + char *format, va_list args) { mediated_state_t state; @@ -100,7 +101,7 @@ medcli_listener_t *medcli_listener_create(database_t *db) { private_medcli_listener_t *this = malloc_thing(private_medcli_listener_t); - this->public.listener.signal = (bool(*)(bus_listener_t*,signal_t,level_t,int,ike_sa_t*,char*,va_list))signal_; + this->public.listener.signal = (bool(*)(bus_listener_t*,signal_t,level_t,int,ike_sa_t*,void*,char*,va_list))signal_; this->public.destroy = (void (*)(medcli_listener_t*))destroy; this->db = db; |