list file measurement hashes
This commit is contained in:
@@ -109,6 +109,9 @@ static void do_args(int argc, char *argv[])
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
case 'H':
|
||||||
|
operation = OP_HASHES;
|
||||||
|
continue;
|
||||||
case 'F':
|
case 'F':
|
||||||
if (!attest->set_file(attest, optarg, op == OP_ADD))
|
if (!attest->set_file(attest, optarg, op == OP_ADD))
|
||||||
{
|
{
|
||||||
@@ -172,10 +175,30 @@ static void do_args(int argc, char *argv[])
|
|||||||
case OP_DEL:
|
case OP_DEL:
|
||||||
attest->delete(attest);
|
attest->delete(attest);
|
||||||
break;
|
break;
|
||||||
|
case OP_HASHES:
|
||||||
|
if ((!product || *product == '\0') && (!file || *file == '\0'))
|
||||||
|
{
|
||||||
|
list_hashes(algo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list_hashes_for_product(algo, product, pid);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fid)
|
||||||
|
{
|
||||||
|
free(file);
|
||||||
|
}
|
||||||
|
if (pid)
|
||||||
|
{
|
||||||
|
free(product);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
|||||||
Reference in New Issue
Block a user