diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2013-01-17 23:32:34 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2013-02-11 15:30:44 +0100 |
commit | ebb87f08f7cb3b5402cea1d7ad7e3ef559bd3451 (patch) | |
tree | 0013fdd9de19f5605558af10797287a9478ea6f9 /src/libcharon/plugins/tnccs_11/tnccs_11.c | |
parent | 98063d8187d6894f4698d689e7c5a3affbcd1622 (diff) | |
download | strongswan-ebb87f08f7cb3b5402cea1d7ad7e3ef559bd3451.tar.bz2 strongswan-ebb87f08f7cb3b5402cea1d7ad7e3ef559bd3451.tar.xz |
Make IKE/EAP IDs available to TNC server/client
Diffstat (limited to 'src/libcharon/plugins/tnccs_11/tnccs_11.c')
-rw-r--r-- | src/libcharon/plugins/tnccs_11/tnccs_11.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/libcharon/plugins/tnccs_11/tnccs_11.c b/src/libcharon/plugins/tnccs_11/tnccs_11.c index cfc29d6ab..c1224af75 100644 --- a/src/libcharon/plugins/tnccs_11/tnccs_11.c +++ b/src/libcharon/plugins/tnccs_11/tnccs_11.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 Andreas Steffen + * Copyright (C) 2010-2013 Andreas Steffen * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it @@ -53,6 +53,16 @@ struct private_tnccs_11_t { bool is_server; /** + * Server identity + */ + identification_t *server; + + /** + * Client identity + */ + identification_t *peer; + + /** * Connection ID assigned to this TNCCS connection */ TNC_ConnectionID connection_id; @@ -528,6 +538,8 @@ METHOD(tls_t, destroy, void, { tnc->tnccs->remove_connection(tnc->tnccs, this->connection_id, this->is_server); + this->server->destroy(this->server); + this->peer->destroy(this->peer); this->mutex->destroy(this->mutex); DESTROY_IF(this->batch); free(this); @@ -536,7 +548,8 @@ METHOD(tls_t, destroy, void, /** * See header */ -tls_t *tnccs_11_create(bool is_server) +tls_t *tnccs_11_create(bool is_server, identification_t *server, + identification_t *peer) { private_tnccs_11_t *this; @@ -551,6 +564,8 @@ tls_t *tnccs_11_create(bool is_server) .destroy = _destroy, }, .is_server = is_server, + .server = server->clone(server), + .peer = peer->clone(peer), .mutex = mutex_create(MUTEX_TYPE_DEFAULT), .max_msg_len = lib->settings->get_int(lib->settings, "%s.plugins.tnccs-11.max_message_size", 45000, |