aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/reclaim.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim/reclaim.h')
-rw-r--r--src/reclaim/reclaim.h552
1 files changed, 0 insertions, 552 deletions
diff --git a/src/reclaim/reclaim.h b/src/reclaim/reclaim.h
deleted file mode 100644
index aae8ee89a..000000000
--- a/src/reclaim/reclaim.h
+++ /dev/null
@@ -1,552 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2016 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20
21/**
22 * @author Martin Schanzenbach
23 * @file reclaim/reclaim.h
24 *
25 * @brief Common type definitions for the identity provider
26 * service and API.
27 */
28#ifndef RECLAIM_H
29#define RECLAIM_H
30
31#include "gnunet_common.h"
32#include "gnunet_identity_service.h"
33
34GNUNET_NETWORK_STRUCT_BEGIN
35
36
37/**
38 * Use to store an identity attribute
39 */
40struct AttributeStoreMessage
41{
42 /**
43 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT
44 */
45 struct GNUNET_MessageHeader header;
46
47 /**
48 * Unique identifier for this request (for key collisions).
49 */
50 uint32_t id GNUNET_PACKED;
51
52 /**
53 * The length of the attribute
54 */
55 uint32_t attr_len GNUNET_PACKED;
56
57 /**
58 * The expiration interval of the attribute
59 */
60 uint64_t exp GNUNET_PACKED;
61
62 /**
63 * Identity
64 */
65 struct GNUNET_IDENTITY_PrivateKey identity;
66
67 /* followed by the serialized attribute */
68};
69
70
71/**
72 * Use to delete an identity attribute
73 */
74struct AttributeDeleteMessage
75{
76 /**
77 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT
78 */
79 struct GNUNET_MessageHeader header;
80
81 /**
82 * Unique identifier for this request (for key collisions).
83 */
84 uint32_t id GNUNET_PACKED;
85
86 /**
87 * The length of the attribute
88 */
89 uint32_t attr_len GNUNET_PACKED;
90
91 /**
92 * Identity
93 */
94 struct GNUNET_IDENTITY_PrivateKey identity;
95
96 /* followed by the serialized attribute */
97};
98
99
100/**
101 * Attribute store/delete response message
102 */
103struct SuccessResultMessage
104{
105 /**
106 * Message header
107 */
108 struct GNUNET_MessageHeader header;
109
110 /**
111 * Unique identifier for this request (for key collisions).
112 */
113 uint32_t id GNUNET_PACKED;
114
115 /**
116 * #GNUNET_SYSERR on failure, #GNUNET_OK on success
117 */
118 int32_t op_result GNUNET_PACKED;
119};
120
121/**
122 * Attribute is returned from the idp.
123 */
124struct AttributeResultMessage
125{
126 /**
127 * Message header
128 */
129 struct GNUNET_MessageHeader header;
130
131 /**
132 * Unique identifier for this request (for key collisions).
133 */
134 uint32_t id GNUNET_PACKED;
135
136 /**
137 * Length of serialized attribute data
138 */
139 uint16_t attr_len GNUNET_PACKED;
140
141 /**
142 * Length of serialized credential data
143 */
144 uint16_t credential_len GNUNET_PACKED;
145
146 /**
147 * always zero (for alignment)
148 */
149 uint16_t reserved GNUNET_PACKED;
150
151 /**
152 * The public key of the identity.
153 */
154 struct GNUNET_IDENTITY_PublicKey identity;
155
156 /* followed by:
157 * serialized attribute data
158 */
159};
160
161/**
162 * Credential is returned from the idp.
163 */
164struct CredentialResultMessage
165{
166 /**
167 * Message header
168 */
169 struct GNUNET_MessageHeader header;
170
171 /**
172 * Unique identifier for this request (for key collisions).
173 */
174 uint32_t id GNUNET_PACKED;
175
176 /**
177 * Length of serialized attribute data
178 */
179 uint16_t credential_len GNUNET_PACKED;
180
181 /**
182 * always zero (for alignment)
183 */
184 uint16_t reserved GNUNET_PACKED;
185
186 /**
187 * The public key of the identity.
188 */
189 struct GNUNET_IDENTITY_PublicKey identity;
190
191 /* followed by:
192 * serialized credential data
193 */
194};
195
196
197/**
198 * Start a attribute iteration for the given identity
199 */
200struct AttributeIterationStartMessage
201{
202 /**
203 * Message
204 */
205 struct GNUNET_MessageHeader header;
206
207 /**
208 * Unique identifier for this request (for key collisions).
209 */
210 uint32_t id GNUNET_PACKED;
211
212 /**
213 * Identity.
214 */
215 struct GNUNET_IDENTITY_PrivateKey identity;
216};
217
218
219/**
220 * Ask for next result of attribute iteration for the given operation
221 */
222struct AttributeIterationNextMessage
223{
224 /**
225 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT
226 */
227 struct GNUNET_MessageHeader header;
228
229 /**
230 * Unique identifier for this request (for key collisions).
231 */
232 uint32_t id GNUNET_PACKED;
233};
234
235
236/**
237 * Start a credential iteration for the given identity
238 */
239struct CredentialIterationStartMessage
240{
241 /**
242 * Message
243 */
244 struct GNUNET_MessageHeader header;
245
246 /**
247 * Unique identifier for this request (for key collisions).
248 */
249 uint32_t id GNUNET_PACKED;
250
251 /**
252 * Identity.
253 */
254 struct GNUNET_IDENTITY_PrivateKey identity;
255};
256
257
258/**
259 * Ask for next result of credential iteration for the given operation
260 */
261struct CredentialIterationNextMessage
262{
263 /**
264 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT
265 */
266 struct GNUNET_MessageHeader header;
267
268 /**
269 * Unique identifier for this request (for key collisions).
270 */
271 uint32_t id GNUNET_PACKED;
272};
273
274
275/**
276 * Stop credential iteration for the given operation
277 */
278struct CredentialIterationStopMessage
279{
280 /**
281 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP
282 */
283 struct GNUNET_MessageHeader header;
284
285 /**
286 * Unique identifier for this request (for key collisions).
287 */
288 uint32_t id GNUNET_PACKED;
289};
290
291
292/**
293 * Stop attribute iteration for the given operation
294 */
295struct AttributeIterationStopMessage
296{
297 /**
298 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP
299 */
300 struct GNUNET_MessageHeader header;
301
302 /**
303 * Unique identifier for this request (for key collisions).
304 */
305 uint32_t id GNUNET_PACKED;
306};
307
308/**
309 * Start a ticket iteration for the given identity
310 */
311struct TicketIterationStartMessage
312{
313 /**
314 * Message
315 */
316 struct GNUNET_MessageHeader header;
317
318 /**
319 * Unique identifier for this request (for key collisions).
320 */
321 uint32_t id GNUNET_PACKED;
322
323 /**
324 * Identity.
325 */
326 struct GNUNET_IDENTITY_PrivateKey identity;
327};
328
329
330/**
331 * Ask for next result of ticket iteration for the given operation
332 */
333struct TicketIterationNextMessage
334{
335 /**
336 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_NEXT
337 */
338 struct GNUNET_MessageHeader header;
339
340 /**
341 * Unique identifier for this request (for key collisions).
342 */
343 uint32_t id GNUNET_PACKED;
344};
345
346
347/**
348 * Stop ticket iteration for the given operation
349 */
350struct TicketIterationStopMessage
351{
352 /**
353 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_STOP
354 */
355 struct GNUNET_MessageHeader header;
356
357 /**
358 * Unique identifier for this request (for key collisions).
359 */
360 uint32_t id GNUNET_PACKED;
361};
362
363
364/**
365 * Ticket issue message
366 */
367struct IssueTicketMessage
368{
369 /**
370 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ISSUE_TICKET
371 */
372 struct GNUNET_MessageHeader header;
373
374 /**
375 * Unique identifier for this request (for key collisions).
376 */
377 uint32_t id GNUNET_PACKED;
378
379 /**
380 * Identity.
381 */
382 struct GNUNET_IDENTITY_PrivateKey identity;
383
384 /**
385 * Requesting party.
386 */
387 struct GNUNET_IDENTITY_PublicKey rp;
388
389 /**
390 * length of serialized attribute list
391 */
392 uint32_t attr_len GNUNET_PACKED;
393
394 // Followed by a serialized attribute list
395};
396
397/**
398 * Ticket revoke message
399 */
400struct RevokeTicketMessage
401{
402 /**
403 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET
404 */
405 struct GNUNET_MessageHeader header;
406
407 /**
408 * Unique identifier for this request (for key collisions).
409 */
410 uint32_t id GNUNET_PACKED;
411
412 /**
413 * Identity.
414 */
415 struct GNUNET_IDENTITY_PrivateKey identity;
416
417 /**
418 * length of serialized attribute list
419 */
420 uint32_t attrs_len GNUNET_PACKED;
421
422 /**
423 * The ticket to revoke
424 */
425 struct GNUNET_RECLAIM_Ticket ticket;
426};
427
428/**
429 * Ticket revoke message
430 */
431struct RevokeTicketResultMessage
432{
433 /**
434 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT
435 */
436 struct GNUNET_MessageHeader header;
437
438 /**
439 * Unique identifier for this request (for key collisions).
440 */
441 uint32_t id GNUNET_PACKED;
442
443 /**
444 * Revocation result
445 */
446 uint32_t success GNUNET_PACKED;
447};
448
449
450/**
451 * Ticket result message
452 */
453struct TicketResultMessage
454{
455 /**
456 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT
457 */
458 struct GNUNET_MessageHeader header;
459
460 /**
461 * Unique identifier for this request (for key collisions).
462 */
463 uint32_t id GNUNET_PACKED;
464
465 /**
466 * Length of new presentations created
467 */
468 uint32_t presentations_len GNUNET_PACKED;
469
470 /**
471 * The new ticket
472 */
473 struct GNUNET_RECLAIM_Ticket ticket;
474
475 /* Followed by the serialized GNUNET_RECLAIM_PresentationList */
476};
477
478/**
479 * Ticket consume message
480 */
481struct ConsumeTicketMessage
482{
483 /**
484 * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET
485 */
486 struct GNUNET_MessageHeader header;
487
488 /**
489 * Unique identifier for this request (for key collisions).
490 */
491 uint32_t id GNUNET_PACKED;
492
493 /**
494 * Identity.
495 */
496 struct GNUNET_IDENTITY_PrivateKey identity;
497
498 /**
499 * The ticket to consume
500 */
501 struct GNUNET_RECLAIM_Ticket ticket;
502};
503
504/**
505 * Attribute list is returned from the idp.
506 */
507struct ConsumeTicketResultMessage
508{
509 /**
510 * Message header
511 */
512 struct GNUNET_MessageHeader header;
513
514 /**
515 * Unique identifier for this request (for key collisions).
516 */
517 uint32_t id GNUNET_PACKED;
518
519 /**
520 * Result
521 */
522 uint32_t result GNUNET_PACKED;
523
524 /**
525 * Length of serialized attribute data
526 */
527 uint16_t attrs_len GNUNET_PACKED;
528
529 /**
530 * Length of presentation data
531 */
532 uint16_t presentations_len;
533
534 /**
535 * always zero (for alignment)
536 */
537 uint16_t reserved GNUNET_PACKED;
538
539 /**
540 * The public key of the identity.
541 */
542 struct GNUNET_IDENTITY_PublicKey identity;
543
544 /* followed by:
545 * serialized attributes data
546 */
547};
548
549
550GNUNET_NETWORK_STRUCT_END
551
552#endif