diff options
Diffstat (limited to 'src/include/anastasis_database_plugin.h')
-rw-r--r-- | src/include/anastasis_database_plugin.h | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/src/include/anastasis_database_plugin.h b/src/include/anastasis_database_plugin.h index 488a5af..5f52ae1 100644 --- a/src/include/anastasis_database_plugin.h +++ b/src/include/anastasis_database_plugin.h | |||
@@ -244,11 +244,11 @@ struct ANASTASIS_DatabasePlugin | |||
244 | * Store encrypted recovery document. | 244 | * Store encrypted recovery document. |
245 | * | 245 | * |
246 | * @param cls closure | 246 | * @param cls closure |
247 | * @param anastasis_pub public key of the user's account | 247 | * @param account_pub public key of the user's account |
248 | * @param account_sig signature affirming storage request | 248 | * @param account_sig signature affirming storage request |
249 | * @param data_hash hash of @a data | 249 | * @param recovery_data_hash hash of @a data |
250 | * @param data contains encrypted_recovery_document | 250 | * @param recovery_data contains encrypted recovery document |
251 | * @param data_size size of data blob | 251 | * @param recovery_data_size size of @a recovery_data blob |
252 | * @param payment_secret identifier for the payment, used to later charge on uploads | 252 | * @param payment_secret identifier for the payment, used to later charge on uploads |
253 | * @param[out] version set to the version assigned to the document by the database | 253 | * @param[out] version set to the version assigned to the document by the database |
254 | * @return transaction status, 0 if upload could not be finished because @a payment_secret | 254 | * @return transaction status, 0 if upload could not be finished because @a payment_secret |
@@ -257,11 +257,11 @@ struct ANASTASIS_DatabasePlugin | |||
257 | enum ANASTASIS_DB_StoreStatus | 257 | enum ANASTASIS_DB_StoreStatus |
258 | (*store_recovery_document)( | 258 | (*store_recovery_document)( |
259 | void *cls, | 259 | void *cls, |
260 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, | 260 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, |
261 | const struct ANASTASIS_AccountSignatureP *account_sig, | 261 | const struct ANASTASIS_AccountSignatureP *account_sig, |
262 | const struct GNUNET_HashCode *data_hash, | 262 | const struct GNUNET_HashCode *recovery_data_hash, |
263 | const void *data, | 263 | const void *recovery_data, |
264 | size_t data_size, | 264 | size_t recovery_data_size, |
265 | const struct ANASTASIS_PaymentSecretP *payment_secret, | 265 | const struct ANASTASIS_PaymentSecretP *payment_secret, |
266 | uint32_t *version); | 266 | uint32_t *version); |
267 | 267 | ||
@@ -270,7 +270,7 @@ struct ANASTASIS_DatabasePlugin | |||
270 | * Fetch recovery document for user according given version. | 270 | * Fetch recovery document for user according given version. |
271 | * | 271 | * |
272 | * @param cls closure | 272 | * @param cls closure |
273 | * @param anastasis_pub public key of the user's account | 273 | * @param account_pub public key of the user's account |
274 | * @param version the version number of the policy the user requests | 274 | * @param version the version number of the policy the user requests |
275 | * @param[out] account_sig signature | 275 | * @param[out] account_sig signature |
276 | * @param[out] recovery_data_hash hash of the current recovery data | 276 | * @param[out] recovery_data_hash hash of the current recovery data |
@@ -281,7 +281,7 @@ struct ANASTASIS_DatabasePlugin | |||
281 | enum GNUNET_DB_QueryStatus | 281 | enum GNUNET_DB_QueryStatus |
282 | (*get_recovery_document)( | 282 | (*get_recovery_document)( |
283 | void *cls, | 283 | void *cls, |
284 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, | 284 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, |
285 | uint32_t version, | 285 | uint32_t version, |
286 | struct ANASTASIS_AccountSignatureP *account_sig, | 286 | struct ANASTASIS_AccountSignatureP *account_sig, |
287 | struct GNUNET_HashCode *recovery_data_hash, | 287 | struct GNUNET_HashCode *recovery_data_hash, |
@@ -293,7 +293,7 @@ struct ANASTASIS_DatabasePlugin | |||
293 | * Fetch latest recovery document for user. | 293 | * Fetch latest recovery document for user. |
294 | * | 294 | * |
295 | * @param cls closure | 295 | * @param cls closure |
296 | * @param anastasis_pub public key of the user's account | 296 | * @param account_pub public key of the user's account |
297 | * @param account_sig signature | 297 | * @param account_sig signature |
298 | * @param recovery_data_hash hash of the current recovery data | 298 | * @param recovery_data_hash hash of the current recovery data |
299 | * @param[out] data_size set to size of @a data blob | 299 | * @param[out] data_size set to size of @a data blob |
@@ -304,7 +304,7 @@ struct ANASTASIS_DatabasePlugin | |||
304 | enum GNUNET_DB_QueryStatus | 304 | enum GNUNET_DB_QueryStatus |
305 | (*get_latest_recovery_document)( | 305 | (*get_latest_recovery_document)( |
306 | void *cls, | 306 | void *cls, |
307 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, | 307 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, |
308 | struct ANASTASIS_AccountSignatureP *account_sig, | 308 | struct ANASTASIS_AccountSignatureP *account_sig, |
309 | struct GNUNET_HashCode *recovery_data_hash, | 309 | struct GNUNET_HashCode *recovery_data_hash, |
310 | size_t *data_size, | 310 | size_t *data_size, |
@@ -318,11 +318,10 @@ struct ANASTASIS_DatabasePlugin | |||
318 | * @param cls closure | 318 | * @param cls closure |
319 | * @param truth_uuid the identifier for the Truth | 319 | * @param truth_uuid the identifier for the Truth |
320 | * @param key_share_data contains information of an EncryptedKeyShare | 320 | * @param key_share_data contains information of an EncryptedKeyShare |
321 | * @param method name of method | 321 | * @param mime_type presumed mime type of data in @a encrypted_truth |
322 | * @param nonce nonce used to compute encryption key for encrypted_truth | ||
323 | * @param aes_gcm_tag authentication tag of encrypted_truth | ||
324 | * @param encrypted_truth contains the encrypted Truth which includes the ground truth i.e. H(challenge answer), phonenumber, SMS | 322 | * @param encrypted_truth contains the encrypted Truth which includes the ground truth i.e. H(challenge answer), phonenumber, SMS |
325 | * @param encrypted_truth_size the size of the Truth | 323 | * @param encrypted_truth_size the size of the Truth |
324 | * @param method name of method | ||
326 | * @param truth_expiration time till the according data will be stored | 325 | * @param truth_expiration time till the according data will be stored |
327 | * @return transaction status | 326 | * @return transaction status |
328 | */ | 327 | */ |
@@ -379,7 +378,7 @@ struct ANASTASIS_DatabasePlugin | |||
379 | * current @a recovery_document_hash. | 378 | * current @a recovery_document_hash. |
380 | * | 379 | * |
381 | * @param cls closure | 380 | * @param cls closure |
382 | * @param anastasis_pub account identifier | 381 | * @param account_pub account identifier |
383 | * @param[out] paid_until until when is the account paid up? | 382 | * @param[out] paid_until until when is the account paid up? |
384 | * @param[out] recovery_data_hash set to hash of @a recovery document | 383 | * @param[out] recovery_data_hash set to hash of @a recovery document |
385 | * @param[out] version set to the recovery policy version | 384 | * @param[out] version set to the recovery policy version |
@@ -388,7 +387,7 @@ struct ANASTASIS_DatabasePlugin | |||
388 | enum ANASTASIS_DB_AccountStatus | 387 | enum ANASTASIS_DB_AccountStatus |
389 | (*lookup_account)( | 388 | (*lookup_account)( |
390 | void *cls, | 389 | void *cls, |
391 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, | 390 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, |
392 | struct GNUNET_TIME_Absolute *paid_until, | 391 | struct GNUNET_TIME_Absolute *paid_until, |
393 | struct GNUNET_HashCode *recovery_data_hash, | 392 | struct GNUNET_HashCode *recovery_data_hash, |
394 | uint32_t *version); | 393 | uint32_t *version); |
@@ -420,7 +419,6 @@ struct ANASTASIS_DatabasePlugin | |||
420 | * @param payment_secret payment secret which the user must provide with every upload | 419 | * @param payment_secret payment secret which the user must provide with every upload |
421 | * @param truth_uuid unique identifier of the truth the user must satisfy the challenge | 420 | * @param truth_uuid unique identifier of the truth the user must satisfy the challenge |
422 | * @param[out] paid bool value to show if payment is paid | 421 | * @param[out] paid bool value to show if payment is paid |
423 | * @param[out] valid_counter bool value to show if post_counter is > 0 | ||
424 | * @return transaction status | 422 | * @return transaction status |
425 | */ | 423 | */ |
426 | enum GNUNET_DB_QueryStatus | 424 | enum GNUNET_DB_QueryStatus |
@@ -444,7 +442,7 @@ struct ANASTASIS_DatabasePlugin | |||
444 | enum GNUNET_DB_QueryStatus | 442 | enum GNUNET_DB_QueryStatus |
445 | (*increment_lifetime)( | 443 | (*increment_lifetime)( |
446 | void *cls, | 444 | void *cls, |
447 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, | 445 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, |
448 | const struct ANASTASIS_PaymentSecretP *payment_identifier, | 446 | const struct ANASTASIS_PaymentSecretP *payment_identifier, |
449 | struct GNUNET_TIME_Relative lifetime, | 447 | struct GNUNET_TIME_Relative lifetime, |
450 | struct GNUNET_TIME_Absolute *paid_until); | 448 | struct GNUNET_TIME_Absolute *paid_until); |
@@ -463,7 +461,7 @@ struct ANASTASIS_DatabasePlugin | |||
463 | enum GNUNET_DB_QueryStatus | 461 | enum GNUNET_DB_QueryStatus |
464 | (*update_lifetime)( | 462 | (*update_lifetime)( |
465 | void *cls, | 463 | void *cls, |
466 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, | 464 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, |
467 | const struct ANASTASIS_PaymentSecretP *payment_identifier, | 465 | const struct ANASTASIS_PaymentSecretP *payment_identifier, |
468 | struct GNUNET_TIME_Absolute eol); | 466 | struct GNUNET_TIME_Absolute eol); |
469 | 467 | ||
@@ -474,7 +472,7 @@ struct ANASTASIS_DatabasePlugin | |||
474 | * when we increment the account's lifetime.) | 472 | * when we increment the account's lifetime.) |
475 | * | 473 | * |
476 | * @param cls closure | 474 | * @param cls closure |
477 | * @param anastasis_pub anastasis's public key | 475 | * @param account_pub anastasis's public key |
478 | * @param post_counter how many uploads does @a amount pay for | 476 | * @param post_counter how many uploads does @a amount pay for |
479 | * @param payment_secret payment secret which the user must provide with every upload | 477 | * @param payment_secret payment secret which the user must provide with every upload |
480 | * @param amount how much we asked for | 478 | * @param amount how much we asked for |
@@ -483,7 +481,7 @@ struct ANASTASIS_DatabasePlugin | |||
483 | enum GNUNET_DB_QueryStatus | 481 | enum GNUNET_DB_QueryStatus |
484 | (*record_recdoc_payment)( | 482 | (*record_recdoc_payment)( |
485 | void *cls, | 483 | void *cls, |
486 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *anastasis_pub, | 484 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub, |
487 | uint32_t post_counter, | 485 | uint32_t post_counter, |
488 | const struct ANASTASIS_PaymentSecretP *payment_secret, | 486 | const struct ANASTASIS_PaymentSecretP *payment_secret, |
489 | const struct TALER_Amount *amount); | 487 | const struct TALER_Amount *amount); |
@@ -527,14 +525,14 @@ struct ANASTASIS_DatabasePlugin | |||
527 | * does not match, the retry counter will be decreased by one. | 525 | * does not match, the retry counter will be decreased by one. |
528 | * | 526 | * |
529 | * @param cls closure | 527 | * @param cls closure |
530 | * @param truth_pub identification of the challenge which the code corresponds to | 528 | * @param truth_uuid identification of the challenge which the code corresponds to |
531 | * @param hashed_code code which the user provided and wants to verify | 529 | * @param hashed_code code which the user provided and wants to verify |
532 | * @return transaction status | 530 | * @return transaction status |
533 | */ | 531 | */ |
534 | enum ANASTASIS_DB_CodeStatus | 532 | enum ANASTASIS_DB_CodeStatus |
535 | (*verify_challenge_code)( | 533 | (*verify_challenge_code)( |
536 | void *cls, | 534 | void *cls, |
537 | const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_pub, | 535 | const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid, |
538 | const struct GNUNET_HashCode *hashed_code); | 536 | const struct GNUNET_HashCode *hashed_code); |
539 | 537 | ||
540 | /** | 538 | /** |
@@ -600,7 +598,7 @@ struct ANASTASIS_DatabasePlugin | |||
600 | * Record refund for challenge. | 598 | * Record refund for challenge. |
601 | * | 599 | * |
602 | * @param cls closure | 600 | * @param cls closure |
603 | * @param truth_key identifier of the challenge to pay | 601 | * @param truth_uuid identifier of the challenge to refund |
604 | * @param payment_secret payment secret which the user must provide with every upload | 602 | * @param payment_secret payment secret which the user must provide with every upload |
605 | * @return transaction status | 603 | * @return transaction status |
606 | */ | 604 | */ |