Credential service for Attribute-Based Decryption. More...
Data Structures | |
struct | GNUNET_ABD_DelegationRecord |
The attribute delegation record. More... | |
struct | GNUNET_ABD_DelegationRecordSet |
The attribute delegation record. More... | |
struct | GNUNET_ABD_DelegationSet |
The attribute delegation record. More... | |
struct | GNUNET_ABD_Delegation |
A delegation. More... | |
struct | GNUNET_ABD_Delegate |
A delegate. More... | |
Typedefs | |
typedef void(* | GNUNET_ABD_CredentialResultProcessor) (void *cls, unsigned int d_count, struct GNUNET_ABD_Delegation *delegation_chain, unsigned int c_count, struct GNUNET_ABD_Delegate *delegte) |
Iterator called on obtained result for an attribute verification. More... | |
typedef void(* | GNUNET_ABD_IntermediateResultProcessor) (void *cls, struct GNUNET_ABD_Delegation *delegation, bool is_bw) |
typedef void(* | GNUNET_ABD_DelegateResultProcessor) (void *cls, uint32_t success) |
Iterator called on obtained result for an attribute delegation. More... | |
typedef void(* | GNUNET_ABD_RemoveDelegateResultProcessor) (void *cls, uint32_t success) |
Iterator called on obtained result for an attribute delegation removal. More... | |
Enumerations | |
enum | GNUNET_ABD_CredentialFlags { GNUNET_ABD_FLAG_REVOKED =0 , GNUNET_ABD_FLAG_SUBJECT =1 , GNUNET_ABD_FLAG_ISSUER =2 } |
enum | GNUNET_ABD_AlgoDirectionFlags { GNUNET_ABD_FLAG_FORWARD =1 << 0 , GNUNET_ABD_FLAG_BACKWARD =1 << 1 } |
Credential service for Attribute-Based Decryption.
typedef void(* GNUNET_ABD_CredentialResultProcessor) (void *cls, unsigned int d_count, struct GNUNET_ABD_Delegation *delegation_chain, unsigned int c_count, struct GNUNET_ABD_Delegate *delegte) |
Iterator called on obtained result for an attribute verification.
cls | closure |
d_count | the number of delegations processed |
delegation_chain | the delegations processed |
c_count | the number of delegates found |
delegate | the delegates |
Definition at line 269 of file gnunet_abd_service.h.
typedef void(* GNUNET_ABD_IntermediateResultProcessor) (void *cls, struct GNUNET_ABD_Delegation *delegation, bool is_bw) |
Definition at line 278 of file gnunet_abd_service.h.
typedef void(* GNUNET_ABD_DelegateResultProcessor) (void *cls, uint32_t success) |
Iterator called on obtained result for an attribute delegation.
cls | closure |
success | GNUNET_YES if successful |
result | the record data that can be handed to the subject |
Definition at line 291 of file gnunet_abd_service.h.
typedef void(* GNUNET_ABD_RemoveDelegateResultProcessor) (void *cls, uint32_t success) |
Iterator called on obtained result for an attribute delegation removal.
cls | closure |
success | GNUNET_YES if successful |
result | the record data that can be handed to the subject |
Definition at line 301 of file gnunet_abd_service.h.
Enumerator | |
---|---|
GNUNET_ABD_FLAG_REVOKED | |
GNUNET_ABD_FLAG_SUBJECT | |
GNUNET_ABD_FLAG_ISSUER |
Definition at line 65 of file gnunet_abd_service.h.
Enumerator | |
---|---|
GNUNET_ABD_FLAG_FORWARD | |
GNUNET_ABD_FLAG_BACKWARD |
Definition at line 230 of file gnunet_abd_service.h.
struct GNUNET_ABD_Handle * GNUNET_ABD_connect | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg | ) |
Initialize the connection with the Credential service.
cfg | configuration to use |
Initialize the connection with the Credential service.
cfg | configuration to use |
Definition at line 354 of file abd_api.c.
References cfg, GNUNET_VPN_Handle::cfg, GNUNET_free, GNUNET_new, handle, GNUNET_VPN_Handle::mq, and reconnect().
Referenced by run().
void GNUNET_ABD_disconnect | ( | struct GNUNET_ABD_Handle * | handle | ) |
Shutdown connection with the Credential service.
handle | connection to shut down |
Shutdown connection with the Credential service.
handle | handle of the ABD connection to stop |
Definition at line 376 of file abd_api.c.
References GNUNET_assert, GNUNET_free, GNUNET_MQ_destroy(), GNUNET_SCHEDULER_cancel(), handle, and GNUNET_VPN_Handle::mq.
Referenced by do_shutdown().
struct GNUNET_ABD_Request * GNUNET_ABD_verify | ( | struct GNUNET_ABD_Handle * | handle, |
const struct GNUNET_CRYPTO_PublicKey * | issuer_key, | ||
const char * | issuer_attribute, | ||
const struct GNUNET_CRYPTO_PublicKey * | subject_key, | ||
uint32_t | delegate_count, | ||
const struct GNUNET_ABD_Delegate * | delegates, | ||
enum GNUNET_ABD_AlgoDirectionFlags | direction, | ||
GNUNET_ABD_CredentialResultProcessor | proc, | ||
void * | proc_cls, | ||
GNUNET_ABD_IntermediateResultProcessor | proc2, | ||
void * | proc2_cls | ||
) |
Performs attribute verification.
Checks if there is a delegation chain from attribute issuer_attribute'' issued by the issuer with public key
issuer_key'' maps to the attribute subject_attribute'' claimed by the subject with key
subject_key''
handle | handle to the Credential service |
issuer_key | the issuer public key |
issuer_attribute | the issuer attribute |
subject_key | the subject public key |
delegate_count | number of delegates |
delegates | the subject delegates |
proc | function to call on result |
proc_cls | closure for processor |
Checks if there is a delegation chain from attribute issuer_attribute'' issued by the issuer with public key
issuer_key'' maps to the attribute subject_attribute'' claimed by the subject with key
subject_key''
handle | handle to the Credential service |
issuer_key | the issuer public key |
issuer_attribute | the issuer attribute |
subject_key | the subject public key |
delegate_count | number of delegates provided |
delegates | subject delegates |
proc | function to call on result |
proc_cls | closure for processor |
Definition at line 497 of file abd_api.c.
References GNUNET_ABD_Request::abd_handle, VerifyMessage::d_count, direction, GNUNET_ABD_Request::env, GNUNET_ABD_delegates_get_size(), GNUNET_ABD_delegates_serialize(), GNUNET_break, GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_MAX_MESSAGE_SIZE, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_ABD_VERIFY, GNUNET_MQ_msg_extra, GNUNET_MQ_send_copy(), GNUNET_new, handle, VerifyMessage::id, GNUNET_ABD_Request::int_proc, VerifyMessage::issuer_attribute_len, VerifyMessage::issuer_key, issuer_key, LOG, GNUNET_VPN_Handle::mq, GNUNET_ABD_Request::proc2_cls, GNUNET_ABD_Request::proc_cls, GNUNET_ABD_Request::r_id, VerifyMessage::resolution_algo, VerifyMessage::subject_key, and GNUNET_ABD_Request::verify_proc.
Referenced by run().
struct GNUNET_ABD_Request * GNUNET_ABD_collect | ( | struct GNUNET_ABD_Handle * | handle, |
const struct GNUNET_CRYPTO_PublicKey * | issuer_key, | ||
const char * | issuer_attribute, | ||
const struct GNUNET_CRYPTO_PrivateKey * | subject_key, | ||
enum GNUNET_ABD_AlgoDirectionFlags | direction, | ||
GNUNET_ABD_CredentialResultProcessor | proc, | ||
void * | proc_cls, | ||
GNUNET_ABD_IntermediateResultProcessor | proc2, | ||
void * | proc2_cls | ||
) |
Performs attribute collection.
Collects all abds of subject to fulfill the attribute, if possible
handle | handle to the Credential service |
issuer_key | the issuer public key |
issuer_attribute | the issuer attribute |
subject_key | the subject public key |
proc | function to call on result |
proc_cls | closure for processor |
Definition at line 423 of file abd_api.c.
References GNUNET_ABD_Request::abd_handle, direction, GNUNET_ABD_Request::env, GNUNET_break, GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_MAX_MESSAGE_SIZE, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_ABD_COLLECT, GNUNET_MQ_msg_extra, GNUNET_MQ_send_copy(), GNUNET_new, handle, CollectMessage::id, GNUNET_ABD_Request::int_proc, CollectMessage::issuer_attribute_len, CollectMessage::issuer_key, issuer_key, LOG, GNUNET_VPN_Handle::mq, GNUNET_ABD_Request::proc2_cls, GNUNET_ABD_Request::proc_cls, GNUNET_ABD_Request::r_id, CollectMessage::resolution_algo, CollectMessage::subject_key, and GNUNET_ABD_Request::verify_proc.
Referenced by identity_cb().
struct GNUNET_ABD_Request * GNUNET_ABD_add_delegation | ( | struct GNUNET_ABD_Handle * | handle, |
struct GNUNET_IDENTITY_Ego * | issuer, | ||
const char * | attribute, | ||
struct GNUNET_CRYPTO_PublicKey * | subject, | ||
const char * | delegated_attribute, | ||
GNUNET_ABD_DelegateResultProcessor | proc, | ||
void * | proc_cls | ||
) |
Delegate an attribute.
handle | handle to the Credential service |
issuer | the ego that should be used to delegate the attribute |
attribute | the name of the attribute to delegate |
subject | the subject of the delegation |
delegated_attribute | the name of the attribute that is delegated to |
proc | the result callback |
proc_cls | the result closure context |
struct GNUNET_ABD_Request * GNUNET_ABD_remove_delegation | ( | struct GNUNET_ABD_Handle * | handle, |
struct GNUNET_IDENTITY_Ego * | issuer, | ||
const char * | attribute, | ||
GNUNET_ABD_RemoveDelegateResultProcessor | proc, | ||
void * | proc_cls | ||
) |
Remove a delegation.
handle | handle to the Credential service |
issuer | the ego that was used to delegate the attribute |
attribute | the name of the attribute that is delegated |
proc | the callback |
proc_cls | callback closure |
struct GNUNET_ABD_Delegate * GNUNET_ABD_delegate_issue | ( | const struct GNUNET_CRYPTO_PrivateKey * | issuer, |
struct GNUNET_CRYPTO_PublicKey * | subject, | ||
const char * | iss_attr, | ||
const char * | sub_attr, | ||
struct GNUNET_TIME_Absolute * | expiration | ||
) |
Issue an attribute to a subject.
issuer | the ego that should be used to issue the attribute |
subject | the subject of the attribute |
iss_attr | the name of the attribute |
expiration | the TTL of the credential |
Definition at line 197 of file delegate_misc.c.
References del, expiration, GNUNET_ABD_Delegate::expiration, GNUNET_CRYPTO_key_get_public(), GNUNET_CRYPTO_sign_(), GNUNET_free, GNUNET_htonll(), GNUNET_malloc, GNUNET_memcpy, GNUNET_SIGNATURE_PURPOSE_DELEGATE, GNUNET_ABD_Delegate::issuer_attribute, GNUNET_ABD_Delegate::issuer_attribute_len, GNUNET_ABD_Delegate::issuer_key, GNUNET_ABD_Delegate::signature, size, subject, GNUNET_ABD_Delegate::subject_attribute, GNUNET_ABD_Delegate::subject_attribute_len, and GNUNET_ABD_Delegate::subject_key.
Referenced by sign_cb().
void GNUNET_ABD_request_cancel | ( | struct GNUNET_ABD_Request * | lr | ) |
Cancel pending lookup request.
lr | the lookup request to cancel |
Cancel pending lookup request.
lr | the verify request to cancel |
Definition at line 399 of file abd_api.c.
References GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_MQ_discard(), handle, and lr.
Referenced by do_shutdown().