aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAndreas Ebner <a.e.bner@web.de>2019-10-07 11:48:07 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-10-07 12:18:42 +0200
commit1d468ecabd6c2ee5c0eae672292efa0f51bc9e48 (patch)
tree6b527980752f9603945e070c8187bfbb06232b6f /src/include
parent5cc45c7ee6a3ac522e5a1f58010d4efdf4fd102f (diff)
downloadgnunet-1d468ecabd6c2ee5c0eae672292efa0f51bc9e48.tar.gz
gnunet-1d468ecabd6c2ee5c0eae672292efa0f51bc9e48.zip
Renamed credential service to abd, replaced all related functions, parameters, etc
Diffstat (limited to 'src/include')
-rw-r--r--src/include/Makefile.am2
-rw-r--r--src/include/gnunet_abd_service.h (renamed from src/include/gnunet_credential_service.h)104
-rw-r--r--src/include/gnunet_gnsrecord_lib.h3
-rw-r--r--src/include/gnunet_protocols.h12
4 files changed, 60 insertions, 61 deletions
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 9e0813425..c81f8e7d8 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -23,6 +23,7 @@ else
23gnunetinclude_HEADERS = \ 23gnunetinclude_HEADERS = \
24 platform.h gettext.h \ 24 platform.h gettext.h \
25 compat.h \ 25 compat.h \
26 gnunet_abd_service.h \
26 gnunet_applications.h \ 27 gnunet_applications.h \
27 gnunet_arm_service.h \ 28 gnunet_arm_service.h \
28 gnunet_ats_service.h \ 29 gnunet_ats_service.h \
@@ -42,7 +43,6 @@ gnunetinclude_HEADERS = \
42 gnunet_container_lib.h \ 43 gnunet_container_lib.h \
43 gnunet_conversation_service.h \ 44 gnunet_conversation_service.h \
44 gnunet_core_service.h \ 45 gnunet_core_service.h \
45 gnunet_credential_service.h \
46 gnunet_crypto_lib.h \ 46 gnunet_crypto_lib.h \
47 gnunet_curl_lib.h \ 47 gnunet_curl_lib.h \
48 gnunet_datacache_lib.h \ 48 gnunet_datacache_lib.h \
diff --git a/src/include/gnunet_credential_service.h b/src/include/gnunet_abd_service.h
index 325296ecc..b50ff8b86 100644
--- a/src/include/gnunet_credential_service.h
+++ b/src/include/gnunet_abd_service.h
@@ -24,13 +24,13 @@
24 * @file 24 * @file
25 * API to the Credential service 25 * API to the Credential service
26 * 26 *
27 * @defgroup credential Credential service 27 * @defgroup abd Credential service
28 * Credentials 28 * Credentials
29 * 29 *
30 * @{ 30 * @{
31 */ 31 */
32#ifndef GNUNET_CREDENTIAL_SERVICE_H 32#ifndef GNUNET_ABD_SERVICE_H
33#define GNUNET_CREDENTIAL_SERVICE_H 33#define GNUNET_ABD_SERVICE_H
34 34
35#include "gnunet_util_lib.h" 35#include "gnunet_util_lib.h"
36#include "gnunet_gns_service.h" 36#include "gnunet_gns_service.h"
@@ -48,26 +48,26 @@ extern "C"
48/** 48/**
49 * Connection to the Credential service. 49 * Connection to the Credential service.
50 */ 50 */
51struct GNUNET_CREDENTIAL_Handle; 51struct GNUNET_ABD_Handle;
52 52
53/** 53/**
54 * Handle to control a lookup operation. 54 * Handle to control a lookup operation.
55 */ 55 */
56struct GNUNET_CREDENTIAL_Request; 56struct GNUNET_ABD_Request;
57 57
58/* 58/*
59* Enum used for checking whether the issuer has the authority to issue credentials or is just a subject 59* Enum used for checking whether the issuer has the authority to issue credentials or is just a subject
60*/ 60*/
61enum GNUNET_CREDENTIAL_CredentialFlags { 61enum GNUNET_ABD_CredentialFlags {
62 62
63 //Subject had credentials before, but have been revoked now 63 //Subject had credentials before, but have been revoked now
64 GNUNET_CREDENTIAL_FLAG_REVOKED=0, 64 GNUNET_ABD_FLAG_REVOKED=0,
65 65
66 //Subject flag indicates that the subject is a holder of this credential and may present it as such 66 //Subject flag indicates that the subject is a holder of this credential and may present it as such
67 GNUNET_CREDENTIAL_FLAG_SUBJECT=1, 67 GNUNET_ABD_FLAG_SUBJECT=1,
68 68
69 //Issuer flag is used to signify that the subject is allowed to issue this credential and delegate issuance 69 //Issuer flag is used to signify that the subject is allowed to issue this credential and delegate issuance
70 GNUNET_CREDENTIAL_FLAG_ISSUER=2 70 GNUNET_ABD_FLAG_ISSUER=2
71 71
72}; 72};
73 73
@@ -75,7 +75,7 @@ GNUNET_NETWORK_STRUCT_BEGIN
75/** 75/**
76 * The attribute delegation record 76 * The attribute delegation record
77 */ 77 */
78struct GNUNET_CREDENTIAL_DelegationRecord { 78struct GNUNET_ABD_DelegationRecord {
79 79
80 /** 80 /**
81 * Number of delegation sets in this record 81 * Number of delegation sets in this record
@@ -95,7 +95,7 @@ struct GNUNET_CREDENTIAL_DelegationRecord {
95/** 95/**
96 * The attribute delegation record 96 * The attribute delegation record
97 */ 97 */
98struct GNUNET_CREDENTIAL_DelegationRecordSet { 98struct GNUNET_ABD_DelegationRecordSet {
99 99
100 /** 100 /**
101 * Public key of the subject this attribute was delegated to 101 * Public key of the subject this attribute was delegated to
@@ -114,7 +114,7 @@ GNUNET_NETWORK_STRUCT_END
114/** 114/**
115 * The attribute delegation record 115 * The attribute delegation record
116 */ 116 */
117struct GNUNET_CREDENTIAL_DelegationSet { 117struct GNUNET_ABD_DelegationSet {
118 118
119 /** 119 /**
120 * Public key of the subject this attribute was delegated to 120 * Public key of the subject this attribute was delegated to
@@ -133,7 +133,7 @@ struct GNUNET_CREDENTIAL_DelegationSet {
133/** 133/**
134 * A delegation 134 * A delegation
135 */ 135 */
136struct GNUNET_CREDENTIAL_Delegation { 136struct GNUNET_ABD_Delegation {
137 137
138 /** 138 /**
139 * The issuer of the delegation 139 * The issuer of the delegation
@@ -170,7 +170,7 @@ struct GNUNET_CREDENTIAL_Delegation {
170/** 170/**
171 * A delegate 171 * A delegate
172 */ 172 */
173struct GNUNET_CREDENTIAL_Delegate { 173struct GNUNET_ABD_Delegate {
174 174
175 /** 175 /**
176 * The issuer of the credential 176 * The issuer of the credential
@@ -217,13 +217,13 @@ struct GNUNET_CREDENTIAL_Delegate {
217/* 217/*
218* Enum used for checking whether the issuer has the authority to issue credentials or is just a subject 218* Enum used for checking whether the issuer has the authority to issue credentials or is just a subject
219*/ 219*/
220enum GNUNET_CREDENTIAL_AlgoDirectionFlags { 220enum GNUNET_ABD_AlgoDirectionFlags {
221 221
222 //Subject had credentials before, but have been revoked now 222 //Subject had credentials before, but have been revoked now
223 GNUNET_CREDENTIAL_FLAG_FORWARD=1 << 0, 223 GNUNET_ABD_FLAG_FORWARD=1 << 0,
224 224
225 //Subject flag indicates that the subject is a holder of this credential and may present it as such 225 //Subject flag indicates that the subject is a holder of this credential and may present it as such
226 GNUNET_CREDENTIAL_FLAG_BACKWARD=1 << 1 226 GNUNET_ABD_FLAG_BACKWARD=1 << 1
227 227
228}; 228};
229 229
@@ -233,8 +233,8 @@ enum GNUNET_CREDENTIAL_AlgoDirectionFlags {
233 * @param cfg configuration to use 233 * @param cfg configuration to use
234 * @return handle to the Credential service, or NULL on error 234 * @return handle to the Credential service, or NULL on error
235 */ 235 */
236struct GNUNET_CREDENTIAL_Handle * 236struct GNUNET_ABD_Handle *
237GNUNET_CREDENTIAL_connect (const struct GNUNET_CONFIGURATION_Handle *cfg); 237GNUNET_ABD_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
238 238
239 239
240/** 240/**
@@ -243,7 +243,7 @@ GNUNET_CREDENTIAL_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
243 * @param handle connection to shut down 243 * @param handle connection to shut down
244 */ 244 */
245void 245void
246GNUNET_CREDENTIAL_disconnect (struct GNUNET_CREDENTIAL_Handle *handle); 246GNUNET_ABD_disconnect (struct GNUNET_ABD_Handle *handle);
247 247
248 248
249/** 249/**
@@ -252,17 +252,17 @@ GNUNET_CREDENTIAL_disconnect (struct GNUNET_CREDENTIAL_Handle *handle);
252 * @param cls closure 252 * @param cls closure
253 * @param d_count the number of delegations processed 253 * @param d_count the number of delegations processed
254 * @param delegation_chain the delegations processed 254 * @param delegation_chain the delegations processed
255 * @param c_count the number of credentials found 255 * @param c_count the number of delegates found
256 * @param credential the credentials 256 * @param delegate the delegates
257 */ 257 */
258typedef void (*GNUNET_CREDENTIAL_CredentialResultProcessor) (void *cls, 258typedef void (*GNUNET_ABD_CredentialResultProcessor) (void *cls,
259 unsigned int d_count, 259 unsigned int d_count,
260 struct GNUNET_CREDENTIAL_Delegation *delegation_chain, 260 struct GNUNET_ABD_Delegation *delegation_chain,
261 unsigned int c_count, 261 unsigned int c_count,
262 struct GNUNET_CREDENTIAL_Delegate *delegte); 262 struct GNUNET_ABD_Delegate *delegte);
263 263
264typedef void (*GNUNET_CREDENTIAL_IntermediateResultProcessor) (void *cls, 264typedef void (*GNUNET_ABD_IntermediateResultProcessor) (void *cls,
265 struct GNUNET_CREDENTIAL_Delegation *delegation, 265 struct GNUNET_ABD_Delegation *delegation,
266 bool is_bw); 266 bool is_bw);
267 267
268/** 268/**
@@ -272,7 +272,7 @@ typedef void (*GNUNET_CREDENTIAL_IntermediateResultProcessor) (void *cls,
272 * @param success GNUNET_YES if successful 272 * @param success GNUNET_YES if successful
273 * @param result the record data that can be handed to the subject 273 * @param result the record data that can be handed to the subject
274 */ 274 */
275typedef void (*GNUNET_CREDENTIAL_DelegateResultProcessor) (void *cls, 275typedef void (*GNUNET_ABD_DelegateResultProcessor) (void *cls,
276 uint32_t success); 276 uint32_t success);
277 277
278/** 278/**
@@ -282,7 +282,7 @@ typedef void (*GNUNET_CREDENTIAL_DelegateResultProcessor) (void *cls,
282 * @param success GNUNET_YES if successful 282 * @param success GNUNET_YES if successful
283 * @param result the record data that can be handed to the subject 283 * @param result the record data that can be handed to the subject
284 */ 284 */
285typedef void (*GNUNET_CREDENTIAL_RemoveDelegateResultProcessor) (void *cls, 285typedef void (*GNUNET_ABD_RemoveDelegateResultProcessor) (void *cls,
286 uint32_t success); 286 uint32_t success);
287 287
288 288
@@ -298,34 +298,34 @@ typedef void (*GNUNET_CREDENTIAL_RemoveDelegateResultProcessor) (void *cls,
298 * @param issuer_key the issuer public key 298 * @param issuer_key the issuer public key
299 * @param issuer_attribute the issuer attribute 299 * @param issuer_attribute the issuer attribute
300 * @param subject_key the subject public key 300 * @param subject_key the subject public key
301 * @param credential_count number of credentials 301 * @param delegate_count number of delegates
302 * @param credentials the subject credentials 302 * @param delegates the subject delegates
303 * @param proc function to call on result 303 * @param proc function to call on result
304 * @param proc_cls closure for processor 304 * @param proc_cls closure for processor
305 * @return handle to the queued request 305 * @return handle to the queued request
306 */ 306 */
307struct GNUNET_CREDENTIAL_Request* 307struct GNUNET_ABD_Request*
308GNUNET_CREDENTIAL_verify (struct GNUNET_CREDENTIAL_Handle *handle, 308GNUNET_ABD_verify (struct GNUNET_ABD_Handle *handle,
309 const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key, 309 const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
310 const char *issuer_attribute, 310 const char *issuer_attribute,
311 const struct GNUNET_CRYPTO_EcdsaPublicKey *subject_key, 311 const struct GNUNET_CRYPTO_EcdsaPublicKey *subject_key,
312 uint32_t credential_count, 312 uint32_t delegate_count,
313 const struct GNUNET_CREDENTIAL_Delegate *delegates, 313 const struct GNUNET_ABD_Delegate *delegates,
314 enum GNUNET_CREDENTIAL_AlgoDirectionFlags direction, 314 enum GNUNET_ABD_AlgoDirectionFlags direction,
315 GNUNET_CREDENTIAL_CredentialResultProcessor proc, 315 GNUNET_ABD_CredentialResultProcessor proc,
316 void *proc_cls, 316 void *proc_cls,
317 GNUNET_CREDENTIAL_IntermediateResultProcessor, 317 GNUNET_ABD_IntermediateResultProcessor,
318 void *proc2_cls); 318 void *proc2_cls);
319 319
320struct GNUNET_CREDENTIAL_Request* 320struct GNUNET_ABD_Request*
321GNUNET_CREDENTIAL_collect (struct GNUNET_CREDENTIAL_Handle *handle, 321GNUNET_ABD_collect (struct GNUNET_ABD_Handle *handle,
322 const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key, 322 const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
323 const char *issuer_attribute, 323 const char *issuer_attribute,
324 const struct GNUNET_CRYPTO_EcdsaPrivateKey *subject_key, 324 const struct GNUNET_CRYPTO_EcdsaPrivateKey *subject_key,
325 enum GNUNET_CREDENTIAL_AlgoDirectionFlags direction, 325 enum GNUNET_ABD_AlgoDirectionFlags direction,
326 GNUNET_CREDENTIAL_CredentialResultProcessor proc, 326 GNUNET_ABD_CredentialResultProcessor proc,
327 void *proc_cls, 327 void *proc_cls,
328 GNUNET_CREDENTIAL_IntermediateResultProcessor, 328 GNUNET_ABD_IntermediateResultProcessor,
329 void *proc2_cls); 329 void *proc2_cls);
330 330
331/** 331/**
@@ -340,13 +340,13 @@ GNUNET_CREDENTIAL_collect (struct GNUNET_CREDENTIAL_Handle *handle,
340 * @param proc_cls the result closure context 340 * @param proc_cls the result closure context
341 * @return handle to the queued request 341 * @return handle to the queued request
342 */ 342 */
343struct GNUNET_CREDENTIAL_Request * 343struct GNUNET_ABD_Request *
344GNUNET_CREDENTIAL_add_delegation (struct GNUNET_CREDENTIAL_Handle *handle, 344GNUNET_ABD_add_delegation (struct GNUNET_ABD_Handle *handle,
345 struct GNUNET_IDENTITY_Ego *issuer, 345 struct GNUNET_IDENTITY_Ego *issuer,
346 const char *attribute, 346 const char *attribute,
347 struct GNUNET_CRYPTO_EcdsaPublicKey *subject, 347 struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
348 const char *delegated_attribute, 348 const char *delegated_attribute,
349 GNUNET_CREDENTIAL_DelegateResultProcessor proc, 349 GNUNET_ABD_DelegateResultProcessor proc,
350 void *proc_cls); 350 void *proc_cls);
351 351
352/** 352/**
@@ -359,11 +359,11 @@ GNUNET_CREDENTIAL_add_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
359 * @param proc_cls callback closure 359 * @param proc_cls callback closure
360 * @return handle to the queued request 360 * @return handle to the queued request
361 */ 361 */
362struct GNUNET_CREDENTIAL_Request * 362struct GNUNET_ABD_Request *
363GNUNET_CREDENTIAL_remove_delegation (struct GNUNET_CREDENTIAL_Handle *handle, 363GNUNET_ABD_remove_delegation (struct GNUNET_ABD_Handle *handle,
364 struct GNUNET_IDENTITY_Ego *issuer, 364 struct GNUNET_IDENTITY_Ego *issuer,
365 const char *attribute, 365 const char *attribute,
366 GNUNET_CREDENTIAL_RemoveDelegateResultProcessor proc, 366 GNUNET_ABD_RemoveDelegateResultProcessor proc,
367 void *proc_cls); 367 void *proc_cls);
368 368
369 369
@@ -377,8 +377,8 @@ GNUNET_CREDENTIAL_remove_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
377 * @param expiration the TTL of the credential 377 * @param expiration the TTL of the credential
378 * @return handle to the queued request 378 * @return handle to the queued request
379 */ 379 */
380struct GNUNET_CREDENTIAL_Delegate* 380struct GNUNET_ABD_Delegate*
381GNUNET_CREDENTIAL_delegate_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer, 381GNUNET_ABD_delegate_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
382 struct GNUNET_CRYPTO_EcdsaPublicKey *subject, 382 struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
383 const char *iss_attr, 383 const char *iss_attr,
384 const char *sub_attr, 384 const char *sub_attr,
@@ -391,7 +391,7 @@ GNUNET_CREDENTIAL_delegate_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *is
391 * @param lr the lookup request to cancel 391 * @param lr the lookup request to cancel
392 */ 392 */
393void 393void
394GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *lr); 394GNUNET_ABD_request_cancel (struct GNUNET_ABD_Request *lr);
395 395
396 396
397#if 0 /* keep Emacsens' auto-indent happy */ 397#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h
index ea91f9eb9..3a49d98b9 100644
--- a/src/include/gnunet_gnsrecord_lib.h
+++ b/src/include/gnunet_gnsrecord_lib.h
@@ -107,9 +107,8 @@ extern "C" {
107 */ 107 */
108 108
109/** 109/**
110 * Record type for credential 110 * 65547 deleted, free to use
111 */ 111 */
112#define GNUNET_GNSRECORD_TYPE_CREDENTIAL 65547
113 112
114/** 113/**
115 * Record type for policies 114 * Record type for policies
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 4ca1ad47a..cd7cb50de 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2716,17 +2716,17 @@ extern "C" {
2716 2716
2717/************************************************** 2717/**************************************************
2718 * 2718 *
2719 * CREDENTIAL MESSAGE TYPES 2719 * ABD MESSAGE TYPES
2720 */ 2720 */
2721#define GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY 981 2721#define GNUNET_MESSAGE_TYPE_ABD_VERIFY 981
2722 2722
2723#define GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY_RESULT 982 2723#define GNUNET_MESSAGE_TYPE_ABD_VERIFY_RESULT 982
2724 2724
2725#define GNUNET_MESSAGE_TYPE_CREDENTIAL_COLLECT 983 2725#define GNUNET_MESSAGE_TYPE_ABD_COLLECT 983
2726 2726
2727#define GNUNET_MESSAGE_TYPE_CREDENTIAL_COLLECT_RESULT 984 2727#define GNUNET_MESSAGE_TYPE_ABD_COLLECT_RESULT 984
2728 2728
2729#define GNUNET_MESSAGE_TYPE_CREDENTIAL_INTERMEDIATE_RESULT 985 2729#define GNUNET_MESSAGE_TYPE_ABD_INTERMEDIATE_RESULT 985
2730 2730
2731/******************************************************************************/ 2731/******************************************************************************/
2732 2732