diff options
author | Phil <phil.buschmann@tum.de> | 2018-02-05 13:58:16 +0100 |
---|---|---|
committer | Phil <phil.buschmann@tum.de> | 2018-02-05 13:58:16 +0100 |
commit | ddbd4e85b1128d2547d551b885eef01bfab5046d (patch) | |
tree | 4e68e52c3db665482e2d1dacc6e4f00465aecdb8 /src/identity-attribute | |
parent | 3f5460f210d697748fef7623213ec4799d8917a5 (diff) | |
download | gnunet-ddbd4e85b1128d2547d551b885eef01bfab5046d.tar.gz gnunet-ddbd4e85b1128d2547d551b885eef01bfab5046d.zip |
-changes for using token endpoint & added token endpoint
Diffstat (limited to 'src/identity-attribute')
-rw-r--r-- | src/identity-attribute/identity_attribute.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/identity-attribute/identity_attribute.c b/src/identity-attribute/identity_attribute.c index cf50d058e..0111668fe 100644 --- a/src/identity-attribute/identity_attribute.c +++ b/src/identity-attribute/identity_attribute.c | |||
@@ -240,6 +240,34 @@ GNUNET_IDENTITY_ATTRIBUTE_claim_new (const char* attr_name, | |||
240 | return attr; | 240 | return attr; |
241 | } | 241 | } |
242 | 242 | ||
243 | /** | ||
244 | * Add a new claim list entry. | ||
245 | * | ||
246 | * @param claim_list the attribute name | ||
247 | * @param attr_name the attribute name | ||
248 | * @param type the attribute type | ||
249 | * @param data the attribute value | ||
250 | * @param data_size the attribute value size | ||
251 | * @return | ||
252 | */ | ||
253 | void | ||
254 | GNUNET_IDENTITY_ATTRIBUTE_list_add (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *claim_list, | ||
255 | const char* attr_name, | ||
256 | uint32_t type, | ||
257 | const void* data, | ||
258 | size_t data_size) | ||
259 | { | ||
260 | struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; | ||
261 | le = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry); | ||
262 | le->claim = GNUNET_IDENTITY_ATTRIBUTE_claim_new (attr_name, | ||
263 | type, | ||
264 | data, | ||
265 | data_size); | ||
266 | GNUNET_CONTAINER_DLL_insert (claim_list->list_head, | ||
267 | claim_list->list_tail, | ||
268 | le); | ||
269 | } | ||
270 | |||
243 | size_t | 271 | size_t |
244 | GNUNET_IDENTITY_ATTRIBUTE_list_serialize_get_size (const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) | 272 | GNUNET_IDENTITY_ATTRIBUTE_list_serialize_get_size (const struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *attrs) |
245 | { | 273 | { |