add and delete components
[strongswan.git] / src / libimcv / plugins / imv_attestation / attest.c
index 6385e56..ca9efab 100644 (file)
@@ -136,6 +136,7 @@ static void do_args(int argc, char *argv[])
                        { "did", required_argument, NULL, '4' },
                        { "fid", required_argument, NULL, '5' },
                        { "pid", required_argument, NULL, '6' },
+                       { "cid", required_argument, NULL, '7' },
                        { 0,0,0,0 }
                };
 
@@ -165,6 +166,12 @@ static void do_args(int argc, char *argv[])
                        case 'd':
                                op = OP_DEL;
                                continue;
+                       case 'C':
+                               if (!attest->set_component(attest, optarg, op == OP_ADD))
+                               {
+                                       exit(EXIT_FAILURE);
+                               }
+                               continue;
                        case 'D':
                                if (!attest->set_directory(attest, optarg, op == OP_ADD))
                                {
@@ -225,6 +232,12 @@ static void do_args(int argc, char *argv[])
                                        exit(EXIT_FAILURE);
                                }
                                continue;
+                       case '7':
+                               if (!attest->set_cid(attest, atoi(optarg)))
+                               {
+                                       exit(EXIT_FAILURE);
+                               }
+                               continue;
                }
                break;
        }