72 did_document = (
char *)
rd[i].
data;
76 cb (
GNUNET_NO,
"DID Document is not a DID_DOCUMENT record\n",
105 cls_gns_lookup_cb->
cb = cont;
106 cls_gns_lookup_cb->
cls =
cls;
162 const char *did_document
178 printf (
"Ego already has a DID Document. Abort.\n");
188 "DID Docuement is read from \"DID-document\" argument (EXPERIMENTAL)\n");
206 (
void *) cls_record_store_cb);
239 printf (
"The EGO has to have an EdDSA key pair\n");
251 cls_name_store_lookup_cb->
expire_time = (*expire_time);
253 cls_name_store_lookup_cb->
ret =
ret;
262 (
void *) cls_name_store_lookup_cb);
#define GNUNET_GNSRECORD_TYPE_DID_DOCUMENT
Record type to store DID Documents.
#define GNUNET_GNSRECORD_TYPE_EDKEY
GNS zone delegation (EDKEY)
const char * GNUNET_ErrorCode_get_hint(enum GNUNET_ErrorCode ec)
Returns a hint for a given error code.
GNUNET_ErrorCode
Taler error codes.
@ GNUNET_EC_NONE
No error (success).
static void DID_create_namestore_lookup_cb(void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, const char *label, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd)
enum GNUNET_GenericReturnValue DID_resolve(const char *did, struct GNUNET_GNS_Handle *gns_handle, DID_resolve_callback *cont, void *cls)
Resolve a DID.
static void DID_create_did_store_cb(void *cls, enum GNUNET_ErrorCode ec)
enum GNUNET_GenericReturnValue DID_create(const struct GNUNET_IDENTITY_Ego *ego, const char *did_document, const struct GNUNET_TIME_Relative *expire_time, struct GNUNET_NAMESTORE_Handle *namestore_handle, DID_action_callback *cont, void *cls)
Creates a DID and saves DID Document in Namestore.
static void DID_resolve_gns_lookup_cb(void *cls, uint32_t rd_count, const struct GNUNET_GNSRECORD_Data *rd)
GNS lookup callback.
Core functionality for GNUNET Decentralized Identifier.
void DID_resolve_callback(enum GNUNET_GenericReturnValue status, char *did_document, void *cls)
Signature of a callback function that is called after a did has been resolved.
void DID_action_callback(enum GNUNET_GenericReturnValue status, void *cls)
Signature of a callback function that is called after a did has been removed status = 0 if action was...
#define DID_DOCUMENT_LABEL
enum GNUNET_GenericReturnValue DID_did_to_pkey(const char *did, struct GNUNET_IDENTITY_PublicKey *pkey)
Return the public key of a DID.
char * DID_pkey_to_did_document(struct GNUNET_IDENTITY_PublicKey *pkey)
Create a did generate did object.
static int ret
Return value of the commandline.
static struct GNUNET_NAMESTORE_Handle * namestore_handle
static struct GNUNET_GNS_Handle * gns_handle
Handle to the GNS service.
uint32_t data
The data value.
uint32_t did
This has a different ID for each parameter, see PRISM_DID_* constants.
static char * pkey
Public key of the zone to look in, in ASCII.
static char * zone
Name of the zone being managed.
static unsigned int rd_count
Number of records for currently parsed set.
static struct GNUNET_GNSRECORD_Data rd[50]
The record data under a single label.
struct GNUNET_GNS_LookupRequest * GNUNET_GNS_lookup(struct GNUNET_GNS_Handle *handle, const char *name, const struct GNUNET_IDENTITY_PublicKey *zone, uint32_t type, enum GNUNET_GNS_LocalOptions options, GNUNET_GNS_LookupResultProcessor proc, void *proc_cls)
Perform an asynchronous lookup operation on the GNS.
@ GNUNET_GNS_LO_DEFAULT
Defaults, look in cache, then in DHT.
@ GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION
This expiration time of the record is a relative time (not an absolute time).
uint32_t GNUNET_GNSRECORD_typename_to_number(const char *dns_typename)
Convert a type name (e.g.
const struct GNUNET_IDENTITY_PrivateKey * GNUNET_IDENTITY_ego_get_private_key(const struct GNUNET_IDENTITY_Ego *ego)
Obtain the ECC key associated with a ego.
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.
void GNUNET_IDENTITY_ego_get_public_key(struct GNUNET_IDENTITY_Ego *ego, struct GNUNET_IDENTITY_PublicKey *pk)
Get the identifier (public key) of an ego.
GNUNET_GenericReturnValue
Named constants for return values.
struct GNUNET_NAMESTORE_QueueEntry * GNUNET_NAMESTORE_records_lookup(struct GNUNET_NAMESTORE_Handle *h, const struct GNUNET_IDENTITY_PrivateKey *pkey, const char *label, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_NAMESTORE_RecordMonitor rm, void *rm_cls)
Lookup an item in the namestore.
struct GNUNET_NAMESTORE_QueueEntry * GNUNET_NAMESTORE_records_store(struct GNUNET_NAMESTORE_Handle *h, const struct GNUNET_IDENTITY_PrivateKey *pkey, const char *label, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd, GNUNET_NAMESTORE_ContinuationWithStatus cont, void *cont_cls)
Store an item in the namestore.
struct GNUNET_NAMESTORE_Handle * namestore_handle
struct GNUNET_TIME_Relative expire_time
struct DID_action_return * ret
const char * did_document
DID_resolve_callback * cb
uint32_t record_type
Type of the GNS/DNS record.
const void * data
Binary value stored in the DNS record.
size_t data_size
Number of bytes in data.
enum GNUNET_GNSRECORD_Flags flags
Flags for the record.
uint64_t expiration_time
Expiration time for the DNS record.
Connection to the GNS service.
A private key for an identity as per LSD0001.
An identity key as per LSD0001.
Connection to the NAMESTORE service.
Time for relative time used by GNUnet, in microseconds.
uint64_t rel_value_us
The actual value.