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 "%52s.%253s -> %52s.%253s | %s | %" SCNu64,
109 "%52s.%253s -> %52s | %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';
147 strlen (subject_pkey),
150 strlen (issuer_pkey),
164 if (strcmp (sub_attr,
"") == 0)
192 const char *iss_attr,
193 const char *sub_attr,
201 if (NULL == sub_attr)
204 attr_len = strlen (iss_attr) + 1;
209 attr_len = strlen (iss_attr) + strlen (sub_attr) + 2;
213 char tmp_str[attr_len];
215 if (NULL != sub_attr)
217 tmp_str[strlen (iss_attr)] =
'\0';
222 tmp_str[attr_len - 1] =
'\0';
232 if (NULL == sub_attr)
257 if (NULL == sub_attr)
struct GNUNET_CRYPTO_EcdsaPublicKey subject_key
Public key of the subject this credential was issued to.
IPC messages between ABD API and ABD service.
char * GNUNET_ABD_delegate_to_string(const struct GNUNET_ABD_Delegate *cred)
uint32_t purpose
What does this signature vouch for? This must contain a GNUNET_SIGNATURE_PURPOSE_XXX constant (from g...
struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key
Public key of the issuer.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
struct GNUNET_ABD_Delegate * GNUNET_ABD_delegate_issue(const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, struct GNUNET_CRYPTO_EcdsaPublicKey *subject, const char *iss_attr, const char *sub_attr, struct GNUNET_TIME_Absolute *expiration)
Issue an attribute to a subject.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
uint64_t expiration
Expiration time of this credential.
struct GNUNET_CRYPTO_EcdsaPublicKey issuer_pkey
Issuer key.
Private ECC key encoded for transmission.
struct GNUNET_CRYPTO_EcdsaSignature signature
Signature of this credential.
struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key
The issuer of the credential.
uint64_t abs_value_us
The actual value.
struct GNUNET_CRYPTO_EcdsaPublicKey subject_key
Public key of the subject this credential was issued to.
static int del
Desired action is to remove a record.
struct GNUNET_ABD_Delegate * GNUNET_ABD_delegate_from_string(const char *s)
uint32_t subject_attribute_len
Length of the subject attribute.
an ECC signature using ECDSA
struct GNUNET_CRYPTO_EcdsaPublicKey subject_pkey
Subject key.
uint32_t size
How many bytes does this signature sign? (including this purpose header); in network byte order (!)...
struct GNUNET_CRYPTO_EcdsaSignature signature
The signature for this credential by the issuer.
static char * expiration
Credential TTL.
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.
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
char * GNUNET_CRYPTO_ecdsa_public_key_to_string(const struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
Convert a public key to a string.
uint64_t GNUNET_htonll(uint64_t n)
Convert unsigned 64-bit integer to network byte order.
uint32_t issuer_attribute_len
Length of the issuer attribute.
static unsigned int size
Size of the "table".
void GNUNET_CRYPTO_ecdsa_key_get_public(const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv, struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
Extract the public key for the given private key.
const char * subject_attribute
The subject attribute.
static char * subject
Subject pubkey string.
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_ecdsa_public_key_from_string(const char *enc, size_t enclen, struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
Convert a string representing a public key to a public key.
uint32_t subject_attribute_len
Issuer attribute length.
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
Signature meta.
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
#define GNUNET_CRYPTO_ecdsa_sign(priv, ps, sig)
ECDSA sign a given block.
#define GNUNET_log(kind,...)
struct GNUNET_TIME_Absolute expiration
Expiration of this credential.
uint32_t issuer_attribute_len
Issuer subject attribute length.
Time for absolute times used by GNUnet, in microseconds.
const char * issuer_attribute
The issuer attribute.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
#define GNUNET_SIGNATURE_PURPOSE_DELEGATE
Signature for a GNUnet credential.