attest displays dates either in local time or UTC
[strongswan.git] / src / libpts / plugins / imv_attestation / attest.c
index 281078a..1cdacae 100644 (file)
@@ -99,6 +99,7 @@ static void do_args(int argc, char *argv[])
                OP_USAGE,
                OP_KEYS,
                OP_COMPONENTS,
+               OP_DEVICES,
                OP_FILES,
                OP_HASHES,
                OP_MEASUREMENTS,
@@ -118,6 +119,7 @@ static void do_args(int argc, char *argv[])
                struct option long_opts[] = {
                        { "help", no_argument, NULL, 'h' },
                        { "components", no_argument, NULL, 'c' },
+                       { "devices", no_argument, NULL, 'e' },
                        { "files", no_argument, NULL, 'f' },
                        { "keys", no_argument, NULL, 'k' },
                        { "packages", no_argument, NULL, 'g' },
@@ -143,6 +145,7 @@ static void do_args(int argc, char *argv[])
                        { "rel", no_argument, NULL, 'R' },
                        { "sequence", required_argument, NULL, 'S' },
                        { "seq", required_argument, NULL, 'S' },
+                       { "utc", no_argument, NULL, 'U' },
                        { "version", required_argument, NULL, 'V' },
                        { "security", no_argument, NULL, 'Y' },
                        { "sha1", no_argument, NULL, '1' },
@@ -168,6 +171,9 @@ static void do_args(int argc, char *argv[])
                        case 'c':
                                op = OP_COMPONENTS;
                                continue;
+                       case 'e':
+                               op = OP_DEVICES;
+                               continue;
                        case 'f':
                                op = OP_FILES;
                                continue;
@@ -285,6 +291,9 @@ static void do_args(int argc, char *argv[])
                        case 'S':
                                attest->set_sequence(attest, atoi(optarg));
                                continue;
+                       case 'U':
+                               attest->set_utc(attest);
+                               continue;
                        case 'V':
                                if (!attest->set_version(attest, optarg))
                                {
@@ -360,6 +369,9 @@ static void do_args(int argc, char *argv[])
                case OP_COMPONENTS:
                        attest->list_components(attest);
                        break;
+               case OP_DEVICES:
+                       attest->list_devices(attest);
+                       break;
                case OP_FILES:
                        attest->list_files(attest);
                        break;