2 #include "credential.h"
 
   3 #include "string-list.h"
 
   5 static const char usage_msg[] =
 
   6 "test-credential <fill|approve|reject> [helper...]";
 
   8 int main(int argc, const char **argv)
 
  11         struct credential c = CREDENTIAL_INIT;
 
  17         for (i = 2; i < argc; i++)
 
  18                 string_list_append(&c.helpers, argv[i]);
 
  20         if (credential_read(&c, stdin) < 0)
 
  21                 die("unable to read credential from stdin");
 
  23         if (!strcmp(op, "fill")) {
 
  26                         printf("username=%s\n", c.username);
 
  28                         printf("password=%s\n", c.password);
 
  30         else if (!strcmp(op, "approve"))
 
  31                 credential_approve(&c);
 
  32         else if (!strcmp(op, "reject"))
 
  33                 credential_reject(&c);