aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2010-11-04 22:08:47 +0100
committerAndreas Steffen <andreas.steffen@strongswan.org>2010-11-09 20:43:50 +0100
commitfe5ce8f3a25e99d35f649586d81414e1ec45e08b (patch)
tree3492234998699eece103e42fd00822d1612ec8a4 /src
parentd5b988ae64334a3f2fcd5c74f07baa185f511a39 (diff)
downloadstrongswan-fe5ce8f3a25e99d35f649586d81414e1ec45e08b.tar.bz2
strongswan-fe5ce8f3a25e99d35f649586d81414e1ec45e08b.tar.xz
select TNCCS protocol via charon.plugins.eap-tnc.protocol
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/plugins/eap_tnc/eap_tnc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libcharon/plugins/eap_tnc/eap_tnc.c b/src/libcharon/plugins/eap_tnc/eap_tnc.c
index f0bff0e1f..034060acb 100644
--- a/src/libcharon/plugins/eap_tnc/eap_tnc.c
+++ b/src/libcharon/plugins/eap_tnc/eap_tnc.c
@@ -114,6 +114,8 @@ static eap_tnc_t *eap_tnc_create(identification_t *server,
private_eap_tnc_t *this;
size_t frag_size;
int max_msg_count;
+ char* protocol;
+ tnccs_type_t type;
tnccs_t *tnccs;
INIT(this,
@@ -133,7 +135,10 @@ static eap_tnc_t *eap_tnc_create(identification_t *server,
"charon.plugins.eap-tnc.fragment_size", MAX_FRAGMENT_LEN);
max_msg_count = lib->settings->get_int(lib->settings,
"charon.plugins.eap-tnc.max_message_count", MAX_MESSAGE_COUNT);
- tnccs = charon->tnccs->create_instance(charon->tnccs, TNCCS_1_1, is_server);
+ protocol = lib->settings->get_str(lib->settings,
+ "charon.plugins.eap-tnc.protocol", "tnccs-1.1");
+ type = strcaseeq(protocol, "tnccs-2.0") ? TNCCS_2_0 : TNCCS_1_1;
+ tnccs = charon->tnccs->create_instance(charon->tnccs, type, is_server);
this->tls_eap = tls_eap_create(EAP_TNC, (tls_t*)tnccs, frag_size, max_msg_count);
if (!this->tls_eap)
{