Misc API for delegate. More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_abd_service.h"
#include "gnunet_signatures.h"
#include "abd.h"
#include <inttypes.h>
#include "delegate_misc.h"
Go to the source code of this file.
Macros | |
#define | KEY_LEN_ENC (260 / 5) |
Functions | |
char * | GNUNET_ABD_delegate_to_string (const struct GNUNET_ABD_Delegate *cred) |
struct GNUNET_ABD_Delegate * | GNUNET_ABD_delegate_from_string (const char *s) |
struct GNUNET_ABD_Delegate * | GNUNET_ABD_delegate_issue (const struct GNUNET_CRYPTO_PrivateKey *issuer, struct GNUNET_CRYPTO_PublicKey *subject, const char *iss_attr, const char *sub_attr, struct GNUNET_TIME_Absolute *expiration) |
Issue an attribute to a subject. More... | |
Misc API for delegate.
Definition in file delegate_misc.c.
#define KEY_LEN_ENC (260 / 5) |
Definition at line 79 of file delegate_misc.c.
char * GNUNET_ABD_delegate_to_string | ( | const struct GNUNET_ABD_Delegate * | cred | ) |
Definition at line 37 of file delegate_misc.c.
References cred, GNUNET_asprintf(), GNUNET_CRYPTO_public_key_to_string(), GNUNET_free, GNUNET_STRINGS_base64_encode(), issuer_pkey, and subject_pkey.
Referenced by abd_value_to_string(), handle_collect_result(), and sign_cb().
struct GNUNET_ABD_Delegate * GNUNET_ABD_delegate_from_string | ( | const char * | s | ) |
Definition at line 82 of file delegate_misc.c.
References GNUNET_TIME_Absolute::abs_value_us, GNUNET_ABD_Delegate::expiration, GNUNET_assert, GNUNET_CRYPTO_public_key_from_string(), GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_log, GNUNET_malloc, GNUNET_memcpy, GNUNET_STRINGS_base64_decode(), GNUNET_SYSERR, GNUNET_ABD_Delegate::issuer_attribute, GNUNET_ABD_Delegate::issuer_attribute_len, GNUNET_ABD_Delegate::issuer_key, issuer_pkey, KEY_LEN_ENC, GNUNET_ABD_Delegate::signature, GNUNET_ABD_Delegate::subject_attribute, GNUNET_ABD_Delegate::subject_attribute_len, GNUNET_ABD_Delegate::subject_key, and subject_pkey.
Referenced by abd_string_to_value(), run(), and store_cb().