summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_credential_service.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/include/gnunet_credential_service.h b/src/include/gnunet_credential_service.h
index 05cdb7c9f..7b179e99f 100644
--- a/src/include/gnunet_credential_service.h
+++ b/src/include/gnunet_credential_service.h
@@ -202,6 +202,53 @@ struct GNUNET_CREDENTIAL_Credential
202 const char *issuer_attribute; 202 const char *issuer_attribute;
203}; 203};
204 204
205/**
206 * A delegate
207 */
208struct GNUNET_CREDENTIAL_Delegate {
209
210 /**
211 * The issuer of the credential
212 */
213 struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
214
215 /**
216 * Public key of the subject this credential was issued to
217 */
218 struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
219
220 /**
221 * Signature of this credential
222 */
223 struct GNUNET_CRYPTO_EcdsaSignature signature;
224
225 /**
226 * Expiration of this credential
227 */
228 struct GNUNET_TIME_Absolute expiration;
229
230 /**
231 * Length of the issuer attribute
232 */
233 uint32_t issuer_attribute_len;
234
235 /**
236 * The issuer attribute
237 */
238 const char *issuer_attribute;
239
240 /**
241 * Length of the subject attribute
242 */
243 uint32_t subject_attribute_len;
244
245 /**
246 * The subject attribute
247 */
248 const char *subject_attribute;
249
250};
251
205 252
206 253
207/** 254/**
@@ -363,6 +410,21 @@ GNUNET_CREDENTIAL_credential_issue (const struct
363 const char *attribute, 410 const char *attribute,
364 struct GNUNET_TIME_Absolute *expiration); 411 struct GNUNET_TIME_Absolute *expiration);
365 412
413/**
414 * Issue an attribute to a subject
415 *
416 * @param issuer the ego that should be used to issue the attribute
417 * @param subject the subject of the attribute
418 * @param attribute the name of the attribute
419 * @param expiration the TTL of the credential
420 * @return handle to the queued request
421 */
422struct GNUNET_CREDENTIAL_Delegate*
423GNUNET_CREDENTIAL_delegate_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
424 struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
425 const char *iss_attr,
426 const char *sub_attr,
427 struct GNUNET_TIME_Absolute *expiration);
366 428
367 429
368/** 430/**