[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 72/171: -fix API changes
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 72/171: -fix API changes |
Date: |
Thu, 04 Jan 2018 16:09:40 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 324650a2a05cd38c896162dd8dd7aebd3ddfd25f
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Fri Apr 21 13:51:04 2017 +0200
-fix API changes
---
src/credential/credential_api.c | 4 +-
src/credential/gnunet-credential.c | 77 ++++++++++++++++-----------
src/credential/gnunet-service-credential.c | 2 -
src/identity-provider/identity_provider_api.c | 2 +-
4 files changed, 49 insertions(+), 36 deletions(-)
diff --git a/src/credential/credential_api.c b/src/credential/credential_api.c
index f90bf9630..fd0c9e3d5 100644
--- a/src/credential/credential_api.c
+++ b/src/credential/credential_api.c
@@ -399,7 +399,7 @@ GNUNET_CREDENTIAL_collect (struct GNUNET_CREDENTIAL_Handle
*handle,
"Trying to collect `%s' in CREDENTIAL\n",
issuer_attribute);
nlen = strlen (issuer_attribute) + 1;
- if (nlen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (*vr))
+ if (nlen >= GNUNET_MAX_MESSAGE_SIZE - sizeof (*vr))
{
GNUNET_break (0);
return NULL;
@@ -475,7 +475,7 @@ GNUNET_CREDENTIAL_verify (struct GNUNET_CREDENTIAL_Handle
*handle,
"Trying to verify `%s' in CREDENTIAL\n",
issuer_attribute);
nlen = strlen (issuer_attribute) + 1 + clen;
- if (nlen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (*vr))
+ if (nlen >= GNUNET_MAX_MESSAGE_SIZE - sizeof (*vr))
{
GNUNET_break (0);
return NULL;
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;
/**
* Verify mode
*/
-static uint32_t verify;
+static int verify;
/**
* Issue mode
*/
-static uint32_t create_cred;
+static int create_cred;
/**
* Collect mode
*/
-static uint32_t collect;
+static int collect;
/**
* Task run on shutdown. Cleans up everything.
@@ -537,34 +537,49 @@ run (void *cls,
int
main (int argc, char *const *argv)
{
- static const struct GNUNET_GETOPT_CommandLineOption options[] = {
- {'I', "issue", NULL,
- gettext_noop ("create credential"), 0,
- &GNUNET_GETOPT_set_one, &create_cred},
- {'V', "verify", NULL,
- gettext_noop ("verify credential against attribute"), 0,
- &GNUNET_GETOPT_set_one, &verify},
- {'s', "subject", "PKEY",
- gettext_noop ("The public key of the subject to lookup the credential
for"), 1,
- &GNUNET_GETOPT_set_string, &subject_key},
- {'b', "credential", "CRED",
- gettext_noop ("The name of the credential presented by the subject"), 1,
- &GNUNET_GETOPT_set_string, &subject_credential},
- {'i', "issuer", "PKEY",
- gettext_noop ("The public key of the authority to verify the credential
against"), 1,
- &GNUNET_GETOPT_set_string, &issuer_key},
- {'e', "ego", "EGO",
- gettext_noop ("The ego to use"), 1,
- &GNUNET_GETOPT_set_string, &ego_name},
- {'a', "attribute", "ATTR",
- gettext_noop ("The issuer attribute to verify against or to issue"), 1,
- &GNUNET_GETOPT_set_string, &issuer_attr},
- {'T', "ttl", "EXP",
- gettext_noop ("The time to live for the credential"), 1,
- &GNUNET_GETOPT_set_string, &expiration},
- {'g', "collect", NULL,
- gettext_noop ("collect credentials"), 0,
- &GNUNET_GETOPT_set_one, &collect},
+ struct GNUNET_GETOPT_CommandLineOption options[] = {
+ GNUNET_GETOPT_option_flag ('I',
+ "issue",
+ gettext_noop ("create credential"),
+ &create_cred),
+ GNUNET_GETOPT_option_flag ('V',
+ "verify",
+ gettext_noop ("verify credential against
attribute"),
+ &verify),
+ GNUNET_GETOPT_option_string ('s',
+ "subject",
+ "PKEY",
+ gettext_noop ("The public key of the subject
to lookup the credential for"),
+ &subject_key),
+ GNUNET_GETOPT_option_string ('b',
+ "credential",
+ "CRED",
+ gettext_noop ("The name of the credential
presented by the subject"),
+ &subject_credential),
+ GNUNET_GETOPT_option_string ('i',
+ "issuer",
+ "PKEY",
+ gettext_noop ("The public key of the
authority to verify the credential against"),
+ &issuer_key),
+ GNUNET_GETOPT_option_string ('e',
+ "ego",
+ "EGO",
+ gettext_noop ("The ego to use"),
+ &ego_name),
+ GNUNET_GETOPT_option_string ('a',
+ "attribute",
+ "ATTR",
+ gettext_noop ("The issuer attribute to verify
against or to issue"),
+ &issuer_attr),
+ GNUNET_GETOPT_option_string ('T',
+ "ttl",
+ "EXP",
+ gettext_noop ("The time to live for the
credential"),
+ &expiration),
+ GNUNET_GETOPT_option_flag ('g',
+ "collect",
+ gettext_noop ("collect credentials"),
+ &collect),
GNUNET_GETOPT_OPTION_END
};
int ret;
diff --git a/src/credential/gnunet-service-credential.c
b/src/credential/gnunet-service-credential.c
index 75ed6d5da..3178b133e 100644
--- a/src/credential/gnunet-service-credential.c
+++ b/src/credential/gnunet-service-credential.c
@@ -772,7 +772,6 @@ backward_resolution (void* cls,
ds_entry->issuer_key,
//issuer_key,
GNUNET_GNSRECORD_TYPE_ATTRIBUTE,
GNUNET_GNS_LO_DEFAULT,
- NULL, //shorten_key,
always NULL
&backward_resolution,
ds_entry);
GNUNET_free (lookup_attribute);
@@ -855,7 +854,6 @@ delegation_chain_resolution_start (void* cls)
&vrh->issuer_key, //issuer_key,
GNUNET_GNSRECORD_TYPE_ATTRIBUTE,
GNUNET_GNS_LO_DEFAULT,
- NULL, //shorten_key, always
NULL
&backward_resolution,
ds_entry);
}
diff --git a/src/identity-provider/identity_provider_api.c
b/src/identity-provider/identity_provider_api.c
index 04e3a54f9..9a3304334 100644
--- a/src/identity-provider/identity_provider_api.c
+++ b/src/identity-provider/identity_provider_api.c
@@ -443,7 +443,7 @@ GNUNET_IDENTITY_PROVIDER_issue_token (struct
GNUNET_IDENTITY_PROVIDER_Handle *id
slen = strlen (scopes) + 1;
if (NULL != vattr)
slen += strlen (vattr) + 1;
- if (slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (struct IssueMessage))
+ if (slen >= GNUNET_MAX_MESSAGE_SIZE - sizeof (struct IssueMessage))
{
GNUNET_break (0);
return NULL;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 84/171: Merge remote-tracking branch 'origin/master' into credentials, (continued)
- [GNUnet-SVN] [gnunet] 84/171: Merge remote-tracking branch 'origin/master' into credentials, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 81/171: -fix 0-term, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 86/171: Merge branch 'abe' into identity_abe, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 74/171: -fix, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 83/171: -fix DEBUG output, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 51/171: -towards type4, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 82/171: Merge remote-tracking branch 'origin/master' into credentials, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 71/171: Merge remote-tracking branch 'origin/master' into credentials, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 79/171: Merge remote-tracking branch 'origin/master' into credentials, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 78/171: -fix idp, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 72/171: -fix API changes,
gnunet <=
- [GNUnet-SVN] [gnunet] 76/171: Merge remote-tracking branch 'origin/master' into credentials, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 89/171: Merge branch 'abe' into identity_abe, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 104/171: -fix, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 94/171: -add CLI, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 87/171: -towards IdP2, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 62/171: -change api, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 70/171: - merge with master, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 101/171: -fix, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 107/171: -fix, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 100/171: -merge, gnunet, 2018/01/04