aboutsummaryrefslogtreecommitdiff
path: root/src/credential/gnunet-credential.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2017-04-21 13:51:04 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2017-04-21 13:51:04 +0200
commit324650a2a05cd38c896162dd8dd7aebd3ddfd25f (patch)
tree379add7ad6e4ff4c5ceb92237cde211dbbaac126 /src/credential/gnunet-credential.c
parentde63d950345774c45b8d36969d6ecf9fee43dd9b (diff)
downloadgnunet-324650a2a05cd38c896162dd8dd7aebd3ddfd25f.tar.gz
gnunet-324650a2a05cd38c896162dd8dd7aebd3ddfd25f.zip
-fix API changes
Diffstat (limited to 'src/credential/gnunet-credential.c')
-rw-r--r--src/credential/gnunet-credential.c77
1 files changed, 46 insertions, 31 deletions
diff --git a/src/credential/gnunet-credential.c b/src/credential/gnunet-credential.c
index fb7bdb7f8..92804c97a 100644
--- a/src/credential/gnunet-credential.c
+++ b/src/credential/gnunet-credential.c
@@ -108,17 +108,17 @@ static char *issuer_attr;
108/** 108/**
109 * Verify mode 109 * Verify mode
110 */ 110 */
111static uint32_t verify; 111static int verify;
112 112
113/** 113/**
114 * Issue mode 114 * Issue mode
115 */ 115 */
116static uint32_t create_cred; 116static int create_cred;
117 117
118/** 118/**
119 * Collect mode 119 * Collect mode
120 */ 120 */
121static uint32_t collect; 121static int collect;
122 122
123/** 123/**
124 * Task run on shutdown. Cleans up everything. 124 * Task run on shutdown. Cleans up everything.
@@ -537,34 +537,49 @@ run (void *cls,
537int 537int
538main (int argc, char *const *argv) 538main (int argc, char *const *argv)
539{ 539{
540 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 540 struct GNUNET_GETOPT_CommandLineOption options[] = {
541 {'I', "issue", NULL, 541 GNUNET_GETOPT_option_flag ('I',
542 gettext_noop ("create credential"), 0, 542 "issue",
543 &GNUNET_GETOPT_set_one, &create_cred}, 543 gettext_noop ("create credential"),
544 {'V', "verify", NULL, 544 &create_cred),
545 gettext_noop ("verify credential against attribute"), 0, 545 GNUNET_GETOPT_option_flag ('V',
546 &GNUNET_GETOPT_set_one, &verify}, 546 "verify",
547 {'s', "subject", "PKEY", 547 gettext_noop ("verify credential against attribute"),
548 gettext_noop ("The public key of the subject to lookup the credential for"), 1, 548 &verify),
549 &GNUNET_GETOPT_set_string, &subject_key}, 549 GNUNET_GETOPT_option_string ('s',
550 {'b', "credential", "CRED", 550 "subject",
551 gettext_noop ("The name of the credential presented by the subject"), 1, 551 "PKEY",
552 &GNUNET_GETOPT_set_string, &subject_credential}, 552 gettext_noop ("The public key of the subject to lookup the credential for"),
553 {'i', "issuer", "PKEY", 553 &subject_key),
554 gettext_noop ("The public key of the authority to verify the credential against"), 1, 554 GNUNET_GETOPT_option_string ('b',
555 &GNUNET_GETOPT_set_string, &issuer_key}, 555 "credential",
556 {'e', "ego", "EGO", 556 "CRED",
557 gettext_noop ("The ego to use"), 1, 557 gettext_noop ("The name of the credential presented by the subject"),
558 &GNUNET_GETOPT_set_string, &ego_name}, 558 &subject_credential),
559 {'a', "attribute", "ATTR", 559 GNUNET_GETOPT_option_string ('i',
560 gettext_noop ("The issuer attribute to verify against or to issue"), 1, 560 "issuer",
561 &GNUNET_GETOPT_set_string, &issuer_attr}, 561 "PKEY",
562 {'T', "ttl", "EXP", 562 gettext_noop ("The public key of the authority to verify the credential against"),
563 gettext_noop ("The time to live for the credential"), 1, 563 &issuer_key),
564 &GNUNET_GETOPT_set_string, &expiration}, 564 GNUNET_GETOPT_option_string ('e',
565 {'g', "collect", NULL, 565 "ego",
566 gettext_noop ("collect credentials"), 0, 566 "EGO",
567 &GNUNET_GETOPT_set_one, &collect}, 567 gettext_noop ("The ego to use"),
568 &ego_name),
569 GNUNET_GETOPT_option_string ('a',
570 "attribute",
571 "ATTR",
572 gettext_noop ("The issuer attribute to verify against or to issue"),
573 &issuer_attr),
574 GNUNET_GETOPT_option_string ('T',
575 "ttl",
576 "EXP",
577 gettext_noop ("The time to live for the credential"),
578 &expiration),
579 GNUNET_GETOPT_option_flag ('g',
580 "collect",
581 gettext_noop ("collect credentials"),
582 &collect),
568 GNUNET_GETOPT_OPTION_END 583 GNUNET_GETOPT_OPTION_END
569 }; 584 };
570 int ret; 585 int ret;