attest displays dates either in local time or UTC
[strongswan.git] / src / libpts / plugins / imv_attestation / attest_usage.c
1 /*
2 * Copyright (C) 2011 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 #include <stdio.h>
17
18 #include "attest_usage.h"
19
20 /**
21 * print attest usage info
22 */
23 void usage(void)
24 {
25 printf("\
26 Usage:\n\
27 ipsec attest --components|--devices|--files|--hashes|--keys [options]\n\
28 \n\
29 ipsec attest --measurements|--packages|--products|--add|--del [options]\n\
30 \n\
31 ipsec attest --components [--key <digest>|--kid <id>]\n\
32 Show a list of components with an AIK digest or\n\
33 its primary key as an optional selector.\n\
34 \n\
35 ipsec attest --devices [--utc]\n\
36 Show a list of registered devices and associated collected information\n\
37 \n\
38 ipsec attest --files [--product <name>|--pid <id>]\n\
39 Show a list of files with a software product name or\n\
40 its primary key as an optional selector.\n\
41 \n\
42 ipsec attest --hashes [--sha1|--sha256|--sha384] [--product <name>|--pid <id>]\n\
43 Show a list of measurement hashes for a given software product or\n\
44 its primary key as an optional selector.\n\
45 \n\
46 ipsec attest --hashes [--sha1|--sha1-ima|--sha256|--sha384] [--file <path>|--fid <id>]\n\
47 Show a list of measurement hashes for a given file or\n\
48 its primary key as an optional selector.\n\
49 \n\
50 ipsec attest --keys [--components <cfn>|--cid <id>]\n\
51 Show a list of AIK key digests with a component or\n\
52 its primary key as an optional selector.\n\
53 \n\
54 ipsec attest --measurements --sha1|--sha256|--sha384 [--component <cfn>|--cid <id>]\n\
55 Show a list of component measurements for a given component or\n\
56 its primary key as an optional selector.\n\
57 \n\
58 ipsec attest --measurements --sha1|--sha256|--sha384 [--key <digest>|--kid <id>|--aik <path>]\n\
59 Show a list of component measurements for a given AIK or\n\
60 its primary key as an optional selector.\n\
61 \n\
62 ipsec attest --packages [--product <name>|--pid <id>] [--utc]\n\
63 Show a list of software packages for a given product or\n\
64 its primary key as an optional selector.\n\
65 \n\
66 ipsec attest --products [--file <path>|--fid <id>]\n\
67 Show a list of supported software products with a file path or\n\
68 its primary key as an optional selector.\n\
69 \n\
70 ipsec attest --add --file <path>|--dir <path>|--product <name>|--component <cfn>\n\
71 Add a file, directory, product or component entry\n\
72 Component <cfn> entries must be of the form <vendor_id>/<name>-<qualifier>\n\
73 \n\
74 ipsec attest --add [--owner <name>] --key <digest>|--aik <path>\n\
75 Add an AIK public key digest entry preceded by an optional owner name\n\
76 \n\
77 ipsec attest --add --product <name>|--pid <id> --sha1|--sha1-ima|--sha256|--sha384\n\
78 [--relative|--rel] --dir <path>|--file <path>\n\
79 Add hashes of a single file or all files in a directory under absolute or relative filenames\n\
80 \n\
81 ipsec attest --add --key <digest|--kid <id> --component <cfn>|--cid <id> --sequence <no>|--seq <no>\n\
82 Add an ordered key/component entry\n\
83 \n\
84 ipsec attest --add --package <name> --version <string> [--security|--blacklist]\n\
85 [--product <name>|--pid <id>]\n\
86 Add a package version for a given product optionally with security or blacklist flag\n\
87 \n\
88 ipsec attest --del --file <path>|--fid <id>|--dir <path>|--did <id>\n\
89 Delete a file or directory entry referenced either by value or primary key\n\
90 \n\
91 ipsec attest --del --product <name>|--pid <id>|--component <cfn>|--cid <id>\n\
92 Delete a product or component entry referenced either by value or primary key\n\
93 \n\
94 ipsec attest --del --product <name>|--pid <id> --file <path>|--fid <id>|--dir <path>|--did <id>\n\
95 Delete a product/file entry referenced either by value or primary key\n\
96 \n\
97 ipsec attest --del --key <digest>|--kid <id>|--aik <path>\n\
98 Delete an AIK entry referenced either by value or primary key\n\
99 \n\
100 ipsec attest --del --key <digest|--kid <id> --component <cfn>|--cid <id>\n\
101 Delete a key/component entry\n\
102 \n\
103 ipsec attest --del --product <name>|--pid <id> --sha1|--sha1-ima|--sha256|--sha384\n\
104 [--dir <path>|--did <id>] --file <path>|--fid <id>\n\
105 Delete a file hash given an absolute or relative filename\n\
106 \n");
107 }
108