diff options
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, |