aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/reclaim_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim/reclaim_api.c')
-rw-r--r--src/reclaim/reclaim_api.c69
1 files changed, 3 insertions, 66 deletions
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c
index bc6b835c9..6f55d62e4 100644
--- a/src/reclaim/reclaim_api.c
+++ b/src/reclaim/reclaim_api.c
@@ -1076,14 +1076,6 @@ GNUNET_RECLAIM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
1076} 1076}
1077 1077
1078 1078
1079/**
1080 * Cancel an operation. Note that the operation MAY still
1081 * be executed; this merely cancels the continuation; if the request
1082 * was already transmitted, the service may still choose to complete
1083 * the operation.
1084 *
1085 * @param op operation to cancel
1086 */
1087void 1079void
1088GNUNET_RECLAIM_cancel (struct GNUNET_RECLAIM_Operation *op) 1080GNUNET_RECLAIM_cancel (struct GNUNET_RECLAIM_Operation *op)
1089{ 1081{
@@ -1210,23 +1202,11 @@ GNUNET_RECLAIM_attribute_delete (
1210} 1202}
1211 1203
1212 1204
1213/**
1214 * Store an credential. If the credential is already present,
1215 * it is replaced with the new credential.
1216 *
1217 * @param h handle to the re:claimID service
1218 * @param pkey private key of the identity
1219 * @param attr the credential value
1220 * @param exp_interval the relative expiration interval for the credential
1221 * @param cont continuation to call when done
1222 * @param cont_cls closure for @a cont
1223 * @return handle to abort the request
1224 */
1225struct GNUNET_RECLAIM_Operation * 1205struct GNUNET_RECLAIM_Operation *
1226GNUNET_RECLAIM_credential_store ( 1206GNUNET_RECLAIM_credential_store (
1227 struct GNUNET_RECLAIM_Handle *h, 1207 struct GNUNET_RECLAIM_Handle *h,
1228 const struct GNUNET_IDENTITY_PrivateKey *pkey, 1208 const struct GNUNET_IDENTITY_PrivateKey *pkey,
1229 const struct GNUNET_RECLAIM_Credential *attr, 1209 const struct GNUNET_RECLAIM_Credential *credential,
1230 const struct GNUNET_TIME_Relative *exp_interval, 1210 const struct GNUNET_TIME_Relative *exp_interval,
1231 GNUNET_RECLAIM_ContinuationWithStatus cont, 1211 GNUNET_RECLAIM_ContinuationWithStatus cont,
1232 void *cont_cls) 1212 void *cont_cls)
@@ -1241,7 +1221,7 @@ GNUNET_RECLAIM_credential_store (
1241 op->cls = cont_cls; 1221 op->cls = cont_cls;
1242 op->r_id = h->r_id_gen++; 1222 op->r_id = h->r_id_gen++;
1243 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); 1223 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op);
1244 attr_len = GNUNET_RECLAIM_credential_serialize_get_size (attr); 1224 attr_len = GNUNET_RECLAIM_credential_serialize_get_size (credential);
1245 op->env = GNUNET_MQ_msg_extra (sam, 1225 op->env = GNUNET_MQ_msg_extra (sam,
1246 attr_len, 1226 attr_len,
1247 GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_STORE); 1227 GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_STORE);
@@ -1249,7 +1229,7 @@ GNUNET_RECLAIM_credential_store (
1249 sam->id = htonl (op->r_id); 1229 sam->id = htonl (op->r_id);
1250 sam->exp = GNUNET_htonll (exp_interval->rel_value_us); 1230 sam->exp = GNUNET_htonll (exp_interval->rel_value_us);
1251 1231
1252 GNUNET_RECLAIM_credential_serialize (attr, (char *) &sam[1]); 1232 GNUNET_RECLAIM_credential_serialize (credential, (char *) &sam[1]);
1253 1233
1254 sam->attr_len = htons (attr_len); 1234 sam->attr_len = htons (attr_len);
1255 if (NULL != h->mq) 1235 if (NULL != h->mq)
@@ -1258,17 +1238,6 @@ GNUNET_RECLAIM_credential_store (
1258} 1238}
1259 1239
1260 1240
1261/**
1262 * Delete an credential. Tickets used to share this credential are updated
1263 * accordingly.
1264 *
1265 * @param h handle to the re:claimID service
1266 * @param pkey Private key of the identity to add an attribute to
1267 * @param attr The credential
1268 * @param cont Continuation to call when done
1269 * @param cont_cls Closure for @a cont
1270 * @return handle Used to to abort the request
1271 */
1272struct GNUNET_RECLAIM_Operation * 1241struct GNUNET_RECLAIM_Operation *
1273GNUNET_RECLAIM_credential_delete ( 1242GNUNET_RECLAIM_credential_delete (
1274 struct GNUNET_RECLAIM_Handle *h, 1243 struct GNUNET_RECLAIM_Handle *h,
@@ -1366,12 +1335,6 @@ GNUNET_RECLAIM_get_attributes_start (
1366} 1335}
1367 1336
1368 1337
1369/**
1370 * Calls the record processor specified in #GNUNET_RECLAIM_get_attributes_start
1371 * for the next record.
1372 *
1373 * @param it the iterator
1374 */
1375void 1338void
1376GNUNET_RECLAIM_get_attributes_next (struct GNUNET_RECLAIM_AttributeIterator *it) 1339GNUNET_RECLAIM_get_attributes_next (struct GNUNET_RECLAIM_AttributeIterator *it)
1377{ 1340{
@@ -1476,12 +1439,6 @@ GNUNET_RECLAIM_get_credentials_start (
1476} 1439}
1477 1440
1478 1441
1479/**
1480 * Calls the record processor specified in #GNUNET_RECLAIM_get_credential_start
1481 * for the next record.
1482 *
1483 * @param it the iterator
1484 */
1485void 1442void
1486GNUNET_RECLAIM_get_credentials_next (struct 1443GNUNET_RECLAIM_get_credentials_next (struct
1487 GNUNET_RECLAIM_CredentialIterator *ait) 1444 GNUNET_RECLAIM_CredentialIterator *ait)
@@ -1497,13 +1454,6 @@ GNUNET_RECLAIM_get_credentials_next (struct
1497} 1454}
1498 1455
1499 1456
1500/**
1501 * Stops iteration and releases the handle for further calls. Must
1502 * be called on any iteration that has not yet completed prior to calling
1503 * #GNUNET_RECLAIM_disconnect.
1504 *
1505 * @param it the iterator
1506 */
1507void 1457void
1508GNUNET_RECLAIM_get_credentials_stop (struct 1458GNUNET_RECLAIM_get_credentials_stop (struct
1509 GNUNET_RECLAIM_CredentialIterator *ait) 1459 GNUNET_RECLAIM_CredentialIterator *ait)
@@ -1524,19 +1474,6 @@ GNUNET_RECLAIM_get_credentials_stop (struct
1524} 1474}
1525 1475
1526 1476
1527/**
1528 * Issues a ticket to another relying party. The identity may use
1529 * @GNUNET_RECLAIM_ticket_consume to consume the ticket
1530 * and retrieve the attributes specified in the attribute list.
1531 *
1532 * @param h the reclaim to use
1533 * @param iss the issuing identity (= the user)
1534 * @param rp the subject of the ticket (= the relying party)
1535 * @param attrs the attributes that the relying party is given access to
1536 * @param cb the callback
1537 * @param cb_cls the callback closure
1538 * @return handle to abort the operation
1539 */
1540struct GNUNET_RECLAIM_Operation * 1477struct GNUNET_RECLAIM_Operation *
1541GNUNET_RECLAIM_ticket_issue ( 1478GNUNET_RECLAIM_ticket_issue (
1542 struct GNUNET_RECLAIM_Handle *h, 1479 struct GNUNET_RECLAIM_Handle *h,