GNUnet 0.21.1
gnunet_reclaim_lib.h File Reference

Identity attribute definitions. More...

#include "gnunet_util_lib.h"
Include dependency graph for gnunet_reclaim_lib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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 }
 

Functions

struct GNUNET_RECLAIM_AttributeGNUNET_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. More...
 
size_t GNUNET_RECLAIM_attribute_list_serialize_get_size (const struct GNUNET_RECLAIM_AttributeList *attrs)
 Get required size for serialization buffer. More...
 
void GNUNET_RECLAIM_attribute_list_destroy (struct GNUNET_RECLAIM_AttributeList *attrs)
 Destroy claim list. More...
 
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. More...
 
size_t GNUNET_RECLAIM_attribute_list_serialize (const struct GNUNET_RECLAIM_AttributeList *attrs, char *result)
 Serialize an attribute list. More...
 
struct GNUNET_RECLAIM_AttributeListGNUNET_RECLAIM_attribute_list_deserialize (const char *data, size_t data_size)
 Deserialize an attribute list. More...
 
size_t GNUNET_RECLAIM_attribute_serialize_get_size (const struct GNUNET_RECLAIM_Attribute *attr)
 Get required size for serialization buffer. More...
 
size_t GNUNET_RECLAIM_attribute_serialize (const struct GNUNET_RECLAIM_Attribute *attr, char *result)
 Serialize an attribute. More...
 
ssize_t GNUNET_RECLAIM_attribute_deserialize (const char *data, size_t data_size, struct GNUNET_RECLAIM_Attribute **attr)
 Deserialize an attribute. More...
 
struct GNUNET_RECLAIM_AttributeListGNUNET_RECLAIM_attribute_list_dup (const struct GNUNET_RECLAIM_AttributeList *attrs)
 Make a (deep) copy of a claim list. More...
 
uint32_t GNUNET_RECLAIM_attribute_typename_to_number (const char *typename)
 Convert a type name to the corresponding number. More...
 
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. More...
 
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. More...
 
const char * GNUNET_RECLAIM_attribute_number_to_typename (uint32_t type)
 Convert a type number to the corresponding type string. More...
 
size_t GNUNET_RECLAIM_credential_list_serialize_get_size (const struct GNUNET_RECLAIM_CredentialList *credentials)
 Get required size for serialization buffer. More...
 
void GNUNET_RECLAIM_credential_list_destroy (struct GNUNET_RECLAIM_CredentialList *credentials)
 Destroy credential list. More...
 
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. More...
 
size_t GNUNET_RECLAIM_credential_list_serialize (const struct GNUNET_RECLAIM_CredentialList *credentials, char *result)
 Serialize a credential list. More...
 
struct GNUNET_RECLAIM_CredentialListGNUNET_RECLAIM_credential_list_deserialize (const char *data, size_t data_size)
 Deserialize an attribute list. More...
 
size_t GNUNET_RECLAIM_credential_serialize_get_size (const struct GNUNET_RECLAIM_Credential *credential)
 Get required size for serialization buffer. More...
 
size_t GNUNET_RECLAIM_credential_serialize (const struct GNUNET_RECLAIM_Credential *credential, char *result)
 Serialize an credential. More...
 
struct GNUNET_RECLAIM_CredentialGNUNET_RECLAIM_credential_deserialize (const char *data, size_t data_size)
 Deserialize an credential. More...
 
struct GNUNET_RECLAIM_CredentialGNUNET_RECLAIM_credential_new (const char *name, uint32_t type, const void *data, size_t data_size)
 Create a new credential. More...
 
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. More...
 
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. More...
 
const char * GNUNET_RECLAIM_credential_number_to_typename (uint32_t type)
 Convert an credential type number to the corresponding credential type string. More...
 
uint32_t GNUNET_RECLAIM_credential_typename_to_number (const char *typename)
 Convert an credential type name to the corresponding number. More...
 
struct GNUNET_RECLAIM_AttributeListGNUNET_RECLAIM_credential_get_attributes (const struct GNUNET_RECLAIM_Credential *cred)
 Convert an credential type name to the corresponding number. More...
 
char * GNUNET_RECLAIM_credential_get_issuer (const struct GNUNET_RECLAIM_Credential *cred)
 
int GNUNET_RECLAIM_credential_get_expiration (const struct GNUNET_RECLAIM_Credential *cred, struct GNUNET_TIME_Absolute *exp)
 
size_t GNUNET_RECLAIM_presentation_list_serialize_get_size (const struct GNUNET_RECLAIM_PresentationList *presentations)
 Get required size for serialization buffer. More...
 
void GNUNET_RECLAIM_presentation_list_destroy (struct GNUNET_RECLAIM_PresentationList *presentations)
 Destroy presentations list. More...
 
size_t GNUNET_RECLAIM_presentation_list_serialize (const struct GNUNET_RECLAIM_PresentationList *presentations, char *result)
 Serialize a presentation list. More...
 
struct GNUNET_RECLAIM_PresentationListGNUNET_RECLAIM_presentation_list_deserialize (const char *data, size_t data_size)
 Deserialize a presentation list. More...
 
size_t GNUNET_RECLAIM_presentation_serialize_get_size (const struct GNUNET_RECLAIM_Presentation *presentation)
 Get required size for serialization buffer. More...
 
size_t GNUNET_RECLAIM_presentation_serialize (const struct GNUNET_RECLAIM_Presentation *presentation, char *result)
 Serialize a presentation. More...
 
struct GNUNET_RECLAIM_PresentationGNUNET_RECLAIM_presentation_deserialize (const char *data, size_t data_size)
 Deserialize a presentation. More...
 
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. More...
 
struct GNUNET_RECLAIM_PresentationGNUNET_RECLAIM_presentation_new (uint32_t type, const void *data, size_t data_size)
 
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. More...
 
const char * GNUNET_RECLAIM_presentation_number_to_typename (uint32_t type)
 Convert a presentation type number to the corresponding credential type string. More...
 
struct GNUNET_RECLAIM_AttributeListGNUNET_RECLAIM_presentation_get_attributes (const struct GNUNET_RECLAIM_Presentation *cred)
 
char * GNUNET_RECLAIM_presentation_get_issuer (const struct GNUNET_RECLAIM_Presentation *cred)
 
int GNUNET_RECLAIM_presentation_get_expiration (const struct GNUNET_RECLAIM_Presentation *cred, struct GNUNET_TIME_Absolute *exp)
 
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. More...
 

Variables

static const struct GNUNET_RECLAIM_Identifier GNUNET_RECLAIM_ID_ZERO
 

Detailed Description

Identity attribute definitions.

Definition in file gnunet_reclaim_lib.h.