/** * see section 3.8.1 of TCG TNC IF-IMC Specification 1.3 */ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id, TNC_Version min_version, TNC_Version max_version, TNC_Version *actual_version) { if (imc_os) { DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name); return TNC_RESULT_ALREADY_INITIALIZED; } imc_os = imc_agent_create(imc_name, msg_types, 1, imc_id, actual_version); if (!imc_os) { return TNC_RESULT_FATAL; } os = os_info_create(); if (!os) { imc_os->destroy(imc_os); imc_os = NULL; return TNC_RESULT_FATAL; } if (min_version > TNC_IFIMC_VERSION_1 || max_version < TNC_IFIMC_VERSION_1) { DBG1(DBG_IMC, "no common IF-IMC version"); return TNC_RESULT_NO_COMMON_VERSION; } return TNC_RESULT_SUCCESS; }
/** * see section 3.8.1 of TCG TNC IF-IMC Specification 1.3 */ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id, TNC_Version min_version, TNC_Version max_version, TNC_Version *actual_version) { if (imc_attestation) { DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name); return TNC_RESULT_ALREADY_INITIALIZED; } if (!pts_meas_algo_probe(&supported_algorithms) || !pts_dh_group_probe(&supported_dh_groups)) { return TNC_RESULT_FATAL; } imc_attestation = imc_agent_create(imc_name, msg_types, 1, imc_id, actual_version); if (!imc_attestation) { return TNC_RESULT_FATAL; } libpts_init(); if (min_version > TNC_IFIMC_VERSION_1 || max_version < TNC_IFIMC_VERSION_1) { DBG1(DBG_IMC, "no common IF-IMC version"); return TNC_RESULT_NO_COMMON_VERSION; } return TNC_RESULT_SUCCESS; }
/** * see section 3.8.1 of TCG TNC IF-IMC Specification 1.3 */ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id, TNC_Version min_version, TNC_Version max_version, TNC_Version *actual_version) { if (imc_swid) { DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name); return TNC_RESULT_ALREADY_INITIALIZED; } imc_swid = imc_agent_create(imc_name, msg_types, countof(msg_types), imc_id, actual_version); if (!imc_swid) { return TNC_RESULT_FATAL; } libpts_init(); if (min_version > TNC_IFIMC_VERSION_1 || max_version < TNC_IFIMC_VERSION_1) { DBG1(DBG_IMC, "no common IF-IMC version"); return TNC_RESULT_NO_COMMON_VERSION; } return TNC_RESULT_SUCCESS; }
/** * see section 3.8.1 of TCG TNC IF-IMC Specification 1.3 */ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id, TNC_Version min_version, TNC_Version max_version, TNC_Version *actual_version) { bool mandatory_dh_groups; if (imc_attestation) { DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name); return TNC_RESULT_ALREADY_INITIALIZED; } imc_attestation = imc_agent_create(imc_name, msg_types, countof(msg_types), imc_id, actual_version); if (!imc_attestation) { return TNC_RESULT_FATAL; } mandatory_dh_groups = lib->settings->get_bool(lib->settings, "%s.plugins.imc-attestation.mandatory_dh_groups", TRUE, lib->ns); if (!pts_meas_algo_probe(&supported_algorithms) || !pts_dh_group_probe(&supported_dh_groups, mandatory_dh_groups)) { imc_attestation->destroy(imc_attestation); imc_attestation = NULL; return TNC_RESULT_FATAL; } libpts_init(); if (min_version > TNC_IFIMC_VERSION_1 || max_version < TNC_IFIMC_VERSION_1) { DBG1(DBG_IMC, "no common IF-IMC version"); return TNC_RESULT_NO_COMMON_VERSION; } return TNC_RESULT_SUCCESS; }