diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-11 20:25:11 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-14 10:01:23 +0200 |
commit | 94f8e5437da8cc1c5ee38a333da2e1c68b3289f1 (patch) | |
tree | 8f56950954baccbc7e1867f9ac01144b419a4798 /src/include | |
parent | 61625d4834bc7a599446486c9d16f2451527f989 (diff) | |
download | gnunet-94f8e5437da8cc1c5ee38a333da2e1c68b3289f1.tar.gz gnunet-94f8e5437da8cc1c5ee38a333da2e1c68b3289f1.zip |
RECLAIM: Start move to GNS encryption
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_gnsrecord_lib.h | 22 | ||||
-rw-r--r-- | src/include/gnunet_reclaim_attribute_lib.h | 44 |
2 files changed, 32 insertions, 34 deletions
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h index 7c25bdf15..c76e87d12 100644 --- a/src/include/gnunet_gnsrecord_lib.h +++ b/src/include/gnunet_gnsrecord_lib.h | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 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/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -94,19 +94,13 @@ extern "C" | |||
94 | #define GNUNET_GNSRECORD_TYPE_PHONE 65543 | 94 | #define GNUNET_GNSRECORD_TYPE_PHONE 65543 |
95 | 95 | ||
96 | /** | 96 | /** |
97 | * Record type for identity attributes (of IDENTITY). | 97 | * Record type for identity attributes (of RECLAIM). |
98 | */ | ||
99 | #define GNUNET_GNSRECORD_TYPE_ID_ATTR 65544 | ||
100 | |||
101 | /** | ||
102 | * Record type for an identity token (of IDENTITY-TOKEN). | ||
103 | */ | 98 | */ |
104 | #define GNUNET_GNSRECORD_TYPE_ID_TOKEN 65545 | 99 | #define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTR 65544 |
105 | 100 | ||
106 | /** | 101 | /** |
107 | * Record type for the private metadata of an identity token (of IDENTITY-TOKEN). | 102 | * 65544-65547 deprecated |
108 | */ | 103 | */ |
109 | #define GNUNET_GNSRECORD_TYPE_ID_TOKEN_METADATA 65546 | ||
110 | 104 | ||
111 | /** | 105 | /** |
112 | * Record type for credential | 106 | * Record type for credential |
@@ -124,14 +118,14 @@ extern "C" | |||
124 | #define GNUNET_GNSRECORD_TYPE_ATTRIBUTE 65549 | 118 | #define GNUNET_GNSRECORD_TYPE_ATTRIBUTE 65549 |
125 | 119 | ||
126 | /** | 120 | /** |
127 | * Record type for ABE records | 121 | * Record type for reclaim records |
128 | */ | 122 | */ |
129 | #define GNUNET_GNSRECORD_TYPE_ABE_KEY 65550 | 123 | #define GNUNET_GNSRECORD_TYPE_RECLAIM_AUTHZ 65550 |
130 | 124 | ||
131 | /** | 125 | /** |
132 | * Record type for ABE master keys | 126 | * Record type for RECLAIM master |
133 | */ | 127 | */ |
134 | #define GNUNET_GNSRECORD_TYPE_ABE_MASTER 65551 | 128 | #define GNUNET_GNSRECORD_TYPE_RECLAIM_MASTER 65551 |
135 | 129 | ||
136 | /** | 130 | /** |
137 | * Record type for reclaim OIDC clients | 131 | * Record type for reclaim OIDC clients |
diff --git a/src/include/gnunet_reclaim_attribute_lib.h b/src/include/gnunet_reclaim_attribute_lib.h index 1f26927b2..db009da3f 100644 --- a/src/include/gnunet_reclaim_attribute_lib.h +++ b/src/include/gnunet_reclaim_attribute_lib.h | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 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/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -59,10 +59,9 @@ extern "C" | |||
59 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim | 59 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim |
60 | { | 60 | { |
61 | /** | 61 | /** |
62 | * The name of the attribute. Note "name" must never be individually | 62 | * ID |
63 | * free'd | ||
64 | */ | 63 | */ |
65 | const char* name; | 64 | uint64_t id; |
66 | 65 | ||
67 | /** | 66 | /** |
68 | * Type of Claim | 67 | * Type of Claim |
@@ -73,6 +72,11 @@ struct GNUNET_RECLAIM_ATTRIBUTE_Claim | |||
73 | * Version | 72 | * Version |
74 | */ | 73 | */ |
75 | uint32_t version; | 74 | uint32_t version; |
75 | /** | ||
76 | * The name of the attribute. Note "name" must never be individually | ||
77 | * free'd | ||
78 | */ | ||
79 | const char* name; | ||
76 | 80 | ||
77 | /** | 81 | /** |
78 | * Number of bytes in @e data. | 82 | * Number of bytes in @e data. |
@@ -130,9 +134,9 @@ struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry | |||
130 | */ | 134 | */ |
131 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim * | 135 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim * |
132 | GNUNET_RECLAIM_ATTRIBUTE_claim_new (const char* attr_name, | 136 | GNUNET_RECLAIM_ATTRIBUTE_claim_new (const char* attr_name, |
133 | uint32_t type, | 137 | uint32_t type, |
134 | const void* data, | 138 | const void* data, |
135 | size_t data_size); | 139 | size_t data_size); |
136 | 140 | ||
137 | 141 | ||
138 | /** | 142 | /** |
@@ -150,10 +154,10 @@ GNUNET_RECLAIM_ATTRIBUTE_list_destroy (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList | |||
150 | 154 | ||
151 | void | 155 | void |
152 | GNUNET_RECLAIM_ATTRIBUTE_list_add (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, | 156 | GNUNET_RECLAIM_ATTRIBUTE_list_add (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
153 | const char* attr_name, | 157 | const char* attr_name, |
154 | uint32_t type, | 158 | uint32_t type, |
155 | const void* data, | 159 | const void* data, |
156 | size_t data_size); | 160 | size_t data_size); |
157 | 161 | ||
158 | /** | 162 | /** |
159 | * Serialize an attribute list | 163 | * Serialize an attribute list |
@@ -165,7 +169,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_add (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *at | |||
165 | */ | 169 | */ |
166 | size_t | 170 | size_t |
167 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, | 171 | GNUNET_RECLAIM_ATTRIBUTE_list_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, |
168 | char *result); | 172 | char *result); |
169 | 173 | ||
170 | /** | 174 | /** |
171 | * Deserialize an attribute list | 175 | * Deserialize an attribute list |
@@ -177,7 +181,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_C | |||
177 | */ | 181 | */ |
178 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * | 182 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * |
179 | GNUNET_RECLAIM_ATTRIBUTE_list_deserialize (const char* data, | 183 | GNUNET_RECLAIM_ATTRIBUTE_list_deserialize (const char* data, |
180 | size_t data_size); | 184 | size_t data_size); |
181 | 185 | ||
182 | 186 | ||
183 | /** | 187 | /** |
@@ -202,7 +206,7 @@ GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (const struct GNUNET_RECLAIM_ATTRIBU | |||
202 | */ | 206 | */ |
203 | size_t | 207 | size_t |
204 | GNUNET_RECLAIM_ATTRIBUTE_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, | 208 | GNUNET_RECLAIM_ATTRIBUTE_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, |
205 | char *result); | 209 | char *result); |
206 | 210 | ||
207 | /** | 211 | /** |
208 | * Deserialize an attribute | 212 | * Deserialize an attribute |
@@ -214,7 +218,7 @@ GNUNET_RECLAIM_ATTRIBUTE_serialize (const struct GNUNET_RECLAIM_ATTRIBUTE_Claim | |||
214 | */ | 218 | */ |
215 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim * | 219 | struct GNUNET_RECLAIM_ATTRIBUTE_Claim * |
216 | GNUNET_RECLAIM_ATTRIBUTE_deserialize (const char* data, | 220 | GNUNET_RECLAIM_ATTRIBUTE_deserialize (const char* data, |
217 | size_t data_size); | 221 | size_t data_size); |
218 | 222 | ||
219 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList* | 223 | struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList* |
220 | GNUNET_RECLAIM_ATTRIBUTE_list_dup (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); | 224 | GNUNET_RECLAIM_ATTRIBUTE_list_dup (const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); |
@@ -240,9 +244,9 @@ GNUNET_RECLAIM_ATTRIBUTE_typename_to_number (const char *typename); | |||
240 | */ | 244 | */ |
241 | int | 245 | int |
242 | GNUNET_RECLAIM_ATTRIBUTE_string_to_value (uint32_t type, | 246 | GNUNET_RECLAIM_ATTRIBUTE_string_to_value (uint32_t type, |
243 | const char *s, | 247 | const char *s, |
244 | void **data, | 248 | void **data, |
245 | size_t *data_size); | 249 | size_t *data_size); |
246 | 250 | ||
247 | /** | 251 | /** |
248 | * Convert the 'claim' of an attribute to a string | 252 | * Convert the 'claim' of an attribute to a string |
@@ -254,8 +258,8 @@ GNUNET_RECLAIM_ATTRIBUTE_string_to_value (uint32_t type, | |||
254 | */ | 258 | */ |
255 | char * | 259 | char * |
256 | GNUNET_RECLAIM_ATTRIBUTE_value_to_string (uint32_t type, | 260 | GNUNET_RECLAIM_ATTRIBUTE_value_to_string (uint32_t type, |
257 | const void* data, | 261 | const void* data, |
258 | size_t data_size); | 262 | size_t data_size); |
259 | 263 | ||
260 | /** | 264 | /** |
261 | * Convert a type number to the corresponding type string | 265 | * Convert a type number to the corresponding type string |