api to interact with the identity service More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_constants.h"
#include "gnunet_error_codes.h"
#include "gnunet_protocols.h"
#include "gnunet_identity_service.h"
#include "identity.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_IDENTITY_Operation |
Handle for an operation with the identity service. More... | |
struct | GNUNET_IDENTITY_Handle |
Handle for the service. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "identity-api", __VA_ARGS__) |
api to interact with the identity service
Definition in file identity_api.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "identity-api", __VA_ARGS__) |
Definition at line 34 of file identity_api.c.
|
static |
Definition at line 157 of file identity_api.c.
Referenced by GNUNET_IDENTITY_create().
|
static |
Try again to connect to the identity service.
cls | handle to the identity service. |
Definition at line 484 of file identity_api.c.
References GNUNET_ARM_Handle::cfg, env, GNUNET_assert, GNUNET_CLIENT_connect(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE, GNUNET_MESSAGE_TYPE_IDENTITY_START, GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE, GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_hd_var_size, GNUNET_MQ_msg, GNUNET_MQ_send(), h, handlers, LOG, GNUNET_ARM_Handle::mq, mq_error_handler(), msg, and GNUNET_ARM_Handle::reconnect_task.
Referenced by GNUNET_IDENTITY_connect(), and reschedule_connect().
|
static |
Free ego from hash map.
cls | identity service handle |
key | unused |
value | ego to free |
Definition at line 241 of file identity_api.c.
References GNUNET_IDENTITY_Ego::ctx, GNUNET_assert, GNUNET_CONTAINER_multihashmap_remove(), GNUNET_free, GNUNET_OK, GNUNET_YES, h, key, GNUNET_IDENTITY_Ego::name, and value.
Referenced by check_key_type(), and reschedule_connect().
|
static |
Reschedule a connect attempt to the service.
h | transport service to reconnect |
Definition at line 268 of file identity_api.c.
References free_ego(), GNUNET_assert, GNUNET_CONTAINER_DLL_remove, GNUNET_CONTAINER_multihashmap_iterate(), GNUNET_EC_SERVICE_COMMUNICATION_FAILED, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_MQ_destroy(), GNUNET_SCHEDULER_add_delayed(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_STD_BACKOFF, GNUNET_YES, h, LOG, GNUNET_ARM_Handle::mq, op, reconnect(), and GNUNET_ARM_Handle::reconnect_task.
Referenced by handle_identity_result_code(), handle_identity_update(), and mq_error_handler().
|
static |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue.
Not every message queue implementation supports an error handler.
cls | closure with the struct GNUNET_IDENTITY_Handle * |
error | error code |
Definition at line 319 of file identity_api.c.
References h, and reschedule_connect().
Referenced by reconnect().
|
static |
We received a result code from the service.
cls | closure |
rcm | result message received |
Definition at line 335 of file identity_api.c.
References GNUNET_break, GNUNET_CONTAINER_DLL_remove, GNUNET_EC_NONE, GNUNET_free, h, op, reschedule_connect(), and ResultCodeMessage::result_code.
|
static |
Check validity of identity update message.
cls | closure |
um | message received |
Definition at line 368 of file identity_api.c.
References GNUNET_break, GNUNET_OK, GNUNET_SYSERR, UpdateMessage::header, UpdateMessage::name_len, GNUNET_MessageHeader::size, and size.
|
static |
Handle identity update message.
cls | closure |
um | message received |
Definition at line 392 of file identity_api.c.
References GNUNET_IDENTITY_Ego::ctx, UpdateMessage::end_of_list, GNUNET_assert, GNUNET_break, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_multihashmap_remove(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CRYPTO_hash(), GNUNET_free, GNUNET_IDENTITY_private_key_get_length(), GNUNET_IDENTITY_read_private_key_from_buffer(), GNUNET_new, GNUNET_NO, GNUNET_strdup, GNUNET_SYSERR, GNUNET_YES, h, id, GNUNET_IDENTITY_Ego::id, UpdateMessage::key_len, GNUNET_IDENTITY_Ego::name, UpdateMessage::name_len, GNUNET_IDENTITY_Ego::pk, GNUNET_IDENTITY_Ego::pub_initialized, and reschedule_connect().
|
static |
Definition at line 757 of file identity_api.c.
References free_ego(), GNUNET_assert, GNUNET_break, GNUNET_CONTAINER_DLL_remove, GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_iterate(), GNUNET_free, GNUNET_MQ_destroy(), GNUNET_SCHEDULER_cancel(), h, GNUNET_ARM_Handle::mq, op, and GNUNET_ARM_Handle::reconnect_task.
ssize_t GNUNET_IDENTITY_private_key_length_by_type | ( | enum GNUNET_IDENTITY_KeyType | kt | ) |
Definition at line 847 of file identity_api.c.
References GNUNET_break, GNUNET_IDENTITY_TYPE_ECDSA, and GNUNET_IDENTITY_TYPE_EDDSA.