32 #include "gnunet_signatures.h"
53 "%s.%s -> %s | %s | %" SCNu64,
63 "%s.%s -> %s.%s | %s | %" SCNu64,
85 enclen += 5 - enclen % 5;
89 char iss_attr[253 + 1];
91 char sub_attr[253 + 1] =
"";
99 "%58s.%253s -> %58s.%253s | %s | %" SCNu64,
109 "%58s.%253s -> %58s | %s | %" SCNu64,
117 "Unable to parse DEL record string `%s'\n",
125 if (strcmp (sub_attr,
"") == 0)
127 attr_len = strlen (iss_attr) + 1;
131 attr_len = strlen (iss_attr) + strlen (sub_attr) + 2;
135 char tmp_str[attr_len];
137 if (strcmp (sub_attr,
"") != 0)
139 tmp_str[strlen (iss_attr)] =
'\0';
144 tmp_str[attr_len - 1] =
'\0';
172 if (strcmp (sub_attr,
"") == 0)
201 const char *iss_attr,
202 const char *sub_attr,
210 if (NULL == sub_attr)
213 attr_len = strlen (iss_attr) + 1;
218 attr_len = strlen (iss_attr) + strlen (sub_attr) + 2;
222 char tmp_str[attr_len];
224 if (NULL != sub_attr)
226 tmp_str[strlen (iss_attr)] =
'\0';
231 tmp_str[attr_len - 1] =
'\0';
240 del->issuer_attribute_len = htonl (strlen (iss_attr) + 1);
241 if (NULL == sub_attr)
243 del->subject_attribute_len = htonl (0);
247 del->subject_attribute_len = htonl (strlen (sub_attr) + 1);
266 if (NULL == sub_attr)
IPC messages between ABD API and ABD service.
#define GNUNET_SIGNATURE_PURPOSE_DELEGATE
Signature for a GNUnet credential (Reclaim)
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_IDENTITY_PublicKey subject_pkey
Subject key.
static char * expiration
Credential TTL.
struct GNUNET_IDENTITY_PublicKey issuer_pkey
Issuer key.
static char * subject
Subject pubkey string.
static int del
Desired action is to remove a record.
API to the Credential service.
struct GNUNET_ABD_Delegate * GNUNET_ABD_delegate_issue(const struct GNUNET_IDENTITY_PrivateKey *issuer, struct GNUNET_IDENTITY_PublicKey *subject, const char *iss_attr, const char *sub_attr, struct GNUNET_TIME_Absolute *expiration)
Issue an attribute to a subject.
enum GNUNET_GenericReturnValue GNUNET_IDENTITY_sign_(const struct GNUNET_IDENTITY_PrivateKey *priv, const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, struct GNUNET_IDENTITY_Signature *sig)
Sign a given block.
enum GNUNET_GenericReturnValue GNUNET_IDENTITY_public_key_from_string(const char *str, struct GNUNET_IDENTITY_PublicKey *key)
Parses a (Base32) string representation of the public key.
enum GNUNET_GenericReturnValue GNUNET_IDENTITY_key_get_public(const struct GNUNET_IDENTITY_PrivateKey *privkey, struct GNUNET_IDENTITY_PublicKey *key)
Retrieves the public key representation of a private key.
char * GNUNET_IDENTITY_public_key_to_string(const struct GNUNET_IDENTITY_PublicKey *key)
Creates a (Base32) string representation of the public key.
#define GNUNET_log(kind,...)
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_ERROR
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
size_t GNUNET_STRINGS_base64_decode(const char *data, size_t len, void **output)
Decode from Base64.
size_t GNUNET_STRINGS_base64_encode(const void *in, size_t len, char **output)
Encode into Base64.
static unsigned int size
Size of the "table".
const char * subject_attribute
The subject attribute.
const char * issuer_attribute
The issuer attribute.
struct GNUNET_IDENTITY_Signature signature
Signature of this credential.
uint32_t issuer_attribute_len
Length of the issuer attribute.
uint32_t subject_attribute_len
Length of the subject attribute.
struct GNUNET_IDENTITY_PublicKey subject_key
Public key of the subject this credential was issued to.
struct GNUNET_TIME_Absolute expiration
Expiration of this credential.
struct GNUNET_IDENTITY_PublicKey issuer_key
The issuer of the credential.
A private key for an identity as per LSD0001.
An identity key as per LSD0001.
An identity signature as per LSD0001.
Time for absolute times used by GNUnet, in microseconds.
uint64_t abs_value_us
The actual value.