aboutsummaryrefslogtreecommitdiff
path: root/src/credential/credential.h
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2016-11-10 20:35:04 +0100
committerMartin Schanzenbach <mschanzenbach@posteo.de>2016-11-10 20:45:55 +0100
commit39981eee3163a1795026e8670ac5b669426f268b (patch)
tree8807df6deb2ed969ec951f77927b1b27d139d17f /src/credential/credential.h
parent60585eacf2735c86b40effaed8614eff2643d6f9 (diff)
downloadgnunet-39981eee3163a1795026e8670ac5b669426f268b.tar.gz
gnunet-39981eee3163a1795026e8670ac5b669426f268b.zip
add credential
Diffstat (limited to 'src/credential/credential.h')
-rw-r--r--src/credential/credential.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/src/credential/credential.h b/src/credential/credential.h
new file mode 100644
index 000000000..597c34a3d
--- /dev/null
+++ b/src/credential/credential.h
@@ -0,0 +1,91 @@
1/*
2 This file is part of GNUnet
3 Copyright (C) 2012-2013 GNUnet e.V.
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 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 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19 */
20/**
21 * @file credential/credential.h
22 * @brief IPC messages between CREDENTIAL API and CREDENTIAL service
23 * @author Adnan Husain
24 */
25#ifndef CREDENTIAL_H
26#define CREDENTIAL_H
27
28#include "gnunet_credential_service.h"
29
30GNUNET_NETWORK_STRUCT_BEGIN
31
32/**
33 * Message from client to Credential service to lookup credentials.
34 */
35struct LookupMessage
36{
37 /**
38 * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_LOOKUP
39 */
40 struct GNUNET_MessageHeader header;
41
42 /**
43 * Subject public key
44 */
45 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
46
47 /**
48 * Trust anchor
49 */
50 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
51
52 /**
53 * Unique identifier for this request (for key collisions).
54 */
55 uint32_t id GNUNET_PACKED;
56
57 /* Followed by the zero-terminated credential to look up */
58
59};
60
61
62/**
63 * Message from CREDENTIAL service to client: new results.
64 */
65struct LookupResultMessage
66{
67 /**
68 * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_LOOKUP_RESULT
69 */
70 struct GNUNET_MessageHeader header;
71
72 /**
73 * Unique identifier for this request (for key collisions).
74 */
75 uint32_t id GNUNET_PACKED;
76
77
78 /**
79 * The number of credentials in the response
80 */
81 uint32_t cd_count GNUNET_PACKED;
82
83 /* followed by cd_count GNUNET_CREDENTIAL_RecordData structs*/
84
85};
86
87
88GNUNET_NETWORK_STRUCT_END
89
90#endif
91