From c2835ef29f451226155b2ad413c98ead13a23ff0 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Wed, 10 Nov 2010 22:42:36 +0100 Subject: [PATCH] created dummy have_recommendation() function --- src/libcharon/plugins/tnccs_20/tnccs_20.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/libcharon/plugins/tnccs_20/tnccs_20.c b/src/libcharon/plugins/tnccs_20/tnccs_20.c index 10365d6..156b6ef 100644 --- a/src/libcharon/plugins/tnccs_20/tnccs_20.c +++ b/src/libcharon/plugins/tnccs_20/tnccs_20.c @@ -87,6 +87,16 @@ struct private_tnccs_20_t { mutex_t *recommendation_mutex; }; +static bool have_recommendation(private_tnccs_20_t *this, + TNC_IMV_Action_Recommendation *rec, + TNC_IMV_Evaluation_Result *eval) +{ + /* TODO */ + *rec = TNC_IMV_ACTION_RECOMMENDATION_ALLOW; + *eval = TNC_IMV_EVALUATION_RESULT_COMPLIANT; + return TRUE; +} + METHOD(tnccs_t, send_message, void, private_tnccs_20_t* this, TNC_BufferReference message, TNC_UInt32 message_len, @@ -232,7 +242,17 @@ METHOD(tls_t, get_purpose, tls_purpose_t, METHOD(tls_t, is_complete, bool, private_tnccs_20_t *this) { - return FALSE; + TNC_IMV_Action_Recommendation rec; + TNC_IMV_Evaluation_Result eval; + + if (this->is_server && have_recommendation(this, &rec, &eval)) + { + return charon->imvs->enforce_recommendation(charon->imvs, rec); + } + else + { + return FALSE; + } } METHOD(tls_t, get_eap_msk, chunk_t, -- 2.7.4