Data Structures | |
struct | GNUNET_RECLAIM_Identifier |
A reclaim identifier FIXME maybe put this in a different namespace. More... | |
struct | GNUNET_RECLAIM_Attribute |
An attribute. More... | |
struct | GNUNET_RECLAIM_Credential |
A credential. More... | |
struct | GNUNET_RECLAIM_Presentation |
A credential presentation. More... | |
struct | GNUNET_RECLAIM_AttributeList |
A list of GNUNET_RECLAIM_Attribute structures. More... | |
struct | GNUNET_RECLAIM_AttributeListEntry |
struct | GNUNET_RECLAIM_CredentialList |
A list of GNUNET_RECLAIM_Credential structures. More... | |
struct | GNUNET_RECLAIM_CredentialListEntry |
struct | GNUNET_RECLAIM_PresentationList |
A list of GNUNET_RECLAIM_Presentation structures. More... | |
struct | GNUNET_RECLAIM_PresentationListEntry |
Macros | |
#define | GNUNET_RECLAIM_ID_LENGTH (256 / 8) |
We want an ID to be a 256-bit symmetric key. More... | |
#define | GNUNET_RECLAIM_id_is_equal(a, b) |
#define | GNUNET_RECLAIM_id_is_zero(a) |
#define | GNUNET_RECLAIM_id_generate(id) |
Enumerations | |
enum | GNUNET_RECLAIM_AttributeType { GNUNET_RECLAIM_ATTRIBUTE_TYPE_NONE = 0 , GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING = 1 } |
enum | GNUNET_RECLAIM_CredentialType { GNUNET_RECLAIM_CREDENTIAL_TYPE_NONE = 0 , GNUNET_RECLAIM_CREDENTIAL_TYPE_JWT = 1 , GNUNET_RECLAIM_CREDENTIAL_TYPE_PABC = 2 } |
Variables | |
static const struct GNUNET_RECLAIM_Identifier | GNUNET_RECLAIM_ID_ZERO |
#define GNUNET_RECLAIM_ID_LENGTH (256 / 8) |
We want an ID to be a 256-bit symmetric key.
Definition at line 78 of file gnunet_reclaim_lib.h.
#define GNUNET_RECLAIM_id_is_equal | ( | a, | |
b | |||
) |
Definition at line 94 of file gnunet_reclaim_lib.h.
#define GNUNET_RECLAIM_id_is_zero | ( | a | ) |
Definition at line 102 of file gnunet_reclaim_lib.h.
#define GNUNET_RECLAIM_id_generate | ( | id | ) |
Definition at line 106 of file gnunet_reclaim_lib.h.
Enumerator | |
---|---|
GNUNET_RECLAIM_ATTRIBUTE_TYPE_NONE | No value attribute. |
GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING | String attribute. |
Definition at line 46 of file gnunet_reclaim_lib.h.
Enumerator | |
---|---|
GNUNET_RECLAIM_CREDENTIAL_TYPE_NONE | No value credential. |
GNUNET_RECLAIM_CREDENTIAL_TYPE_JWT | A JSON Web Token credential. |
GNUNET_RECLAIM_CREDENTIAL_TYPE_PABC | libpabc credential |
Definition at line 58 of file gnunet_reclaim_lib.h.
struct GNUNET_RECLAIM_Attribute * GNUNET_RECLAIM_attribute_new | ( | const char * | attr_name, |
const struct GNUNET_RECLAIM_Identifier * | credential, | ||
uint32_t | type, | ||
const void * | data, | ||
size_t | data_size | ||
) |
Create a new attribute claim.
attr_name | the attribute name |
credential | ID of the credential (may be NULL) |
type | the attribute type |
data | the attribute value. Must be attr_name if credential not NULL |
data_size | the attribute value size |
Definition at line 247 of file reclaim_attribute.c.
References attr_name, credential, GNUNET_RECLAIM_Attribute::credential, data, GNUNET_RECLAIM_Attribute::data, data_size, GNUNET_RECLAIM_Attribute::data_size, GNUNET_RECLAIM_Attribute::flag, GNUNET_free, GNUNET_malloc, GNUNET_memcpy, GNUNET_strdup, GNUNET_STRINGS_utf8_tolower(), GNUNET_RECLAIM_Attribute::name, type, and GNUNET_RECLAIM_Attribute::type.
Referenced by attribute_list_merge(), consume_ticket(), GNUNET_RECLAIM_attribute_list_add(), GNUNET_RECLAIM_attribute_list_dup(), iter_cb(), iter_finished(), oidc_attr_collect(), and parse_attr().
size_t GNUNET_RECLAIM_attribute_list_serialize_get_size | ( | const struct GNUNET_RECLAIM_AttributeList * | al | ) |
Get required size for serialization buffer.
attrs | the attribute list to serialize |
Definition at line 306 of file reclaim_attribute.c.
References GNUNET_RECLAIM_AttributeListEntry::attribute, GNUNET_assert, GNUNET_RECLAIM_attribute_serialize_get_size(), GNUNET_RECLAIM_AttributeList::list_head, and GNUNET_RECLAIM_AttributeListEntry::next.
Referenced by consume_result_cb(), GNUNET_RECLAIM_ticket_issue(), and OIDC_build_authz_code().
void GNUNET_RECLAIM_attribute_list_destroy | ( | struct GNUNET_RECLAIM_AttributeList * | attrs | ) |
Destroy claim list.
attrs | list to destroy |
Definition at line 418 of file reclaim_attribute.c.
References GNUNET_RECLAIM_AttributeListEntry::attribute, GNUNET_free, GNUNET_RECLAIM_AttributeList::list_head, and GNUNET_RECLAIM_AttributeListEntry::next.
Referenced by cleanup_adh(), cleanup_cth(), cleanup_handle(), consume_fail(), cred_collect(), cred_iter_cb(), do_cleanup(), handle_consume_ticket_result(), handle_issue_ticket_message(), oidc_cred_collect_finished_cb(), and token_endpoint().
void GNUNET_RECLAIM_attribute_list_add | ( | struct GNUNET_RECLAIM_AttributeList * | attrs, |
const char * | attr_name, | ||
const struct GNUNET_RECLAIM_Identifier * | credential, | ||
uint32_t | type, | ||
const void * | data, | ||
size_t | data_size | ||
) |
Add a new attribute to a claim list.
attrs | the attribute list to add to |
attr_name | the name of the new attribute claim |
credential | credential ID (may be NULL) |
type | the type of the claim |
data | claim payload |
data_size | claim payload size |
Definition at line 279 of file reclaim_attribute.c.
References attr_name, GNUNET_RECLAIM_AttributeListEntry::attribute, credential, data, data_size, GNUNET_CONTAINER_DLL_insert, GNUNET_new, GNUNET_RECLAIM_attribute_new(), GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_AttributeList::list_tail, and type.
Referenced by inspect_attrs(), and jwt_parse_attributes().
size_t GNUNET_RECLAIM_attribute_list_serialize | ( | const struct GNUNET_RECLAIM_AttributeList * | attrs, |
char * | result | ||
) |
Serialize an attribute list.
attrs | the attribute list to serialize |
result | the serialized attribute |
Definition at line 322 of file reclaim_attribute.c.
References GNUNET_RECLAIM_AttributeListEntry::attribute, GNUNET_assert, GNUNET_RECLAIM_attribute_serialize(), GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_AttributeListEntry::next, and result.
Referenced by consume_result_cb(), GNUNET_RECLAIM_ticket_issue(), and OIDC_build_authz_code().
struct GNUNET_RECLAIM_AttributeList * GNUNET_RECLAIM_attribute_list_deserialize | ( | const char * | data, |
size_t | data_size | ||
) |
Deserialize an attribute list.
data | the serialized attribute list |
data_size | the length of the serialized data |
Definition at line 351 of file reclaim_attribute.c.
References GNUNET_RECLAIM_AttributeListEntry::attribute, data, data_size, GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_log, GNUNET_new, GNUNET_RECLAIM_attribute_deserialize(), GNUNET_RECLAIM_AttributeList::list_head, and GNUNET_RECLAIM_AttributeList::list_tail.
Referenced by handle_consume_ticket_result(), handle_issue_ticket_message(), and OIDC_parse_authz_code().
size_t GNUNET_RECLAIM_attribute_serialize_get_size | ( | const struct GNUNET_RECLAIM_Attribute * | attr | ) |
Get required size for serialization buffer.
attr | the attribute to serialize |
Definition at line 443 of file reclaim_attribute.c.
References data_size, and name.
Referenced by attr_store_task(), GNUNET_RECLAIM_attribute_delete(), GNUNET_RECLAIM_attribute_list_serialize_get_size(), GNUNET_RECLAIM_attribute_store(), and rvk_move_attr_cb().
size_t GNUNET_RECLAIM_attribute_serialize | ( | const struct GNUNET_RECLAIM_Attribute * | attr, |
char * | result | ||
) |
Serialize an attribute.
attr | the attribute to serialize |
result | the serialized attribute |
Definition at line 458 of file reclaim_attribute.c.
References Attribute::attribute_flag, Attribute::attribute_id, Attribute::attribute_type, GNUNET_RECLAIM_Attribute::credential, Attribute::credential_id, GNUNET_RECLAIM_Attribute::data, data_size, GNUNET_RECLAIM_Attribute::data_size, Attribute::data_size, GNUNET_RECLAIM_Attribute::flag, GNUNET_memcpy, GNUNET_RECLAIM_Attribute::id, name, GNUNET_RECLAIM_Attribute::name, Attribute::name_len, result, and GNUNET_RECLAIM_Attribute::type.
Referenced by attr_store_task(), GNUNET_RECLAIM_attribute_delete(), GNUNET_RECLAIM_attribute_list_serialize(), GNUNET_RECLAIM_attribute_store(), and rvk_move_attr_cb().
ssize_t GNUNET_RECLAIM_attribute_deserialize | ( | const char * | data, |
size_t | data_size, | ||
struct GNUNET_RECLAIM_Attribute ** | attr | ||
) |
Deserialize an attribute.
data | the serialized attribute |
data_size | the length of the serialized data |
attr | deserialized attribute. Will be allocated. Must be free'd |
data | the serialized attribute |
data_size | the length of the serialized data |
Definition at line 497 of file reclaim_attribute.c.
References Attribute::attribute_flag, Attribute::attribute_id, Attribute::attribute_type, GNUNET_RECLAIM_Attribute::credential, Attribute::credential_id, data, GNUNET_RECLAIM_Attribute::data, data_size, GNUNET_RECLAIM_Attribute::data_size, Attribute::data_size, GNUNET_RECLAIM_Attribute::flag, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_malloc, GNUNET_memcpy, GNUNET_RECLAIM_Attribute::id, GNUNET_RECLAIM_Attribute::name, Attribute::name_len, and GNUNET_RECLAIM_Attribute::type.
Referenced by consistency_iter(), GNUNET_RECLAIM_attribute_list_deserialize(), handle_attribute_delete_message(), handle_attribute_result(), handle_attribute_store_message(), process_parallel_lookup_result(), and rvk_move_attr_cb().
struct GNUNET_RECLAIM_AttributeList * GNUNET_RECLAIM_attribute_list_dup | ( | const struct GNUNET_RECLAIM_AttributeList * | attrs | ) |
Make a (deep) copy of a claim list.
attrs | claim list to copy |
Definition at line 386 of file reclaim_attribute.c.
References GNUNET_RECLAIM_AttributeListEntry::attribute, GNUNET_RECLAIM_Attribute::credential, GNUNET_RECLAIM_Attribute::data, GNUNET_RECLAIM_Attribute::data_size, GNUNET_RECLAIM_Attribute::flag, GNUNET_assert, GNUNET_CONTAINER_DLL_insert, GNUNET_new, GNUNET_RECLAIM_attribute_new(), GNUNET_RECLAIM_Attribute::id, GNUNET_RECLAIM_AttributeList::list_head, GNUNET_RECLAIM_Attribute::name, GNUNET_RECLAIM_AttributeListEntry::next, result, and GNUNET_RECLAIM_Attribute::type.
Referenced by RECLAIM_TICKETS_issue().
uint32_t GNUNET_RECLAIM_attribute_typename_to_number | ( | const char * | typename | ) |
Convert a type name to the corresponding number.
typename | name to convert |
Definition at line 138 of file reclaim_attribute.c.
References attr_plugins, GNUNET_TESTING_PluginFunctions::cls, init(), num_plugins, plugin, and ret.
Referenced by iter_finished(), and parse_attr().
int GNUNET_RECLAIM_attribute_string_to_value | ( | uint32_t | type, |
const char * | s, | ||
void ** | data, | ||
size_t * | data_size | ||
) |
Convert human-readable version of a 'claim' of an attribute to the binary representation.
type | type of the claim |
s | human-readable string |
data | set to value in binary encoding (will be allocated) |
data_size | set to number of bytes in data |
Definition at line 192 of file reclaim_attribute.c.
References attr_plugins, GNUNET_TESTING_PluginFunctions::cls, data, data_size, GNUNET_OK, GNUNET_SYSERR, init(), num_plugins, plugin, and type.
Referenced by iter_finished(), and parse_attr().
char * GNUNET_RECLAIM_attribute_value_to_string | ( | uint32_t | type, |
const void * | data, | ||
size_t | data_size | ||
) |
Convert the 'claim' of an attribute to a string.
type | the type of attribute |
data | claim in binary encoding |
data_size | number of bytes in data |
Definition at line 224 of file reclaim_attribute.c.
References attr_plugins, GNUNET_TESTING_PluginFunctions::cls, data, data_size, init(), num_plugins, plugin, ret, and type.
Referenced by attr_collect(), consume_cont(), cred_collect(), cred_iter_cb(), generate_userinfo_json(), iter_cb(), and process_attrs().
const char * GNUNET_RECLAIM_attribute_number_to_typename | ( | uint32_t | type | ) |
Convert a type number to the corresponding type string.
type | number of a type |
Definition at line 163 of file reclaim_attribute.c.
References attr_plugins, GNUNET_TESTING_PluginFunctions::cls, init(), num_plugins, plugin, ret, and type.
Referenced by attr_collect(), cred_collect(), iter_cb(), and process_attrs().
size_t GNUNET_RECLAIM_credential_list_serialize_get_size | ( | const struct GNUNET_RECLAIM_CredentialList * | credentials | ) |
Get required size for serialization buffer.
credentials | the attribute list to serialize |
attrs | the attribute list to serialize |
Definition at line 281 of file reclaim_credential.c.
References GNUNET_RECLAIM_CredentialListEntry::credential, GNUNET_assert, GNUNET_RECLAIM_credential_serialize_get_size(), GNUNET_RECLAIM_CredentialList::list_head, and GNUNET_RECLAIM_CredentialListEntry::next.
void GNUNET_RECLAIM_credential_list_destroy | ( | struct GNUNET_RECLAIM_CredentialList * | credentials | ) |
Destroy credential list.
credentials | list to destroy |
Definition at line 384 of file reclaim_credential.c.
References GNUNET_RECLAIM_CredentialListEntry::credential, GNUNET_free, GNUNET_RECLAIM_CredentialList::list_head, and GNUNET_RECLAIM_CredentialListEntry::next.
Referenced by cleanup_adh(), and cleanup_handle().
void GNUNET_RECLAIM_credential_list_add | ( | struct GNUNET_RECLAIM_CredentialList * | attrs, |
const char * | att_name, | ||
uint32_t | type, | ||
const void * | data, | ||
size_t | data_size | ||
) |
Add a new attribute to a claim list.
attr_name | the name of the new attribute claim |
type | the type of the claim |
data | claim payload |
data_size | claim payload size |
size_t GNUNET_RECLAIM_credential_list_serialize | ( | const struct GNUNET_RECLAIM_CredentialList * | credentials, |
char * | result | ||
) |
Serialize a credential list.
credentials | the credential list to serialize |
result | the serialized credential |
Definition at line 298 of file reclaim_credential.c.
References GNUNET_RECLAIM_CredentialListEntry::credential, GNUNET_assert, GNUNET_RECLAIM_credential_serialize(), GNUNET_RECLAIM_CredentialList::list_head, GNUNET_RECLAIM_CredentialListEntry::next, and result.
struct GNUNET_RECLAIM_CredentialList * GNUNET_RECLAIM_credential_list_deserialize | ( | const char * | data, |
size_t | data_size | ||
) |
Deserialize an attribute list.
data | the serialized attribute list |
data_size | the length of the serialized data |
Definition at line 320 of file reclaim_credential.c.
References GNUNET_RECLAIM_CredentialListEntry::credential, data, data_size, GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_log, GNUNET_new, GNUNET_RECLAIM_credential_deserialize(), GNUNET_RECLAIM_credential_serialize_get_size(), GNUNET_RECLAIM_CredentialList::list_head, and GNUNET_RECLAIM_CredentialList::list_tail.
size_t GNUNET_RECLAIM_credential_serialize_get_size | ( | const struct GNUNET_RECLAIM_Credential * | credential | ) |
Get required size for serialization buffer.
credential | the credential to serialize |
attr | the credential to serialize |
Definition at line 409 of file reclaim_credential.c.
References credential, data_size, and name.
Referenced by cred_add_cb(), GNUNET_RECLAIM_credential_delete(), GNUNET_RECLAIM_credential_list_deserialize(), GNUNET_RECLAIM_credential_list_serialize_get_size(), GNUNET_RECLAIM_credential_store(), and rvk_move_attr_cb().
size_t GNUNET_RECLAIM_credential_serialize | ( | const struct GNUNET_RECLAIM_Credential * | credential, |
char * | result | ||
) |
Serialize an credential.
credential | the credential to serialize |
result | the serialized credential |
Definition at line 418 of file reclaim_credential.c.
References credential, Credential::credential_flag, Credential::credential_id, Credential::credential_type, data_size, Credential::data_size, GNUNET_memcpy, GNUNET_RECLAIM_Identifier::id, name, Credential::name_len, and result.
Referenced by cred_add_cb(), GNUNET_RECLAIM_credential_delete(), GNUNET_RECLAIM_credential_list_serialize(), GNUNET_RECLAIM_credential_store(), and rvk_move_attr_cb().
struct GNUNET_RECLAIM_Credential * GNUNET_RECLAIM_credential_deserialize | ( | const char * | data, |
size_t | data_size | ||
) |
Deserialize an credential.
data | the serialized credential |
data_size | the length of the serialized data |
Definition at line 457 of file reclaim_credential.c.
References credential, Credential::credential_flag, Credential::credential_id, Credential::credential_type, data, data_size, Credential::data_size, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_malloc, GNUNET_memcpy, GNUNET_RECLAIM_Identifier::id, and Credential::name_len.
Referenced by consistency_iter(), filter_tickets_cb(), GNUNET_RECLAIM_credential_list_deserialize(), handle_credential_delete_message(), handle_credential_result(), handle_credential_store_message(), and rvk_move_attr_cb().
struct GNUNET_RECLAIM_Credential * GNUNET_RECLAIM_credential_new | ( | const char * | name, |
uint32_t | type, | ||
const void * | data, | ||
size_t | data_size | ||
) |
Create a new credential.
name | the credential name |
type | the credential type |
data | the credential value |
data_size | the credential value size |
Definition at line 247 of file reclaim_credential.c.
References attr_name, data, GNUNET_RECLAIM_Credential::data, data_size, GNUNET_RECLAIM_Credential::data_size, GNUNET_RECLAIM_Credential::flag, GNUNET_free, GNUNET_malloc, GNUNET_memcpy, GNUNET_strdup, GNUNET_STRINGS_utf8_tolower(), GNUNET_RECLAIM_Credential::name, type, and GNUNET_RECLAIM_Credential::type.
Referenced by cred_iter_finished(), GNUNET_RECLAIM_credential_list_dup(), oidc_cred_collect(), and parse_credential().
char * GNUNET_RECLAIM_credential_value_to_string | ( | uint32_t | type, |
const void * | data, | ||
size_t | data_size | ||
) |
Convert the 'claim' of an credential to a string.
type | the type of credential |
data | claim in binary encoding |
data_size | number of bytes in data |
Definition at line 224 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, data, data_size, init(), num_plugins, plugin, ret, and type.
Referenced by cred_collect(), and cred_iter_cb().
int GNUNET_RECLAIM_credential_string_to_value | ( | uint32_t | type, |
const char * | s, | ||
void ** | data, | ||
size_t * | data_size | ||
) |
Convert human-readable version of a 'claim' of an credential to the binary representation.
type | type of the claim |
s | human-readable string |
data | set to value in binary encoding (will be allocated) |
data_size | set to number of bytes in data |
Definition at line 192 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, data, data_size, GNUNET_OK, GNUNET_SYSERR, init(), num_plugins, plugin, and type.
Referenced by parse_credential().
const char * GNUNET_RECLAIM_credential_number_to_typename | ( | uint32_t | type | ) |
Convert an credential type number to the corresponding credential type string.
type | number of a type |
Definition at line 163 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, init(), num_plugins, plugin, ret, and type.
Referenced by cred_collect(), and cred_iter_cb().
uint32_t GNUNET_RECLAIM_credential_typename_to_number | ( | const char * | typename | ) |
Convert an credential type name to the corresponding number.
typename | name to convert |
Definition at line 138 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, init(), num_plugins, plugin, and ret.
Referenced by cred_iter_finished(), and parse_credential().
struct GNUNET_RECLAIM_AttributeList * GNUNET_RECLAIM_credential_get_attributes | ( | const struct GNUNET_RECLAIM_Credential * | cred | ) |
Convert an credential type name to the corresponding number.
typename | name to convert |
Definition at line 498 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential, credential_plugins, init(), num_plugins, plugin, and ret.
Referenced by cred_collect(), and cred_iter_cb().
char * GNUNET_RECLAIM_credential_get_issuer | ( | const struct GNUNET_RECLAIM_Credential * | cred | ) |
Definition at line 518 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential, credential_plugins, init(), num_plugins, plugin, and ret.
Referenced by cred_collect().
int GNUNET_RECLAIM_credential_get_expiration | ( | const struct GNUNET_RECLAIM_Credential * | cred, |
struct GNUNET_TIME_Absolute * | exp | ||
) |
Definition at line 538 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential, credential_plugins, GNUNET_OK, GNUNET_SYSERR, init(), num_plugins, and plugin.
Referenced by cred_collect().
size_t GNUNET_RECLAIM_presentation_list_serialize_get_size | ( | const struct GNUNET_RECLAIM_PresentationList * | presentations | ) |
Get required size for serialization buffer.
presentations | the presentation list to serialize |
attrs | the attribute list to serialize |
Definition at line 687 of file reclaim_credential.c.
References GNUNET_assert, GNUNET_RECLAIM_presentation_serialize_get_size(), GNUNET_RECLAIM_PresentationList::list_head, GNUNET_RECLAIM_PresentationListEntry::next, and GNUNET_RECLAIM_PresentationListEntry::presentation.
Referenced by consume_result_cb(), OIDC_build_authz_code(), and send_ticket_result().
void GNUNET_RECLAIM_presentation_list_destroy | ( | struct GNUNET_RECLAIM_PresentationList * | presentations | ) |
Destroy presentations list.
presentations | list to destroy |
Definition at line 795 of file reclaim_credential.c.
References GNUNET_free, GNUNET_RECLAIM_PresentationList::list_head, GNUNET_RECLAIM_PresentationListEntry::next, and GNUNET_RECLAIM_PresentationListEntry::presentation.
Referenced by cleanup_cth(), cleanup_handle(), consume_fail(), filter_tickets_cb(), handle_consume_ticket_result(), handle_ticket_result(), and token_endpoint().
size_t GNUNET_RECLAIM_presentation_list_serialize | ( | const struct GNUNET_RECLAIM_PresentationList * | presentations, |
char * | result | ||
) |
Serialize a presentation list.
presentations | the attribute list to serialize |
result | the serialized list |
Definition at line 703 of file reclaim_credential.c.
References GNUNET_assert, GNUNET_RECLAIM_presentation_serialize(), GNUNET_RECLAIM_PresentationList::list_head, GNUNET_RECLAIM_PresentationListEntry::next, GNUNET_RECLAIM_PresentationListEntry::presentation, and result.
Referenced by consume_result_cb(), OIDC_build_authz_code(), and send_ticket_result().
struct GNUNET_RECLAIM_PresentationList * GNUNET_RECLAIM_presentation_list_deserialize | ( | const char * | data, |
size_t | data_size | ||
) |
Deserialize a presentation list.
data | the serialized list |
data_size | the length of the serialized data |
Deserialize a presentation list.
data | the serialized attribute list |
data_size | the length of the serialized data |
Definition at line 732 of file reclaim_credential.c.
References data, data_size, GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_log, GNUNET_new, GNUNET_RECLAIM_presentation_deserialize(), GNUNET_RECLAIM_presentation_serialize_get_size(), GNUNET_RECLAIM_PresentationList::list_head, GNUNET_RECLAIM_PresentationList::list_tail, and GNUNET_RECLAIM_PresentationListEntry::presentation.
Referenced by handle_consume_ticket_result(), handle_ticket_result(), and OIDC_parse_authz_code().
size_t GNUNET_RECLAIM_presentation_serialize_get_size | ( | const struct GNUNET_RECLAIM_Presentation * | presentation | ) |
Get required size for serialization buffer.
presentation | the presentation to serialize |
attr | the presentation to serialize |
Definition at line 820 of file reclaim_credential.c.
References data_size.
Referenced by GNUNET_RECLAIM_presentation_list_deserialize(), GNUNET_RECLAIM_presentation_list_serialize_get_size(), and issue_ticket().
size_t GNUNET_RECLAIM_presentation_serialize | ( | const struct GNUNET_RECLAIM_Presentation * | presentation, |
char * | result | ||
) |
Serialize a presentation.
presentation | the presentation to serialize |
result | the serialized presentation |
Definition at line 828 of file reclaim_credential.c.
References GNUNET_RECLAIM_Presentation::credential_id, Presentation::credential_id, GNUNET_RECLAIM_Presentation::data, data_size, GNUNET_RECLAIM_Presentation::data_size, Presentation::data_size, GNUNET_memcpy, Presentation::presentation_type, result, and GNUNET_RECLAIM_Presentation::type.
Referenced by GNUNET_RECLAIM_presentation_list_serialize(), and issue_ticket().
struct GNUNET_RECLAIM_Presentation * GNUNET_RECLAIM_presentation_deserialize | ( | const char * | data, |
size_t | data_size | ||
) |
Deserialize a presentation.
data | the serialized presentation |
data_size | the length of the serialized data |
Deserialize a presentation.
data | the serialized presentation |
data_size | the length of the serialized data |
Definition at line 855 of file reclaim_credential.c.
References GNUNET_RECLAIM_Presentation::credential_id, Presentation::credential_id, data, GNUNET_RECLAIM_Presentation::data, data_size, GNUNET_RECLAIM_Presentation::data_size, Presentation::data_size, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_malloc, GNUNET_memcpy, Presentation::presentation_type, and GNUNET_RECLAIM_Presentation::type.
Referenced by filter_tickets_cb(), GNUNET_RECLAIM_presentation_list_deserialize(), issue_ticket(), lookup_authz_cb(), and update_tickets().
char * GNUNET_RECLAIM_presentation_value_to_string | ( | uint32_t | type, |
const void * | data, | ||
size_t | data_size | ||
) |
Convert the 'claim' of a presentation to a string.
type | the type of presentation |
data | presentation in binary encoding |
data_size | number of bytes in data |
Convert the 'claim' of a presentation to a string.
type | the type of presentation |
data | claim in binary encoding |
data_size | number of bytes in data |
Definition at line 639 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, data, data_size, init(), num_plugins, plugin, ret, and type.
Referenced by generate_userinfo_json().
struct GNUNET_RECLAIM_Presentation * GNUNET_RECLAIM_presentation_new | ( | uint32_t | type, |
const void * | data, | ||
size_t | data_size | ||
) |
Definition at line 662 of file reclaim_credential.c.
References data, GNUNET_RECLAIM_Presentation::data, data_size, GNUNET_RECLAIM_Presentation::data_size, GNUNET_malloc, GNUNET_memcpy, type, and GNUNET_RECLAIM_Presentation::type.
Referenced by consume_ticket(), GNUNET_RECLAIM_presentation_list_dup(), jwt_create_presentation(), and pabc_create_presentation().
int GNUNET_RECLAIM_presentation_string_to_value | ( | uint32_t | type, |
const char * | s, | ||
void ** | data, | ||
size_t * | data_size | ||
) |
Convert human-readable version of a 'claim' of a presentation to the binary representation.
type | type of the presentation |
s | human-readable string |
data | set to value in binary encoding (will be allocated) |
data_size | set to number of bytes in data |
Convert human-readable version of a 'claim' of a presentation to the binary representation.
type | type of the claim |
s | human-readable string |
data | set to value in binary encoding (will be allocated) |
data_size | set to number of bytes in data |
Definition at line 607 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, data, data_size, GNUNET_OK, GNUNET_SYSERR, init(), num_plugins, plugin, and type.
const char * GNUNET_RECLAIM_presentation_number_to_typename | ( | uint32_t | type | ) |
Convert a presentation type number to the corresponding credential type string.
type | number of a type |
Definition at line 578 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, init(), num_plugins, plugin, ret, and type.
Referenced by generate_userinfo_json().
uint32_t GNUNET_RECLAIM_presentation_typename_to_number | ( | const char * | typename | ) |
Convert an presentation type name to the corresponding number.
typename | name to convert |
Definition at line 559 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, init(), num_plugins, plugin, and ret.
struct GNUNET_RECLAIM_AttributeList * GNUNET_RECLAIM_presentation_get_attributes | ( | const struct GNUNET_RECLAIM_Presentation * | cred | ) |
Definition at line 887 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, init(), num_plugins, plugin, and ret.
Referenced by process_attrs().
char * GNUNET_RECLAIM_presentation_get_issuer | ( | const struct GNUNET_RECLAIM_Presentation * | cred | ) |
Definition at line 908 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, init(), num_plugins, plugin, and ret.
int GNUNET_RECLAIM_presentation_get_expiration | ( | const struct GNUNET_RECLAIM_Presentation * | cred, |
struct GNUNET_TIME_Absolute * | exp | ||
) |
Definition at line 929 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, credential_plugins, GNUNET_OK, GNUNET_SYSERR, init(), num_plugins, and plugin.
struct GNUNET_RECLAIM_PresentationList * GNUNET_RECLAIM_presentation_list_dup | ( | const struct GNUNET_RECLAIM_PresentationList * | al | ) |
Make a (deep) copy of the presentation list.
attrs | claim list to copy |
Definition at line 769 of file reclaim_credential.c.
References GNUNET_RECLAIM_Presentation::credential_id, GNUNET_RECLAIM_Presentation::data, GNUNET_RECLAIM_Presentation::data_size, GNUNET_assert, GNUNET_CONTAINER_DLL_insert, GNUNET_new, GNUNET_RECLAIM_presentation_new(), GNUNET_RECLAIM_PresentationList::list_head, GNUNET_RECLAIM_PresentationListEntry::next, GNUNET_RECLAIM_PresentationListEntry::presentation, result, and GNUNET_RECLAIM_Presentation::type.
int GNUNET_RECLAIM_credential_get_presentation | ( | const struct GNUNET_RECLAIM_Credential * | cred, |
const struct GNUNET_RECLAIM_AttributeList * | attrs, | ||
struct GNUNET_RECLAIM_Presentation ** | presentation | ||
) |
Create a presentation from a credential and a lift of (selected) attributes in the credential.
FIXME not yet implemented
cred | the credential to use |
attrs | the attributes to present from the credential |
presentation | the credential presentation presenting the attributes according to the presentation mechanism of the credential or NULL on error. |
cred | the credential to use |
attrs | the attributes to present from the credential |
Definition at line 961 of file reclaim_credential.c.
References GNUNET_TESTING_PluginFunctions::cls, cred, credential_plugins, GNUNET_OK, GNUNET_SYSERR, init(), num_plugins, and plugin.
Referenced by filter_tickets_cb().
struct GNUNET_RECLAIM_CredentialList * GNUNET_RECLAIM_credential_list_dup | ( | const struct GNUNET_RECLAIM_CredentialList * | al | ) |
Definition at line 357 of file reclaim_credential.c.
References GNUNET_RECLAIM_CredentialListEntry::credential, GNUNET_RECLAIM_Credential::data, GNUNET_RECLAIM_Credential::data_size, GNUNET_assert, GNUNET_CONTAINER_DLL_insert, GNUNET_new, GNUNET_RECLAIM_credential_new(), GNUNET_RECLAIM_Credential::id, GNUNET_RECLAIM_CredentialList::list_head, GNUNET_RECLAIM_Credential::name, GNUNET_RECLAIM_CredentialListEntry::next, result, and GNUNET_RECLAIM_Credential::type.
|
static |
Definition at line 92 of file gnunet_reclaim_lib.h.
Referenced by start_process().