Perform and access key revocations. More...
Macros | |
| #define | GNUNET_REVOCATION_VERSION 0x00000001 |
| Version of the key revocation API. | |
Typedefs | |
| typedef void(* | GNUNET_REVOCATION_Callback) (void *cls, enum GNUNET_GenericReturnValue is_valid) |
| Callback to call with the result of a key revocation query. | |
Functions | |
| struct GNUNET_REVOCATION_Query * | GNUNET_REVOCATION_query (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_CRYPTO_PublicKey *key, GNUNET_REVOCATION_Callback func, void *func_cls) |
| Check if a key was revoked. | |
| void | GNUNET_REVOCATION_query_cancel (struct GNUNET_REVOCATION_Query *q) |
| Cancel key revocation check. | |
| struct GNUNET_REVOCATION_Handle * | GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_GNSRECORD_PowP *pow, GNUNET_REVOCATION_Callback func, void *func_cls) |
| Perform key revocation. | |
| void | GNUNET_REVOCATION_revoke_cancel (struct GNUNET_REVOCATION_Handle *h) |
| Cancel key revocation. | |
Perform and access key revocations.
| #define GNUNET_REVOCATION_VERSION 0x00000001 |
Version of the key revocation API.
Definition at line 58 of file gnunet_revocation_service.h.
| typedef void(* GNUNET_REVOCATION_Callback) (void *cls, enum GNUNET_GenericReturnValue is_valid) |
Callback to call with the result of a key revocation query.
| cls | closure |
| is_valid | GNUNET_NO of the key is/was revoked, GNUNET_YES if the key is still valid, GNUNET_SYSERR if we had trouble querying the service |
Definition at line 75 of file gnunet_revocation_service.h.
| struct GNUNET_REVOCATION_Query * GNUNET_REVOCATION_query | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg, |
| const struct GNUNET_CRYPTO_PublicKey * | key, | ||
| GNUNET_REVOCATION_Callback | func, | ||
| void * | func_cls | ||
| ) |
Check if a key was revoked.
| cfg | the configuration to use |
| key | key to check for revocation |
| func | function to call with the result of the check |
| func_cls | closure to pass to func |
Definition at line 108 of file revocation_api.c.
References cfg, env, GNUNET_REVOCATION_Query::func, GNUNET_REVOCATION_Query::func_cls, GNUNET_CLIENT_connect(), GNUNET_CRYPTO_public_key_get_length(), GNUNET_CRYPTO_write_public_key_to_buffer(), GNUNET_free, GNUNET_MESSAGE_TYPE_REVOCATION_QUERY, GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE, GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_new, handlers, key, QueryMessage::key_len, GNUNET_REVOCATION_Query::mq, q, and query_mq_error_handler().
Referenced by recursive_gns_resolution_revocation(), and run().
| void GNUNET_REVOCATION_query_cancel | ( | struct GNUNET_REVOCATION_Query * | q | ) |
Cancel key revocation check.
| q | query to cancel |
Definition at line 155 of file revocation_api.c.
References GNUNET_free, GNUNET_MQ_destroy(), GNUNET_REVOCATION_Query::mq, and q.
Referenced by do_shutdown(), GNS_resolver_lookup_cancel(), handle_revocation_query_response(), and query_mq_error_handler().
| struct GNUNET_REVOCATION_Handle * GNUNET_REVOCATION_revoke | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg, |
| const struct GNUNET_GNSRECORD_PowP * | pow, | ||
| GNUNET_REVOCATION_Callback | func, | ||
| void * | func_cls | ||
| ) |
Perform key revocation.
| cfg | the configuration to use |
| pow | proof of work to use (should have been created by iteratively calling #GNUNET_CRYPTO_pow_round) |
| func | function to call with the result of the check (called with is_valid being GNUNET_NO if the revocation worked). |
| func_cls | closure to pass to func |
| cfg | the configuration to use |
| key | public key of the key to revoke |
| sig | signature to use on the revocation (should have been created using #GNUNET_REVOCATION_sign_revocation). |
| ts | revocation timestamp |
| pow | proof of work to use (should have been created by iteratively calling #GNUNET_REVOCATION_check_pow) |
| func | function to call with the result of the check (called with is_valid being GNUNET_NO if the revocation worked). |
| func_cls | closure to pass to func |
Definition at line 249 of file revocation_api.c.
References cfg, env, epoch_duration, GNUNET_break, GNUNET_CLIENT_connect(), GNUNET_CONFIGURATION_get_value_number(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_free, GNUNET_GNSRECORD_check_pow(), GNUNET_GNSRECORD_proof_get_size(), GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE, GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE, GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_new, GNUNET_OK, GNUNET_YES, h, handlers, matching_bits, GNUNET_ARM_Handle::mq, RevokeMessage::pow_size, and revocation_mq_error_handler().
Referenced by perform_revocation().
| void GNUNET_REVOCATION_revoke_cancel | ( | struct GNUNET_REVOCATION_Handle * | h | ) |
Cancel key revocation.
| h | operation to cancel |
Definition at line 325 of file revocation_api.c.
References GNUNET_free, GNUNET_MQ_destroy(), h, and GNUNET_ARM_Handle::mq.
Referenced by do_shutdown(), handle_revocation_response(), and revocation_mq_error_handler().