shortened function names and moved to pts subdirectory
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 20 Aug 2011 12:59:25 +0000 (14:59 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 8 Sep 2011 10:08:12 +0000 (12:08 +0200)
12 files changed:
src/libimcv/Makefile.am
src/libimcv/plugins/imc_attestation/imc_attestation.c
src/libimcv/plugins/imv_attestation/imv_attestation.c
src/libimcv/tcg/pts/pts_funct_comp_name.h [new file with mode: 0644]
src/libimcv/tcg/pts/pts_meas_algo.c [new file with mode: 0644]
src/libimcv/tcg/pts/pts_meas_algo.h [new file with mode: 0644]
src/libimcv/tcg/tcg_pts_attr_meas_algo.h
src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.h
src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.h
src/libimcv/tcg/tcg_pts_funct_comp_name.h [deleted file]
src/libimcv/tcg/tcg_pts_meas_algo.c [deleted file]
src/libimcv/tcg/tcg_pts_meas_algo.h [deleted file]

index 7b0266f..cd250a2 100644 (file)
@@ -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
 
index 3b6b0ce..87f5b45 100644 (file)
@@ -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)
        {
index e119369..f9f10e4 100644 (file)
@@ -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;
        }
diff --git a/src/libimcv/tcg/pts/pts_funct_comp_name.h b/src/libimcv/tcg/pts/pts_funct_comp_name.h
new file mode 100644 (file)
index 0000000..e411cf5
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2011 Sansar Choinyambuu
+ * HSR Hochschule fuer Technik Rapperswil
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ */
+
+/**
+ * @defgroup tcg_pts_attr_req_funct_comp_evid tcg_pts_attr_req_funct_comp_evid
+ * @{ @ingroup tcg_pts_attr_req_funct_comp_evid
+ */
+
+#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;
+typedef struct pts_qualifier_t pts_qualifier_t;
+
+/**
+ * PTS Component Functional Type for Qualifier field
+ */
+enum pts_funct_comp_type_t {
+       /** Unknown */
+       PTS_FUNC_COMP_TYPE_UNKNOWN =                    0x0,
+       /** Trusted Platform */
+       PTS_FUNC_COMP_TYPE_TRUSTED =                    0x1,
+       /** Operating System */
+       PTS_FUNC_COMP_TYPE_OS =                                 0x2,
+       /** Graphical User Interface */
+       PTS_FUNC_COMP_TYPE_GUI =                                0x3,
+       /** Application */
+       PTS_FUNC_COMP_TYPE_APP =                                0x4,
+       /** Networking */
+       PTS_FUNC_COMP_TYPE_NET =                                0x5,
+       /** Library */
+       PTS_FUNC_COMP_TYPE_LIB =                                0x6,
+       /** TNC Defined Component */
+       PTS_FUNC_COMP_TYPE_TNC =                                0x7,
+       /** All matching Components */
+       PTS_FUNC_COMP_TYPE_ALL =                                0xF,
+};
+
+/**
+ * PTS Component Functional Name Binary Enumeration
+ */
+enum pts_funct_comp_name_t {
+       /** Ignore */
+       PTS_FUNC_COMP_NAME_IGNORE =                             0x0000,
+       /** CRTM */
+       PTS_FUNC_COMP_NAME_CRTM =                               0x0001,
+       /** BIOS */
+       PTS_FUNC_COMP_NAME_BIOS =                               0x0002,
+       /** Platform Extensions */
+       PTS_FUNC_COMP_NAME_PLATFORM_EXT =               0x0003,
+       /** Motherboard firmware */
+       PTS_FUNC_COMP_NAME_BOARD =                              0x0004,
+       /** Initial Program Loader */
+       PTS_FUNC_COMP_NAME_INIT_LOADER =                0x0005,
+       /** Option ROMs */
+       PTS_FUNC_COMP_NAME_OPT_ROMS =                   0x0006,
+};
+
+/**
+ * Qualifier for Functional Component
+ */
+struct pts_qualifier_t {
+       bool      kernel;
+       bool      sub_component;
+       pts_funct_comp_type_t  type;
+};
+
+#endif /** PTS_FUNCT_COMP_NAME_H_ @}*/
diff --git a/src/libimcv/tcg/pts/pts_meas_algo.c b/src/libimcv/tcg/pts/pts_meas_algo.c
new file mode 100644 (file)
index 0000000..1a929cf
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2011 Andreas Steffen
+ * HSR Hochschule fuer Technik Rapperswil
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ */
+
+#include "pts_meas_algo.h"
+
+#include <debug.h>
+
+/**
+ * Described in header.
+ */
+bool pts_meas_probe_algorithms(pts_meas_algorithms_t *algorithms)
+{
+       enumerator_t *enumerator;
+    hash_algorithm_t hash_alg;
+    const char *plugin_name;
+       char format1[] = "  %s PTS measurement algorithm %N[%s] available";
+       char format2[] = "  %s PTS measurement algorithm %N not available";
+       
+       *algorithms = 0;
+
+       enumerator = lib->crypto->create_hasher_enumerator(lib->crypto);
+       while (enumerator->enumerate(enumerator, &hash_alg, &plugin_name))
+       {
+               if (hash_alg == HASH_SHA1)
+               {
+                       *algorithms |= PTS_MEAS_ALGO_SHA1;
+                       DBG2(DBG_TNC, format1, "mandatory", hash_algorithm_names, hash_alg,
+                                                                 plugin_name);
+               }
+               else if (hash_alg == HASH_SHA256)
+               {
+                       *algorithms |= PTS_MEAS_ALGO_SHA256;
+                       DBG2(DBG_TNC, format1, "mandatory", hash_algorithm_names, hash_alg,
+                                                                 plugin_name);
+               }
+               else if (hash_alg == HASH_SHA384)
+               {
+                       *algorithms |= PTS_MEAS_ALGO_SHA384;
+                       DBG2(DBG_TNC, format1, "optional ", hash_algorithm_names, hash_alg,
+                                                                 plugin_name);
+               }
+       }
+       enumerator->destroy(enumerator);
+
+       if (!(*algorithms & PTS_MEAS_ALGO_SHA384))
+       {       
+               DBG1(DBG_TNC, format2, "optional ", hash_algorithm_names, HASH_SHA384);
+       }
+       if ((*algorithms & PTS_MEAS_ALGO_SHA1) &&
+               (*algorithms & PTS_MEAS_ALGO_SHA256))
+       {
+               return TRUE;
+       }
+       if (!(*algorithms & PTS_MEAS_ALGO_SHA1))
+       {       
+               DBG1(DBG_TNC, format2, "mandatory", hash_algorithm_names, HASH_SHA1);
+       }
+       if (!(*algorithms & PTS_MEAS_ALGO_SHA256))
+       {       
+               DBG1(DBG_TNC, format2, "mandatory", hash_algorithm_names, HASH_SHA256);
+       }
+       return FALSE;
+}
+
+/**
+ * Described in header.
+ */
+hash_algorithm_t pts_meas_to_hash_algorithm(pts_meas_algorithms_t algorithm)
+{
+       switch (algorithm)
+       {
+               case PTS_MEAS_ALGO_SHA1:
+                       return HASH_SHA1;
+               case PTS_MEAS_ALGO_SHA256:
+                       return HASH_SHA256;
+               case PTS_MEAS_ALGO_SHA384:
+                       return HASH_SHA384;
+               default:
+                       return HASH_UNKNOWN;
+       }
+}
diff --git a/src/libimcv/tcg/pts/pts_meas_algo.h b/src/libimcv/tcg/pts/pts_meas_algo.h
new file mode 100644 (file)
index 0000000..6fbac93
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2011 Sansar Choinyambuu
+ * HSR Hochschule fuer Technik Rapperswil
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ */
+
+/**
+ * @defgroup tcg_pts_meas_algo tcg_pts_meas_algo
+ * @{ @ingroup tcg_pts_meas_algo
+ */
+
+#ifndef PTS_MEAS_ALGO_H_
+#define PTS_MEAS_ALGO_H_
+
+#include <library.h>
+#include <crypto/hashers/hasher.h>
+
+typedef enum pts_meas_algorithms_t pts_meas_algorithms_t;
+
+/**
+ * PTS Measurement Algorithms
+ */
+enum pts_meas_algorithms_t {
+       PTS_MEAS_ALGO_SHA1 =    (1<<15),
+       PTS_MEAS_ALGO_SHA256 =  (1<<14),
+       PTS_MEAS_ALGO_SHA384 =  (1<<13),
+};
+
+/**
+ * Diffie-Hellman Hash Algorithm Values
+ * see section 3.8.5 of PTS Protocol: Binding to TNC IF-M Specification
+ *
+ *                       1          
+ *   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
+ *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *  |1|2|3|R|R|R|R|R|R|R|R|R|R|R|R|R|
+ *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *  
+ */
+
+/**
+ * Probe available PTS measurement algorithms
+ *
+ * @param algorithms   set of available algorithms
+ * @return                             TRUE if mandatory algorithms are available
+ */
+bool pts_meas_probe_algorithms(pts_meas_algorithms_t *algorithms);
+
+/**
+ * Convert pts_meas_algorithms_t to hash_algorithm_t
+ *
+ * @param algorithm            PTS measurement algorithm type
+ * @return                             libstrongswan hash algorithm type
+ */
+hash_algorithm_t pts_meas_to_hash_algorithm(pts_meas_algorithms_t algorithm);
+
+#endif /** PTS_MEAS_ALGO_H_ @}*/
index 95a5825..885e2c1 100644 (file)
@@ -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"
 
 /**
index e41b3ab..72d4559 100644 (file)
@@ -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"
 
 /**
index 94fe013..2ed9217 100644 (file)
@@ -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"
 
 /**
diff --git a/src/libimcv/tcg/tcg_pts_funct_comp_name.h b/src/libimcv/tcg/tcg_pts_funct_comp_name.h
deleted file mode 100644 (file)
index 68e0edc..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2011 Sansar Choinyambuu
- * HSR Hochschule fuer Technik Rapperswil
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
- */
-
-/**
- * @defgroup tcg_pts_attr_req_funct_comp_evid tcg_pts_attr_req_funct_comp_evid
- * @{ @ingroup tcg_pts_attr_req_funct_comp_evid
- */
-
-#ifndef TCG_PTS_FUNCT_COMP_NAME_H_
-#define TCG_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;
-typedef struct pts_qualifier_t pts_qualifier_t;
-
-/**
- * PTS Component Functional Type for Qualifier field
- */
-enum pts_funct_comp_type_t {
-       /** Unknown */
-       PTS_FUNC_COMP_TYPE_UNKNOWN =                    0x0,
-       /** Trusted Platform */
-       PTS_FUNC_COMP_TYPE_TRUSTED =                    0x1,
-       /** Operating System */
-       PTS_FUNC_COMP_TYPE_OS =                                 0x2,
-       /** Graphical User Interface */
-       PTS_FUNC_COMP_TYPE_GUI =                                0x3,
-       /** Application */
-       PTS_FUNC_COMP_TYPE_APP =                                0x4,
-       /** Networking */
-       PTS_FUNC_COMP_TYPE_NET =                                0x5,
-       /** Library */
-       PTS_FUNC_COMP_TYPE_LIB =                                0x6,
-       /** TNC Defined Component */
-       PTS_FUNC_COMP_TYPE_TNC =                                0x7,
-       /** All matching Components */
-       PTS_FUNC_COMP_TYPE_ALL =                                0xF,
-};
-
-/**
- * PTS Component Functional Name Binary Enumeration
- */
-enum pts_funct_comp_name_t {
-       /** Ignore */
-       PTS_FUNC_COMP_NAME_IGNORE =                             0x0000,
-       /** CRTM */
-       PTS_FUNC_COMP_NAME_CRTM =                               0x0001,
-       /** BIOS */
-       PTS_FUNC_COMP_NAME_BIOS =                               0x0002,
-       /** Platform Extensions */
-       PTS_FUNC_COMP_NAME_PLATFORM_EXT =               0x0003,
-       /** Motherboard firmware */
-       PTS_FUNC_COMP_NAME_BOARD =                              0x0004,
-       /** Initial Program Loader */
-       PTS_FUNC_COMP_NAME_INIT_LOADER =                0x0005,
-       /** Option ROMs */
-       PTS_FUNC_COMP_NAME_OPT_ROMS =                   0x0006,
-};
-
-/**
- * Qualifier for Functional Component
- */
-struct pts_qualifier_t {
-       bool      kernel;
-       bool      sub_component;
-       pts_funct_comp_type_t  type;
-};
-
-#endif /** TCG_PTS_FUNCT_COMP_NAME_H_ @}*/
diff --git a/src/libimcv/tcg/tcg_pts_meas_algo.c b/src/libimcv/tcg/tcg_pts_meas_algo.c
deleted file mode 100644 (file)
index a5f0a00..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2011 Andreas Steffen
- * HSR Hochschule fuer Technik Rapperswil
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
- */
-
-#include "tcg_pts_meas_algo.h"
-
-#include <debug.h>
-
-/**
- * Described in header.
- */
-bool tcg_pts_probe_meas_algorithms(pts_meas_algorithms_t *algorithms)
-{
-       enumerator_t *enumerator;
-    hash_algorithm_t hash_alg;
-    const char *plugin_name;
-       char format1[] = "  %s PTS measurement algorithm %N[%s] available";
-       char format2[] = "  %s PTS measurement algorithm %N not available";
-       
-       *algorithms = 0;
-
-       enumerator = lib->crypto->create_hasher_enumerator(lib->crypto);
-       while (enumerator->enumerate(enumerator, &hash_alg, &plugin_name))
-       {
-               if (hash_alg == HASH_SHA1)
-               {
-                       *algorithms |= PTS_MEAS_ALGO_SHA1;
-                       DBG2(DBG_TNC, format1, "mandatory", hash_algorithm_names, hash_alg,
-                                                                 plugin_name);
-               }
-               else if (hash_alg == HASH_SHA256)
-               {
-                       *algorithms |= PTS_MEAS_ALGO_SHA256;
-                       DBG2(DBG_TNC, format1, "mandatory", hash_algorithm_names, hash_alg,
-                                                                 plugin_name);
-               }
-               else if (hash_alg == HASH_SHA384)
-               {
-                       *algorithms |= PTS_MEAS_ALGO_SHA384;
-                       DBG2(DBG_TNC, format1, "optional ", hash_algorithm_names, hash_alg,
-                                                                 plugin_name);
-               }
-       }
-       enumerator->destroy(enumerator);
-
-       if (!(*algorithms & PTS_MEAS_ALGO_SHA384))
-       {       
-               DBG1(DBG_TNC, format2, "optional ", hash_algorithm_names, HASH_SHA384);
-       }
-       if ((*algorithms & PTS_MEAS_ALGO_SHA1) &&
-               (*algorithms & PTS_MEAS_ALGO_SHA256))
-       {
-               return TRUE;
-       }
-       if (!(*algorithms & PTS_MEAS_ALGO_SHA1))
-       {       
-               DBG1(DBG_TNC, format2, "mandatory", hash_algorithm_names, HASH_SHA1);
-       }
-       if (!(*algorithms & PTS_MEAS_ALGO_SHA256))
-       {       
-               DBG1(DBG_TNC, format2, "mandatory", hash_algorithm_names, HASH_SHA256);
-       }
-       return FALSE;
-}
-
-/**
- * Described in header.
- */
-hash_algorithm_t tcg_pts_meas_to_hash_algorithm(pts_meas_algorithms_t algorithm)
-{
-       switch (algorithm)
-       {
-               case PTS_MEAS_ALGO_SHA1:
-                       return HASH_SHA1;
-               case PTS_MEAS_ALGO_SHA256:
-                       return HASH_SHA256;
-               case PTS_MEAS_ALGO_SHA384:
-                       return HASH_SHA384;
-               default:
-                       return HASH_UNKNOWN;
-       }
-}
diff --git a/src/libimcv/tcg/tcg_pts_meas_algo.h b/src/libimcv/tcg/tcg_pts_meas_algo.h
deleted file mode 100644 (file)
index 09e402f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2011 Sansar Choinyambuu
- * HSR Hochschule fuer Technik Rapperswil
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
- */
-
-/**
- * @defgroup tcg_pts_meas_algo tcg_pts_meas_algo
- * @{ @ingroup tcg_pts_meas_algo
- */
-
-#ifndef TCG_PTS_MEAS_ALGO_H_
-#define TCG_PTS_MEAS_ALGO_H_
-
-#include <library.h>
-#include <crypto/hashers/hasher.h>
-
-typedef enum pts_meas_algorithms_t pts_meas_algorithms_t;
-
-/**
- * PTS Measurement Algorithms
- */
-enum pts_meas_algorithms_t {
-       PTS_MEAS_ALGO_SHA1 =    (1<<15),
-       PTS_MEAS_ALGO_SHA256 =  (1<<14),
-       PTS_MEAS_ALGO_SHA384 =  (1<<13),
-};
-
-/**
- * Diffie-Hellman Hash Algorithm Values
- * see section 3.8.5 of PTS Protocol: Binding to TNC IF-M Specification
- *
- *                       1          
- *   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
- *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *  |1|2|3|R|R|R|R|R|R|R|R|R|R|R|R|R|
- *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *  
- */
-
-/**
- * Probe available PTS measurement algorithms
- *
- * @param algorithms   set of available algorithms
- * @return                             TRUE if mandatory algorithms are available
- */
-bool tcg_pts_probe_meas_algorithms(pts_meas_algorithms_t *algorithms);
-
-/**
- * Convert pts_meas_algorithms_t to hash_algorithm_t
- *
- * @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);
-
-#endif /** TCG_PTS_MEAS_ALGO_H_ @}*/