diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-10-29 19:33:45 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-11-28 19:41:07 +0100 |
commit | f33a89431c2f55875d20f3015976cd2c3d7ab929 (patch) | |
tree | 9c8130072f4066f44bb49901b4a8ff760a3202d7 /src/libimcv | |
parent | c75dbddb266f8df289ebc32bf937deff431d87e4 (diff) | |
download | strongswan-f33a89431c2f55875d20f3015976cd2c3d7ab929.tar.bz2 strongswan-f33a89431c2f55875d20f3015976cd2c3d7ab929.tar.xz |
list file measurement hashes
Diffstat (limited to 'src/libimcv')
-rw-r--r-- | src/libimcv/plugins/imv_attestation/attest.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libimcv/plugins/imv_attestation/attest.c b/src/libimcv/plugins/imv_attestation/attest.c index b0151568b..81807b24f 100644 --- a/src/libimcv/plugins/imv_attestation/attest.c +++ b/src/libimcv/plugins/imv_attestation/attest.c @@ -109,6 +109,9 @@ static void do_args(int argc, char *argv[]) exit(EXIT_FAILURE); } continue; + case 'H': + operation = OP_HASHES; + continue; case 'F': if (!attest->set_file(attest, optarg, op == OP_ADD)) { @@ -172,10 +175,30 @@ static void do_args(int argc, char *argv[]) case OP_DEL: attest->delete(attest); break; + case OP_HASHES: + if ((!product || *product == '\0') && (!file || *file == '\0')) + { + list_hashes(algo); + } + else + { + list_hashes_for_product(algo, product, pid); + } + break; default: usage(); exit(EXIT_FAILURE); } + + if (fid) + { + free(file); + } + if (pid) + { + free(product); + } + } int main(int argc, char *argv[]) |