diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-07-17 16:38:55 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-07-17 16:38:55 +0200 |
commit | 20ec024a94ad4dfec07e8220931b1955aee39fa4 (patch) | |
tree | 6dcb55ea2da3dc01d3007a02ed94f518236ff0b8 | |
parent | 68b1a559cc60efba4e5505157cd5da2bb11330ef (diff) | |
download | strongswan-20ec024a94ad4dfec07e8220931b1955aee39fa4.tar.bz2 strongswan-20ec024a94ad4dfec07e8220931b1955aee39fa4.tar.xz |
various PTS fixes
-rw-r--r-- | src/libpts/plugins/imv_attestation/attest_db.c | 2 | ||||
-rw-r--r-- | src/libpts/pts/components/ita/ita_comp_ima.c | 2 | ||||
-rw-r--r-- | src/libpts/pts/pts_database.c | 6 | ||||
-rw-r--r-- | src/libpts/pts/pts_file_meas.c | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/libpts/plugins/imv_attestation/attest_db.c b/src/libpts/plugins/imv_attestation/attest_db.c index 13a9f9a20..b345fc05e 100644 --- a/src/libpts/plugins/imv_attestation/attest_db.c +++ b/src/libpts/plugins/imv_attestation/attest_db.c @@ -1156,6 +1156,8 @@ METHOD(attest_db_t, add, bool, this->relative, this->algo); if (!measurements) { + printf("file measurement failed\n"); + hasher->destroy(hasher); return FALSE; } if (this->fid && this->relative) diff --git a/src/libpts/pts/components/ita/ita_comp_ima.c b/src/libpts/pts/components/ita/ita_comp_ima.c index b41e86323..576b9de15 100644 --- a/src/libpts/pts/components/ita/ita_comp_ima.c +++ b/src/libpts/pts/components/ita/ita_comp_ima.c @@ -31,7 +31,7 @@ #define SECURITY_DIR "/sys/kernel/security/" #define IMA_BIOS_MEASUREMENTS SECURITY_DIR "tpm0/binary_bios_measurements" #define IMA_RUNTIME_MEASUREMENTS SECURITY_DIR "ima/binary_runtime_measurements" -#define IMA_MEASUREMENT_BATCH_SIZE 1000 +#define IMA_MEASUREMENT_BATCH_SIZE 200 #define IMA_EVENT_NAME_LEN_MAX 255 #define IMA_PCR 10 #define IMA_PCR_MAX 16 diff --git a/src/libpts/pts/pts_database.c b/src/libpts/pts/pts_database.c index 1c1812a44..7d6e6abab 100644 --- a/src/libpts/pts/pts_database.c +++ b/src/libpts/pts/pts_database.c @@ -130,10 +130,10 @@ METHOD(pts_database_t, check_file_measurement, status_t, status_t status; e = this->db->query(this->db, - "SELECT fh.hash FROM file_hashes AS fh" - "JOIN files AS f ON f.id = fh.file" + "SELECT fh.hash FROM file_hashes AS fh " + "JOIN files AS f ON f.id = fh.file " "JOIN products AS p ON p.id = fh.product " - "WHERE p.product = ? AND f.file = ? AND fh.algo = ?", + "WHERE p.name = ? AND f.path = ? AND fh.algo = ?", DB_TEXT, product, DB_TEXT, filename, DB_INT, algo, DB_BLOB); if (!e) { diff --git a/src/libpts/pts/pts_file_meas.c b/src/libpts/pts/pts_file_meas.c index 4eb359ce1..c19618923 100644 --- a/src/libpts/pts/pts_file_meas.c +++ b/src/libpts/pts/pts_file_meas.c @@ -129,7 +129,7 @@ METHOD(pts_file_meas_t, check, bool, switch (status) { case SUCCESS: - status_msg = "ok"; + status_msg = "is ok"; count_ok++; break; case NOT_FOUND: @@ -144,7 +144,7 @@ METHOD(pts_file_meas_t, check, bool, default: status_msg = "failed"; } - DBG2(DBG_PTS, " %#B for '%s' - %s", &entry->measurement, + DBG2(DBG_PTS, " %#B for '%s' %s", &entry->measurement, entry->filename, status_msg); } enumerator->destroy(enumerator); |