#include "platform.h"#include "gnunet_signatures.h"#include "gnunet_block_plugin.h"#include "gnunet_gnsrecord_lib.h"#include "gnunet_block_group_lib.h"#include "../../service/revocation/revocation.h"#include "gnunet_revocation_service.h"Go to the source code of this file.
| Data Structures | |
| struct | InternalContext | 
| Context used inside the plugin.  More... | |
| Macros | |
| #define | DEBUG_REVOCATION GNUNET_EXTRA_LOGGING | 
| Functions | |
| static enum GNUNET_GenericReturnValue | block_plugin_revocation_check_query (void *cls, enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode *query, const void *xquery, size_t xquery_size) | 
| Function called to validate a query. | |
| static enum GNUNET_GenericReturnValue | block_plugin_revocation_check_block (void *cls, enum GNUNET_BLOCK_Type type, const void *block, size_t block_size) | 
| Function called to validate a block for storage. | |
| static enum GNUNET_BLOCK_ReplyEvaluationResult | block_plugin_revocation_check_reply (void *cls, enum GNUNET_BLOCK_Type type, struct GNUNET_BLOCK_Group *group, const struct GNUNET_HashCode *query, const void *xquery, size_t xquery_size, const void *reply_block, size_t reply_block_size) | 
| Function called to validate a reply to a request. | |
| static enum GNUNET_GenericReturnValue | block_plugin_revocation_get_key (void *cls, enum GNUNET_BLOCK_Type type, const void *block, size_t block_size, struct GNUNET_HashCode *key) | 
| Function called to obtain the key for a block. | |
| void * | libgnunet_plugin_block_revocation_init (void *cls) | 
| Entry point for the plugin. | |
| void * | libgnunet_plugin_block_revocation_done (void *cls) | 
| Exit point from the plugin. | |
| #define DEBUG_REVOCATION GNUNET_EXTRA_LOGGING | 
Definition at line 35 of file plugin_block_revocation.c.
| 
 | static | 
Function called to validate a query.
| cls | closure | 
| ctx | block context | 
| type | block type | 
| query | original query (hash) | 
| xquery | extrended query data (can be NULL, depending on type) | 
| xquery_size | number of bytes in xquery | 
Definition at line 59 of file plugin_block_revocation.c.
References GNUNET_BLOCK_TYPE_REVOCATION, GNUNET_break, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, and type.
Referenced by libgnunet_plugin_block_revocation_init().
| 
 | static | 
Function called to validate a block for storage.
| cls | closure | 
| type | block type | 
| block | block data to validate | 
| block_size | number of bytes in block | 
Definition at line 89 of file plugin_block_revocation.c.
References InternalContext::epoch_duration, GNUNET_BLOCK_TYPE_REVOCATION, GNUNET_break, GNUNET_break_op, GNUNET_CRYPTO_read_public_key_from_buffer(), GNUNET_GNSRECORD_check_pow(), GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, GNUNET_YES, InternalContext::matching_bits, pk, GNUNET_GNSRECORD_PowP::pow, RevokeMessage::pow_size, and type.
Referenced by libgnunet_plugin_block_revocation_init().
| 
 | static | 
Function called to validate a reply to a request.
Note that it is assumed that the reply has already been matched to the key (and signatures checked) as it would be done with the GetKeyFunction and the BlockEvaluationFunction.
| cls | closure | 
| type | block type | 
| group | which block group to use for evaluation | 
| query | original query (hash) | 
| xquery | extrended query data (can be NULL, depending on type) | 
| xquery_size | number of bytes in xquery | 
| reply_block | response to validate | 
| reply_block_size | number of bytes in reply_block | 
Definition at line 161 of file plugin_block_revocation.c.
References GNUNET_BLOCK_REPLY_OK_LAST, GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED, GNUNET_BLOCK_TYPE_REVOCATION, GNUNET_break, and type.
Referenced by libgnunet_plugin_block_revocation_init().
| 
 | static | 
Function called to obtain the key for a block.
| cls | closure | 
| type | block type | 
| block | block to get the key for | 
| block_size | number of bytes in block | 
| key | set to the key (query) for the given block | 
Definition at line 199 of file plugin_block_revocation.c.
References GNUNET_BLOCK_TYPE_REVOCATION, GNUNET_break, GNUNET_break_op, GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_read_public_key_from_buffer(), GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, key, pk, GNUNET_GNSRECORD_PowP::pow, RevokeMessage::pow_size, and type.
Referenced by libgnunet_plugin_block_revocation_init().
| void * libgnunet_plugin_block_revocation_init | ( | void * | cls | ) | 
Entry point for the plugin.
| cls | the configuration to use | 
Definition at line 257 of file plugin_block_revocation.c.
References block_plugin_revocation_check_block(), block_plugin_revocation_check_query(), block_plugin_revocation_check_reply(), block_plugin_revocation_get_key(), cfg, GNUNET_BLOCK_PluginFunctions::check_block, GNUNET_BLOCK_PluginFunctions::check_query, GNUNET_BLOCK_PluginFunctions::check_reply, GNUNET_BLOCK_PluginFunctions::cls, GNUNET_BLOCK_PluginFunctions::create_group, epoch_duration, InternalContext::epoch_duration, GNUNET_BLOCK_PluginFunctions::get_key, GNUNET_BLOCK_TYPE_ANY, GNUNET_BLOCK_TYPE_REVOCATION, GNUNET_CONFIGURATION_get_value_number(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_new, GNUNET_OK, matching_bits, InternalContext::matching_bits, and GNUNET_BLOCK_PluginFunctions::types.
| void * libgnunet_plugin_block_revocation_done | ( | void * | cls | ) | 
Exit point from the plugin.
Definition at line 304 of file plugin_block_revocation.c.
References GNUNET_BLOCK_PluginFunctions::cls, and GNUNET_free.