31#include "gnunet_signatures.h"
45 unsigned int ds_count,
53 for (i = 0; i < ds_count; i++)
83 for (i = 0; i < d_count; i++)
87 if (off +
sizeof (rec) > dest_size)
96 dsr[i].subject_attribute,
117 unsigned int d_count,
125 for (i = 0; i < d_count; i++)
127 if (off +
sizeof (rec) > len)
152 unsigned int c_count,
160 for (i = 0; i < c_count; i++)
182 unsigned int c_count,
192 for (i = 0; i < c_count; i++)
204 if (off +
sizeof (c_rec) > dest_size)
207 off +=
sizeof (c_rec);
211 cd[i].issuer_attribute,
232 unsigned int c_count,
240 for (i = 0; i < c_count; i++)
242 if (off +
sizeof (c_rec) > len)
250 off +=
sizeof (c_rec);
273 unsigned int d_count,
275 unsigned int c_count,
283 for (i = 0; i < d_count; i++)
306 unsigned int d_count,
308 unsigned int c_count,
318 for (i = 0; i < d_count; i++)
324 if (off +
sizeof (rec) > dest_size)
331 dd[i].issuer_attribute,
339 dd[i].subject_attribute,
365 unsigned int d_count,
367 unsigned int c_count,
375 for (i = 0; i < d_count; i++)
377 if (off +
sizeof (rec) > len)
421 char tmp_str[attr_len];
430 tmp_str[attr_len - 1] =
'\0';
471 char *attr_combo_str;
485 attr_combo_str = (
char *) &cdata[1];
489 int attr_combo_len = iss_len + sub_len;
IPC messages between ABD API and ABD service.
struct GNUNET_ABD_Delegate * GNUNET_ABD_delegate_deserialize(const char *data, size_t data_size)
ssize_t GNUNET_ABD_delegates_serialize(unsigned int c_count, const struct GNUNET_ABD_Delegate *cd, size_t dest_size, char *dest)
Serizalize the given abds.
int GNUNET_ABD_delegates_deserialize(size_t len, const char *src, unsigned int c_count, struct GNUNET_ABD_Delegate *cd)
Deserialize the given destination.
size_t GNUNET_ABD_delegation_set_get_size(unsigned int ds_count, const struct GNUNET_ABD_DelegationSet *dsr)
Calculate how many bytes we will need to serialize the given delegation chain.
int GNUNET_ABD_delegate_serialize(struct GNUNET_ABD_Delegate *dele, char **data)
int GNUNET_ABD_delegation_set_deserialize(size_t len, const char *src, unsigned int d_count, struct GNUNET_ABD_DelegationSet *dsr)
Deserialize the given destination.
ssize_t GNUNET_ABD_delegation_set_serialize(unsigned int d_count, const struct GNUNET_ABD_DelegationSet *dsr, size_t dest_size, char *dest)
Serizalize the given delegation chain entries and abd.
size_t GNUNET_ABD_delegates_get_size(unsigned int c_count, const struct GNUNET_ABD_Delegate *cd)
Calculate how many bytes we will need to serialize the abds.
ssize_t GNUNET_ABD_delegation_chain_serialize(unsigned int d_count, const struct GNUNET_ABD_Delegation *dd, unsigned int c_count, const struct GNUNET_ABD_Delegate *cd, size_t dest_size, char *dest)
Serizalize the given delegation chain entries and abd.
int GNUNET_ABD_delegation_chain_deserialize(size_t len, const char *src, unsigned int d_count, struct GNUNET_ABD_Delegation *dd, unsigned int c_count, struct GNUNET_ABD_Delegate *cd)
Deserialize the given destination.
size_t GNUNET_ABD_delegation_chain_get_size(unsigned int d_count, const struct GNUNET_ABD_Delegation *dd, unsigned int c_count, const struct GNUNET_ABD_Delegate *cd)
Calculate how many bytes we will need to serialize the given delegation chain and abd.
API to serialize and deserialize delegation chains and abds.
static int ret
Final status code.
static char * data
The data to insert into the dht.
static struct GNUNET_TIME_Relative expiration
User supplied expiration value.
static size_t data_size
Number of bytes in data.
API to the Credential service.
#define GNUNET_log(kind,...)
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_signature_verify_(uint32_t purpose, const struct GNUNET_CRYPTO_EccSignaturePurpose *validate, const struct GNUNET_CRYPTO_Signature *sig, const struct GNUNET_CRYPTO_PublicKey *pub)
Verify a given signature.
uint64_t GNUNET_ntohll(uint64_t n)
Convert unsigned 64-bit integer to host byte order.
uint64_t GNUNET_htonll(uint64_t n)
Convert unsigned 64-bit integer to network byte order.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
@ GNUNET_ERROR_TYPE_WARNING
#define GNUNET_malloc(size)
Wrapper around malloc.
static unsigned int size
Size of the "table".
#define GNUNET_SIGNATURE_PURPOSE_DELEGATE
Signature for a GNUnet credential (Reclaim)
uint32_t issuer_attribute_len
Issuer attributes.
struct GNUNET_CRYPTO_PublicKey subject_key
Subject key.
uint32_t subject_attribute_len
Subject attributes.
struct GNUNET_CRYPTO_PublicKey issuer_key
Issuer key.
struct GNUNET_CRYPTO_Signature signature
The signature for this credential by the issuer.
uint32_t issuer_attribute_len
Issuer subject attribute length.
struct GNUNET_CRYPTO_PublicKey issuer_key
Public key of the issuer.
struct GNUNET_CRYPTO_PublicKey subject_key
Public key of the subject this credential was issued to.
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
Signature meta.
uint64_t expiration
Expiration time of this credential.
uint32_t subject_attribute_len
Issuer attribute length.
struct GNUNET_CRYPTO_PublicKey subject_key
Subject key.
uint32_t subject_attribute_len
Subject attributes.
const char * subject_attribute
The subject attribute.
const char * issuer_attribute
The issuer attribute.
uint32_t issuer_attribute_len
Length of the issuer attribute.
uint32_t subject_attribute_len
Length of the subject attribute.
struct GNUNET_CRYPTO_Signature signature
Signature of this credential.
struct GNUNET_CRYPTO_PublicKey issuer_key
The issuer of the credential.
struct GNUNET_TIME_Absolute expiration
Expiration of this credential.
struct GNUNET_CRYPTO_PublicKey subject_key
Public key of the subject this credential was issued to.
The attribute delegation record.
const char * subject_attribute
The subject attribute.
struct GNUNET_CRYPTO_PublicKey subject_key
Public key of the subject this attribute was delegated to.
uint32_t subject_attribute_len
uint32_t issuer_attribute_len
Length of the attribute.
uint32_t subject_attribute_len
Length of the attribute.
struct GNUNET_CRYPTO_PublicKey subject_key
Public key of the subject this attribute was delegated to.
const char * issuer_attribute
The attribute.
const char * subject_attribute
The attribute.
struct GNUNET_CRYPTO_PublicKey issuer_key
The issuer of the delegation.
uint32_t size
How many bytes does this signature sign? (including this purpose header); in network byte order (!...
uint32_t purpose
What does this signature vouch for? This must contain a GNUNET_SIGNATURE_PURPOSE_XXX constant (from g...
An identity signature as per LSD0001.
uint64_t abs_value_us
The actual value.