shortened function names and moved to pts subdirectory
This commit is contained in:
parent
51038ba61c
commit
05f03238fa
|
@ -17,8 +17,6 @@ libimcv_la_SOURCES = \
|
|||
pa_tnc/pa_tnc_msg.h pa_tnc/pa_tnc_msg.c \
|
||||
pa_tnc/pa_tnc_attr.h pa_tnc/pa_tnc_attr.c \
|
||||
tcg/tcg_attr.h tcg/tcg_attr.c \
|
||||
tcg/tcg_pts_funct_comp_name.h \
|
||||
tcg/tcg_pts_meas_algo.h tcg/tcg_pts_meas_algo.c \
|
||||
tcg/tcg_pts_attr_proto_caps.h tcg/tcg_pts_attr_proto_caps.c \
|
||||
tcg/tcg_pts_attr_meas_algo.h tcg/tcg_pts_attr_meas_algo.c \
|
||||
tcg/tcg_pts_attr_get_tpm_version_info.h tcg/tcg_pts_attr_get_tpm_version_info.c \
|
||||
|
@ -30,7 +28,9 @@ libimcv_la_SOURCES = \
|
|||
tcg/tcg_pts_attr_simple_comp_evid.h tcg/tcg_pts_attr_simple_comp_evid.c \
|
||||
tcg/tcg_pts_attr_simple_evid_final.h tcg/tcg_pts_attr_simple_evid_final.c \
|
||||
tcg/tcg_pts_attr_req_file_meas.h tcg/tcg_pts_attr_req_file_meas.c \
|
||||
tcg/tcg_pts_attr_file_meas.h tcg/tcg_pts_attr_file_meas.c
|
||||
tcg/tcg_pts_attr_file_meas.h tcg/tcg_pts_attr_file_meas.c \
|
||||
tcg/pts/pts_funct_comp_name.h \
|
||||
tcg/pts/pts_meas_algo.h tcg/pts/pts_meas_algo.c
|
||||
|
||||
# CFLAGS = -Wall -Werror
|
||||
|
||||
|
|
|
@ -107,8 +107,7 @@ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id,
|
|||
}
|
||||
imc_attestation = imc_agent_create(imc_name, IMC_VENDOR_ID, IMC_SUBTYPE,
|
||||
imc_id, actual_version);
|
||||
if (!imc_attestation ||
|
||||
!tcg_pts_probe_meas_algorithms(&supported_algorithms))
|
||||
if (!imc_attestation || !pts_meas_probe_algorithms(&supported_algorithms))
|
||||
{
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
|
@ -201,7 +200,7 @@ static TNC_Result hash_file(char *path, char *out)
|
|||
hash_algorithm_t hash_alg;
|
||||
|
||||
/* Create a hasher */
|
||||
hash_alg = tcg_pts_meas_to_hash_algorithm(selected_algorithm);
|
||||
hash_alg = pts_meas_to_hash_algorithm(selected_algorithm);
|
||||
hasher = lib->crypto->create_hasher(lib->crypto, hash_alg);
|
||||
if (!hasher)
|
||||
{
|
||||
|
|
|
@ -101,8 +101,7 @@ TNC_Result TNC_IMV_Initialize(TNC_IMVID imv_id,
|
|||
}
|
||||
imv_attestation = imv_agent_create(imv_name, IMV_VENDOR_ID, IMV_SUBTYPE,
|
||||
imv_id, actual_version);
|
||||
if (!imv_attestation ||
|
||||
!tcg_pts_probe_meas_algorithms(&supported_algorithms))
|
||||
if (!imv_attestation || !pts_meas_probe_algorithms(&supported_algorithms))
|
||||
{
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
* @{ @ingroup tcg_pts_attr_req_funct_comp_evid
|
||||
*/
|
||||
|
||||
#ifndef TCG_PTS_FUNCT_COMP_NAME_H_
|
||||
#define TCG_PTS_FUNCT_COMP_NAME_H_
|
||||
#ifndef PTS_FUNCT_COMP_NAME_H_
|
||||
#define PTS_FUNCT_COMP_NAME_H_
|
||||
|
||||
typedef enum pts_funct_comp_type_t pts_funct_comp_type_t;
|
||||
typedef enum pts_funct_comp_name_t pts_funct_comp_name_t;
|
||||
|
@ -78,4 +78,4 @@ struct pts_qualifier_t {
|
|||
pts_funct_comp_type_t type;
|
||||
};
|
||||
|
||||
#endif /** TCG_PTS_FUNCT_COMP_NAME_H_ @}*/
|
||||
#endif /** PTS_FUNCT_COMP_NAME_H_ @}*/
|
|
@ -13,14 +13,14 @@
|
|||
* for more details.
|
||||
*/
|
||||
|
||||
#include "tcg_pts_meas_algo.h"
|
||||
#include "pts_meas_algo.h"
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
/**
|
||||
* Described in header.
|
||||
*/
|
||||
bool tcg_pts_probe_meas_algorithms(pts_meas_algorithms_t *algorithms)
|
||||
bool pts_meas_probe_algorithms(pts_meas_algorithms_t *algorithms)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
hash_algorithm_t hash_alg;
|
||||
|
@ -77,7 +77,7 @@ bool tcg_pts_probe_meas_algorithms(pts_meas_algorithms_t *algorithms)
|
|||
/**
|
||||
* Described in header.
|
||||
*/
|
||||
hash_algorithm_t tcg_pts_meas_to_hash_algorithm(pts_meas_algorithms_t algorithm)
|
||||
hash_algorithm_t pts_meas_to_hash_algorithm(pts_meas_algorithms_t algorithm)
|
||||
{
|
||||
switch (algorithm)
|
||||
{
|
|
@ -18,8 +18,8 @@
|
|||
* @{ @ingroup tcg_pts_meas_algo
|
||||
*/
|
||||
|
||||
#ifndef TCG_PTS_MEAS_ALGO_H_
|
||||
#define TCG_PTS_MEAS_ALGO_H_
|
||||
#ifndef PTS_MEAS_ALGO_H_
|
||||
#define PTS_MEAS_ALGO_H_
|
||||
|
||||
#include <library.h>
|
||||
#include <crypto/hashers/hasher.h>
|
||||
|
@ -53,7 +53,7 @@ enum pts_meas_algorithms_t {
|
|||
* @param algorithms set of available algorithms
|
||||
* @return TRUE if mandatory algorithms are available
|
||||
*/
|
||||
bool tcg_pts_probe_meas_algorithms(pts_meas_algorithms_t *algorithms);
|
||||
bool pts_meas_probe_algorithms(pts_meas_algorithms_t *algorithms);
|
||||
|
||||
/**
|
||||
* Convert pts_meas_algorithms_t to hash_algorithm_t
|
||||
|
@ -61,6 +61,6 @@ bool tcg_pts_probe_meas_algorithms(pts_meas_algorithms_t *algorithms);
|
|||
* @param algorithm PTS measurement algorithm type
|
||||
* @return libstrongswan hash algorithm type
|
||||
*/
|
||||
hash_algorithm_t tcg_pts_meas_to_hash_algorithm(pts_meas_algorithms_t algorithm);
|
||||
hash_algorithm_t pts_meas_to_hash_algorithm(pts_meas_algorithms_t algorithm);
|
||||
|
||||
#endif /** TCG_PTS_MEAS_ALGO_H_ @}*/
|
||||
#endif /** PTS_MEAS_ALGO_H_ @}*/
|
|
@ -24,7 +24,7 @@
|
|||
typedef struct tcg_pts_attr_meas_algo_t tcg_pts_attr_meas_algo_t;
|
||||
|
||||
#include "tcg_attr.h"
|
||||
#include "tcg_pts_meas_algo.h"
|
||||
#include "pts/pts_meas_algo.h"
|
||||
#include "pa_tnc/pa_tnc_attr.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,7 +25,7 @@ typedef struct tcg_pts_attr_req_funct_comp_evid_t tcg_pts_attr_req_funct_comp_ev
|
|||
typedef enum pts_attr_req_funct_comp_evid_flag_t pts_attr_req_funct_comp_evid_flag_t;
|
||||
|
||||
#include "tcg_attr.h"
|
||||
#include "tcg_pts_funct_comp_name.h"
|
||||
#include "pts/pts_funct_comp_name.h"
|
||||
#include "pa_tnc/pa_tnc_attr.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,8 +26,8 @@ typedef enum pts_attr_simple_comp_evid_flag_t pts_attr_simple_comp_evid_flag_t;
|
|||
typedef enum pts_pcr_transform_t pts_pcr_transform_t;
|
||||
|
||||
#include "tcg_attr.h"
|
||||
#include "tcg_pts_meas_algo.h"
|
||||
#include "tcg_pts_funct_comp_name.h"
|
||||
#include "pts/pts_meas_algo.h"
|
||||
#include "pts/pts_funct_comp_name.h"
|
||||
#include "pa_tnc/pa_tnc_attr.h"
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue