This file is part of GNUnet.
Copyright (C) 2012-2013 GNUnet e.V.
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
+ Affero General Public License for more details.
*/
/**
* @file gnunet-credential.c
* @brief command line tool to access command line Credential service
- * @author Adnan Husain
+ * @author Martin Schanzenbach
*/
#include "platform.h"
#include <gnunet_util_lib.h>
{
if (NULL != verify_request)
{
- GNUNET_CREDENTIAL_verify_cancel (verify_request);
+ GNUNET_CREDENTIAL_request_cancel (verify_request);
verify_request = NULL;
}
if (NULL != credential)
GNUNET_SCHEDULER_shutdown ();
}
-/**
- * Function called with the result of a Credential lookup.
- *
- * @param cls the 'const char *' name that was resolved
- * @param cd_count number of records returned
- * @param cd array of @a cd_count records with the results
- */
static void
handle_collect_result (void *cls,
unsigned int d_count,
}
-/**
- * Function called with the result of a Credential lookup.
- *
- * @param cls the 'const char *' name that was resolved
- * @param cd_count number of records returned
- * @param cd array of @a cd_count records with the results
- */
static void
handle_verify_result (void *cls,
unsigned int d_count,
fprintf (stderr,
_("Failed to connect to CREDENTIAL\n"));
GNUNET_SCHEDULER_shutdown ();
+ return;
}
if (NULL == issuer_attr)
{
fprintf (stderr,
_("You must provide issuer the attribute\n"));
GNUNET_SCHEDULER_shutdown ();
+ return;
}
if (NULL == ego_name)
_("Issuer public key `%s' is not well-formed\n"),
issuer_key);
GNUNET_SCHEDULER_shutdown ();
+ return;
}
credential = GNUNET_CREDENTIAL_connect (cfg);
fprintf (stderr,
_("Failed to connect to CREDENTIAL\n"));
GNUNET_SCHEDULER_shutdown ();
+ return;
}
if (NULL == issuer_attr || NULL == subject_credential)
{
fprintf (stderr,
_("You must provide issuer and subject attributes\n"));
GNUNET_SCHEDULER_shutdown ();
+ return;
}
//Subject credentials are comma separated
"Invalid subject credentials\n");
GNUNET_free (tmp);
GNUNET_SCHEDULER_shutdown ();
+ return;
}
int count = 1;
int i;
{
GNUNET_free ((char*)credentials[i].issuer_attribute);
}
+ GNUNET_free (tmp);
} else if (GNUNET_YES == create_cred) {
if (NULL == ego_name)
{