diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-19 12:49:08 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-19 12:49:08 +0200 |
commit | 39e327905f421c470b9cbd5c1ea548261bcae026 (patch) | |
tree | fa0df2a80fe4c785e12c609f619eb5f95e55904c /src/reclaim/reclaim.h | |
parent | a2de0769515468c733b72698f04b24d03190f719 (diff) | |
download | gnunet-39e327905f421c470b9cbd5c1ea548261bcae026.tar.gz gnunet-39e327905f421c470b9cbd5c1ea548261bcae026.zip |
BUILD: Move reclaim to service
Diffstat (limited to 'src/reclaim/reclaim.h')
-rw-r--r-- | src/reclaim/reclaim.h | 600 |
1 files changed, 0 insertions, 600 deletions
diff --git a/src/reclaim/reclaim.h b/src/reclaim/reclaim.h deleted file mode 100644 index 9d5118269..000000000 --- a/src/reclaim/reclaim.h +++ /dev/null | |||
@@ -1,600 +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 | |||
34 | GNUNET_NETWORK_STRUCT_BEGIN | ||
35 | |||
36 | |||
37 | /** | ||
38 | * Use to store an identity attribute | ||
39 | */ | ||
40 | struct AttributeStoreMessage | ||
41 | { | ||
42 | /** | ||
43 | * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT | ||
44 | */ | ||
45 | struct GNUNET_MessageHeader header; | ||
46 | |||
47 | /** | ||
48 | * The expiration interval of the attribute | ||
49 | */ | ||
50 | uint64_t exp GNUNET_PACKED; | ||
51 | |||
52 | /** | ||
53 | * Unique identifier for this request (for key collisions). | ||
54 | */ | ||
55 | uint32_t id GNUNET_PACKED; | ||
56 | |||
57 | /** | ||
58 | * The length of the attribute | ||
59 | */ | ||
60 | uint16_t attr_len GNUNET_PACKED; | ||
61 | |||
62 | /** | ||
63 | * The length of the private key | ||
64 | */ | ||
65 | uint16_t key_len GNUNET_PACKED; | ||
66 | |||
67 | /* | ||
68 | * followed by the zone private key | ||
69 | * followed by the serialized attribute */ | ||
70 | }; | ||
71 | |||
72 | |||
73 | /** | ||
74 | * Use to delete an identity attribute | ||
75 | */ | ||
76 | struct AttributeDeleteMessage | ||
77 | { | ||
78 | /** | ||
79 | * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT | ||
80 | */ | ||
81 | struct GNUNET_MessageHeader header; | ||
82 | |||
83 | /** | ||
84 | * Unique identifier for this request (for key collisions). | ||
85 | */ | ||
86 | uint32_t id GNUNET_PACKED; | ||
87 | |||
88 | /** | ||
89 | * The length of the attribute | ||
90 | */ | ||
91 | uint16_t attr_len GNUNET_PACKED; | ||
92 | |||
93 | /** | ||
94 | * The length of the private key | ||
95 | */ | ||
96 | uint16_t key_len GNUNET_PACKED; | ||
97 | |||
98 | /* followed by the serialized attribute */ | ||
99 | }; | ||
100 | |||
101 | |||
102 | /** | ||
103 | * Attribute store/delete response message | ||
104 | */ | ||
105 | struct SuccessResultMessage | ||
106 | { | ||
107 | /** | ||
108 | * Message header | ||
109 | */ | ||
110 | struct GNUNET_MessageHeader header; | ||
111 | |||
112 | /** | ||
113 | * Unique identifier for this request (for key collisions). | ||
114 | */ | ||
115 | uint32_t id GNUNET_PACKED; | ||
116 | |||
117 | /** | ||
118 | * #GNUNET_SYSERR on failure, #GNUNET_OK on success | ||
119 | */ | ||
120 | int32_t op_result GNUNET_PACKED; | ||
121 | }; | ||
122 | |||
123 | /** | ||
124 | * Attribute is returned from the idp. | ||
125 | */ | ||
126 | struct AttributeResultMessage | ||
127 | { | ||
128 | /** | ||
129 | * Message header | ||
130 | */ | ||
131 | struct GNUNET_MessageHeader header; | ||
132 | |||
133 | /** | ||
134 | * Unique identifier for this request (for key collisions). | ||
135 | */ | ||
136 | uint32_t id GNUNET_PACKED; | ||
137 | |||
138 | /** | ||
139 | * Reserved (alignment) | ||
140 | */ | ||
141 | uint16_t reserved GNUNET_PACKED; | ||
142 | |||
143 | /** | ||
144 | * Length of serialized attribute data | ||
145 | */ | ||
146 | uint16_t attr_len GNUNET_PACKED; | ||
147 | |||
148 | /** | ||
149 | * Length of serialized credential data | ||
150 | */ | ||
151 | uint16_t credential_len GNUNET_PACKED; | ||
152 | |||
153 | /** | ||
154 | * The length of the public key | ||
155 | */ | ||
156 | uint16_t pkey_len GNUNET_PACKED; | ||
157 | |||
158 | /** | ||
159 | * followed by the public key key. | ||
160 | * followed by: | ||
161 | * serialized attribute data | ||
162 | */ | ||
163 | }; | ||
164 | |||
165 | /** | ||
166 | * Credential is returned from the idp. | ||
167 | */ | ||
168 | struct CredentialResultMessage | ||
169 | { | ||
170 | /** | ||
171 | * Message header | ||
172 | */ | ||
173 | struct GNUNET_MessageHeader header; | ||
174 | |||
175 | /** | ||
176 | * Unique identifier for this request (for key collisions). | ||
177 | */ | ||
178 | uint32_t id GNUNET_PACKED; | ||
179 | |||
180 | /** | ||
181 | * Length of serialized attribute data | ||
182 | */ | ||
183 | uint16_t credential_len GNUNET_PACKED; | ||
184 | |||
185 | /** | ||
186 | * The length of the public key | ||
187 | */ | ||
188 | uint16_t key_len GNUNET_PACKED; | ||
189 | |||
190 | /** | ||
191 | * followed by the private key. | ||
192 | * followed by: | ||
193 | * serialized credential data | ||
194 | */ | ||
195 | }; | ||
196 | |||
197 | |||
198 | /** | ||
199 | * Start a attribute iteration for the given identity | ||
200 | */ | ||
201 | struct AttributeIterationStartMessage | ||
202 | { | ||
203 | /** | ||
204 | * Message | ||
205 | */ | ||
206 | struct GNUNET_MessageHeader header; | ||
207 | |||
208 | /** | ||
209 | * Unique identifier for this request (for key collisions). | ||
210 | */ | ||
211 | uint32_t id GNUNET_PACKED; | ||
212 | |||
213 | /** | ||
214 | * Reserved (alignment) | ||
215 | */ | ||
216 | uint16_t reserved GNUNET_PACKED; | ||
217 | |||
218 | /** | ||
219 | * The length of the private key | ||
220 | */ | ||
221 | uint16_t key_len GNUNET_PACKED; | ||
222 | |||
223 | /** | ||
224 | * followed by the private key. | ||
225 | */ | ||
226 | }; | ||
227 | |||
228 | |||
229 | /** | ||
230 | * Ask for next result of attribute iteration for the given operation | ||
231 | */ | ||
232 | struct AttributeIterationNextMessage | ||
233 | { | ||
234 | /** | ||
235 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT | ||
236 | */ | ||
237 | struct GNUNET_MessageHeader header; | ||
238 | |||
239 | /** | ||
240 | * Unique identifier for this request (for key collisions). | ||
241 | */ | ||
242 | uint32_t id GNUNET_PACKED; | ||
243 | }; | ||
244 | |||
245 | |||
246 | /** | ||
247 | * Start a credential iteration for the given identity | ||
248 | */ | ||
249 | struct CredentialIterationStartMessage | ||
250 | { | ||
251 | /** | ||
252 | * Message | ||
253 | */ | ||
254 | struct GNUNET_MessageHeader header; | ||
255 | |||
256 | /** | ||
257 | * Unique identifier for this request (for key collisions). | ||
258 | */ | ||
259 | uint32_t id GNUNET_PACKED; | ||
260 | |||
261 | /** | ||
262 | * Reserved (alignment) | ||
263 | */ | ||
264 | uint16_t reserved GNUNET_PACKED; | ||
265 | |||
266 | /** | ||
267 | * The length of the private key | ||
268 | */ | ||
269 | uint16_t key_len GNUNET_PACKED; | ||
270 | |||
271 | /** | ||
272 | * followed by the private key. | ||
273 | */ | ||
274 | }; | ||
275 | |||
276 | |||
277 | /** | ||
278 | * Ask for next result of credential iteration for the given operation | ||
279 | */ | ||
280 | struct CredentialIterationNextMessage | ||
281 | { | ||
282 | /** | ||
283 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT | ||
284 | */ | ||
285 | struct GNUNET_MessageHeader header; | ||
286 | |||
287 | /** | ||
288 | * Unique identifier for this request (for key collisions). | ||
289 | */ | ||
290 | uint32_t id GNUNET_PACKED; | ||
291 | }; | ||
292 | |||
293 | |||
294 | /** | ||
295 | * Stop credential iteration for the given operation | ||
296 | */ | ||
297 | struct CredentialIterationStopMessage | ||
298 | { | ||
299 | /** | ||
300 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP | ||
301 | */ | ||
302 | struct GNUNET_MessageHeader header; | ||
303 | |||
304 | /** | ||
305 | * Unique identifier for this request (for key collisions). | ||
306 | */ | ||
307 | uint32_t id GNUNET_PACKED; | ||
308 | }; | ||
309 | |||
310 | |||
311 | /** | ||
312 | * Stop attribute iteration for the given operation | ||
313 | */ | ||
314 | struct AttributeIterationStopMessage | ||
315 | { | ||
316 | /** | ||
317 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP | ||
318 | */ | ||
319 | struct GNUNET_MessageHeader header; | ||
320 | |||
321 | /** | ||
322 | * Unique identifier for this request (for key collisions). | ||
323 | */ | ||
324 | uint32_t id GNUNET_PACKED; | ||
325 | }; | ||
326 | |||
327 | /** | ||
328 | * Start a ticket iteration for the given identity | ||
329 | */ | ||
330 | struct TicketIterationStartMessage | ||
331 | { | ||
332 | /** | ||
333 | * Message | ||
334 | */ | ||
335 | struct GNUNET_MessageHeader header; | ||
336 | |||
337 | /** | ||
338 | * Unique identifier for this request (for key collisions). | ||
339 | */ | ||
340 | uint32_t id GNUNET_PACKED; | ||
341 | |||
342 | /** | ||
343 | * Reserved (alignment) | ||
344 | */ | ||
345 | uint16_t reserved GNUNET_PACKED; | ||
346 | |||
347 | /** | ||
348 | * The length of the private key | ||
349 | */ | ||
350 | uint16_t key_len GNUNET_PACKED; | ||
351 | |||
352 | /** | ||
353 | * followed by the private key. | ||
354 | */ | ||
355 | }; | ||
356 | |||
357 | |||
358 | /** | ||
359 | * Ask for next result of ticket iteration for the given operation | ||
360 | */ | ||
361 | struct TicketIterationNextMessage | ||
362 | { | ||
363 | /** | ||
364 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_NEXT | ||
365 | */ | ||
366 | struct GNUNET_MessageHeader header; | ||
367 | |||
368 | /** | ||
369 | * Unique identifier for this request (for key collisions). | ||
370 | */ | ||
371 | uint32_t id GNUNET_PACKED; | ||
372 | }; | ||
373 | |||
374 | |||
375 | /** | ||
376 | * Stop ticket iteration for the given operation | ||
377 | */ | ||
378 | struct TicketIterationStopMessage | ||
379 | { | ||
380 | /** | ||
381 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_STOP | ||
382 | */ | ||
383 | struct GNUNET_MessageHeader header; | ||
384 | |||
385 | /** | ||
386 | * Unique identifier for this request (for key collisions). | ||
387 | */ | ||
388 | uint32_t id GNUNET_PACKED; | ||
389 | }; | ||
390 | |||
391 | |||
392 | /** | ||
393 | * Ticket issue message | ||
394 | */ | ||
395 | struct IssueTicketMessage | ||
396 | { | ||
397 | /** | ||
398 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_ISSUE_TICKET | ||
399 | */ | ||
400 | struct GNUNET_MessageHeader header; | ||
401 | |||
402 | /** | ||
403 | * Unique identifier for this request (for key collisions). | ||
404 | */ | ||
405 | uint32_t id GNUNET_PACKED; | ||
406 | |||
407 | /** | ||
408 | * Reserved (alignment) | ||
409 | */ | ||
410 | uint16_t reserved GNUNET_PACKED; | ||
411 | |||
412 | /** | ||
413 | * length of serialized attribute list | ||
414 | */ | ||
415 | uint16_t attr_len GNUNET_PACKED; | ||
416 | |||
417 | /** | ||
418 | * The length of the identity private key | ||
419 | */ | ||
420 | uint16_t key_len GNUNET_PACKED; | ||
421 | |||
422 | /** | ||
423 | * The length of the relying party public key | ||
424 | */ | ||
425 | uint16_t pkey_len GNUNET_PACKED; | ||
426 | |||
427 | /** | ||
428 | * Followed by the private key. | ||
429 | * Followed by the public key. | ||
430 | * Followed by a serialized attribute list | ||
431 | */ | ||
432 | }; | ||
433 | |||
434 | /** | ||
435 | * Ticket revoke message | ||
436 | */ | ||
437 | struct RevokeTicketMessage | ||
438 | { | ||
439 | /** | ||
440 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET | ||
441 | */ | ||
442 | struct GNUNET_MessageHeader header; | ||
443 | |||
444 | /** | ||
445 | * Unique identifier for this request (for key collisions). | ||
446 | */ | ||
447 | uint32_t id GNUNET_PACKED; | ||
448 | |||
449 | /** | ||
450 | * The length of the private key | ||
451 | */ | ||
452 | uint16_t key_len GNUNET_PACKED; | ||
453 | |||
454 | /** | ||
455 | * The length of the ticket | ||
456 | */ | ||
457 | uint16_t tkt_len GNUNET_PACKED; | ||
458 | |||
459 | /** | ||
460 | * Followed by the serialized ticket. | ||
461 | * Followed by the private key. | ||
462 | * Followed by a serialized attribute list | ||
463 | */ | ||
464 | }; | ||
465 | |||
466 | /** | ||
467 | * Ticket revoke message | ||
468 | */ | ||
469 | struct RevokeTicketResultMessage | ||
470 | { | ||
471 | /** | ||
472 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT | ||
473 | */ | ||
474 | struct GNUNET_MessageHeader header; | ||
475 | |||
476 | /** | ||
477 | * Unique identifier for this request (for key collisions). | ||
478 | */ | ||
479 | uint32_t id GNUNET_PACKED; | ||
480 | |||
481 | /** | ||
482 | * Revocation result | ||
483 | */ | ||
484 | uint32_t success GNUNET_PACKED; | ||
485 | }; | ||
486 | |||
487 | |||
488 | /** | ||
489 | * Ticket result message | ||
490 | */ | ||
491 | struct TicketResultMessage | ||
492 | { | ||
493 | /** | ||
494 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT | ||
495 | */ | ||
496 | struct GNUNET_MessageHeader header; | ||
497 | |||
498 | /** | ||
499 | * Unique identifier for this request (for key collisions). | ||
500 | */ | ||
501 | uint32_t id GNUNET_PACKED; | ||
502 | |||
503 | /** | ||
504 | * Ticket length | ||
505 | */ | ||
506 | uint16_t tkt_len GNUNET_PACKED; | ||
507 | |||
508 | /** | ||
509 | * Length of new presentations created | ||
510 | */ | ||
511 | uint16_t presentations_len GNUNET_PACKED; | ||
512 | |||
513 | /* | ||
514 | * Followed by the serialized ticket | ||
515 | * Followed by the serialized GNUNET_RECLAIM_PresentationList | ||
516 | */ | ||
517 | }; | ||
518 | |||
519 | /** | ||
520 | * Ticket consume message | ||
521 | */ | ||
522 | struct ConsumeTicketMessage | ||
523 | { | ||
524 | /** | ||
525 | * Type will be #GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET | ||
526 | */ | ||
527 | struct GNUNET_MessageHeader header; | ||
528 | |||
529 | /** | ||
530 | * Unique identifier for this request (for key collisions). | ||
531 | */ | ||
532 | uint32_t id GNUNET_PACKED; | ||
533 | |||
534 | /** | ||
535 | * The length of the private key | ||
536 | */ | ||
537 | uint16_t key_len GNUNET_PACKED; | ||
538 | |||
539 | /** | ||
540 | * The length of the ticket | ||
541 | */ | ||
542 | uint16_t tkt_len GNUNET_PACKED; | ||
543 | |||
544 | /** | ||
545 | * Followed by the private key. | ||
546 | * Followed by the serialized ticket. | ||
547 | */ | ||
548 | }; | ||
549 | |||
550 | /** | ||
551 | * Attribute list is returned from the idp. | ||
552 | */ | ||
553 | struct ConsumeTicketResultMessage | ||
554 | { | ||
555 | /** | ||
556 | * Message header | ||
557 | */ | ||
558 | struct GNUNET_MessageHeader header; | ||
559 | |||
560 | /** | ||
561 | * Unique identifier for this request (for key collisions). | ||
562 | */ | ||
563 | uint32_t id GNUNET_PACKED; | ||
564 | |||
565 | /** | ||
566 | * Result | ||
567 | */ | ||
568 | uint32_t result GNUNET_PACKED; | ||
569 | |||
570 | /** | ||
571 | * Reserved (alignment) | ||
572 | */ | ||
573 | uint16_t reserved GNUNET_PACKED; | ||
574 | |||
575 | /** | ||
576 | * Length of serialized attribute data | ||
577 | */ | ||
578 | uint16_t attrs_len GNUNET_PACKED; | ||
579 | |||
580 | /** | ||
581 | * Length of presentation data | ||
582 | */ | ||
583 | uint16_t presentations_len; | ||
584 | |||
585 | /** | ||
586 | * The length of the private key | ||
587 | */ | ||
588 | uint16_t key_len GNUNET_PACKED; | ||
589 | |||
590 | /** | ||
591 | * Followed by the private key. | ||
592 | * followed by: | ||
593 | * serialized attributes data | ||
594 | */ | ||
595 | }; | ||
596 | |||
597 | |||
598 | GNUNET_NETWORK_STRUCT_END | ||
599 | |||
600 | #endif | ||