donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 3694202581271d1c86e80a936090cb6d1213a1cf
parent 402e25888c4df70a3fad9e7727c91c247ed49a88
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
Date:   Sun, 15 Oct 2023 18:31:30 +0200

[header] some changes

Diffstat:
Msrc/include/taler_donau_service.h | 88++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
1 file changed, 49 insertions(+), 39 deletions(-)

diff --git a/src/include/taler_donau_service.h b/src/include/taler_donau_service.h @@ -36,7 +36,7 @@ /** * Regular online message signing key used by Donau. */ -struct TALER_DONAU_PublicKeyP +struct TALER_DONAU_EddsaPublicKeyP { /** * Donau uses EdDSA for online signing. @@ -54,7 +54,7 @@ struct TALER_DONAU_SigningPublicKeyAndValidity /** * The signing public key */ - struct TALER_DonauPublicKeyP key; + struct TALER_DONAU_EddsaPublicKeyP key; /** * Tax year this key is valid for. @@ -73,7 +73,7 @@ struct TALER_DonationUnitPublicKey /** * Type of the public key (RSA or CS). */ - enum TALER_DonationUnitCipher cipher; + enum TALER_DenominationCipher cipher; /** * Details, depending on @e cipher. @@ -81,14 +81,14 @@ struct TALER_DonationUnitPublicKey union { /** - * If we use #TALER_DONATION_UNIT_CS in @a cipher. + * If we use #TALER_DENOMINATION_CS in @a cipher. */ struct GNUNET_CRYPTO_CsPublicKey cs_public_key; /** - * If we use #TALER_DONATION_UNIT_RSA in @a cipher. + * If we use #TALER_DENOMINATION_RSA in @a cipher. */ - struct GNUNET_CRYPTO_RsaPublicKey rsa_public_key; + struct GNUNET_CRYPTO_RsaPublicKey *rsa_public_key; } details; }; @@ -96,7 +96,7 @@ struct TALER_DonationUnitPublicKey /** * @brief Public information about a donau's donation unit signing key */ -struct TALER_DONAU_DonationUnitInformation +struct TALER_DonationUnitInformation { /** * The public key @@ -129,7 +129,7 @@ struct TALER_DONAU_Keys /** * Array of the donau'sdonation unit keys. */ - struct TALER_DONAU_DonationUnitInformation *donation_unit_keys; + struct TALER_DonationUnitInformation *donation_unit_keys; /** * Supported protocol version by the donau. @@ -336,9 +336,9 @@ struct TALER_DONAU_GetKeysHandle; /** * Fetch the main /keys resources from an donau. Does an incremental - * fetch if @a last_keys is given. The obtained information will be passed to + * fetch if @a last_keys is given. The obtained information will be passed to * the @a cert_cb (possibly after first merging it with @a last_keys to - * produce a full picture; expired keys (for ) will be removed from @a + * produce a full picture; expired keys will be removed from @a * last_keys if there are any). * * @param ctx the context @@ -413,14 +413,15 @@ TALER_DONAU_keys_decref (struct TALER_DONAU_Keys *keys); * according to @a keys. * * @param keys the donau's key set - * @param pub claimed current online signing key for the donau - * // +year? - * @return #GNUNET_OK if @a pub is (according to /keys) a current signing key + * @param pub claimed online signing key for the donau + * @param year given year + * @return #GNUNET_OK if @a pub is (according to /keys and @a year) the corresponding signing key */ enum GNUNET_GenericReturnValue TALER_DONAU_test_signing_key ( const struct TALER_DONAU_Keys *keys, - const struct TALER_DonauPublicKeyP *pub); + const unsigned int year, + const struct TALER_DONAU_EddsaPublicKeyP *pub); /** @@ -431,20 +432,21 @@ TALER_DONAU_test_signing_key ( * @return details about the given donation unit key, NULL if the key is not * found */ -const struct TALER_DONAU_DonationUnitInformation * +const struct TALER_DonationUnitInformation * TALER_DONAU_get_donation_unit_key ( const struct TALER_DONAU_Keys *keys, const struct TALER_DonationUnitPublicKey *pk); /** - * Obtain thedonation unit key details from the donau. + * Obtain the donation unit key details from the donau. * * @param keys the donau's key set - * @param hc hash of the public key of thedonation unit to lookup - * @return details about the givendonation unit key + * @param hc hash of the public key of the donation unit to lookup + * @return details about the given donation unit key, returns NULL + * if the key is not available or deprecated. */ -const struct TALER_DONAU_DonationUnitPublicKey * +const struct TALER_DonationUnitPublicKey * TALER_DONAU_get_donation_unit_key_by_hash ( const struct TALER_DONAU_Keys *keys, const struct TALER_DonationUnitHashP *hc); @@ -458,13 +460,13 @@ TALER_DONAU_get_donation_unit_key_by_hash ( * @param donau_pub public key to lookup * @return NULL on error (@a donau_pub not known) */ -const struct TALER_DONAU_SigningPublicKey * +const struct TALER_DONAU_SigningPublicKeyAndValidity * TALER_DONAU_get_signing_key_info ( const struct TALER_DONAU_Keys *keys, - const struct TALER_DonauPublicKeyP *donau_pub); + const struct TALER_DONAU_EddsaPublicKeyP *donau_pub); -/* ********************* POST /submit *********************** */ +/* ********************* POST / issue receipt *********************** */ /** @@ -475,7 +477,7 @@ struct TALER_BlindedDonationEnvelope /** * Type of the sign blinded message */ - enum TALER_DenominationCipher cipher; + enum TALER_DonationUnitCipher cipher; /** * Details, depending on @e cipher. @@ -519,14 +521,14 @@ struct TALER_DONAU_BlindedDonationReceipt /** * @brief A Batch Submit Handle */ -struct TALER_DONAU_BatchSubmitHandle; +struct TALER_DONAU_BatchIssueReceiptHandle; /** * Structure with information about a batch * operation's result. */ -struct TALER_DONAU_BatchSubmitResult +struct TALER_DONAU_BatchIssueReceiptResult { /** * HTTP response data @@ -641,7 +643,15 @@ TALER_DONAU_donor_receipts_to_statement ( TALER_DONAU_XXXBatchSubmitResultCallback cb, void *cb_cls); -// + _cancel +/** + * Cancel a batch permission request. This function cannot be used + * on a request handle if a response is already served for it. + * + * @param[in] the deposit permission request handle + */ +void +TALER_DONAU_donor_receipts_to_statement_cancel ( + struct TALER_DONAU_BatchSubmitHandle *); @@ -724,7 +734,7 @@ struct TALER_DONAU_CsRBatchIssueHandle * TALER_DONAU_csr_batch_issue ( struct GNUNET_CURL_Context *curl_ctx, const char *donau_url, - const struct TALER_DONAU_DonationUnitPublicKey *pk, + const struct TALER_DonationUnitPublicKey *pk, const struct TALER_CsNonce *nonce, TALER_DONAU_CsRBatchIssueCallback res_cb, void *res_cb_cls); @@ -770,7 +780,7 @@ struct CharityIssueReceiptTransaction * Charity's eddsa signature. */ struct TALER_DonauSignatureP donau_sig; -} +}; /** @@ -950,7 +960,7 @@ struct TALER_DONAU_BatchIssueCoinInput /** *donation unit of the coin. */ - const struct TALER_DONAU_DonationUnitPublicKey *pk; + const struct TALER_DonationUnitPublicKey *pk; /** * Master key material for the coin. @@ -1475,7 +1485,7 @@ struct TALER_DONAU_GetSubmitResponse * donau key used to sign, all zeros if donau did not * yet execute the transaction */ - struct TALER_DonauPublicKeyP donau_pub; + struct TALER_DONAU_EddsaPublicKeyP donau_pub; /** * signature from the donau over the data, all zeros if donau did not @@ -1602,7 +1612,7 @@ TALER_DONAU_s_get_cancel ( */ enum GNUNET_GenericReturnValue TALER_DONAU_verify_coin_history ( - const struct TALER_DONAU_DonationUnitPublicKey *dk, + const struct TALER_DonationUnitPublicKey *dk, const struct TALER_CoinSpendPublicKeyP *coin_pub, const json_t *history, struct TALER_Amount *total); @@ -1660,7 +1670,7 @@ struct TALER_DONAU_FutureSigningPublicKey /** * The signing public key */ - struct TALER_DonauPublicKeyP key; + struct TALER_DONAU_EddsaPublicKeyP key; /** * Signature by the security module affirming it owns this key. @@ -1887,7 +1897,7 @@ struct TALER_DONAU_SigningKeySignature /** * The signing public key */ - struct TALER_DonauPublicKeyP donau_pub; + struct TALER_DONAU_EddsaPublicKeyP donau_pub; /** * Signature over this signing key by the donau's master signature. @@ -1901,7 +1911,7 @@ struct TALER_DONAU_SigningKeySignature /** * @brief Public information about a signature on an donau'sdonation unit key */ -struct TALER_DONAU_DonationUnitKeySignature +struct TALER_DonationUnitKeySignature { /** * The hash of thedonation unit's public key @@ -1931,7 +1941,7 @@ struct TALER_DONAU_ManagementPostKeysData /** * Array of the master signatures for the donau'sdonation unit keys. */ - struct TALER_DONAU_DonationUnitKeySignature *donation_unit_sigs; + struct TALER_DonationUnitKeySignature *donation_unit_sigs; /** * Length of the @e sign_keys array (number of valid entries). @@ -2255,7 +2265,7 @@ struct TALER_DONAU_ManagementRevokeSigningKeyHandle * TALER_DONAU_management_revoke_signing_key ( struct GNUNET_CURL_Context *ctx, const char *url, - const struct TALER_DonauPublicKeyP *donau_pub, + const struct TALER_DONAU_EddsaPublicKeyP *donau_pub, const struct TALER_MasterSignatureP *master_sig, TALER_DONAU_ManagementRevokeSigningKeyCallback cb, void *cb_cls); @@ -3449,7 +3459,7 @@ struct TALER_DONAU_PurseCreateSubmitResponse * Signing key used by the donau to sign the * purse create with confirmation. */ - struct TALER_DonauPublicKeyP donau_pub; + struct TALER_DONAU_EddsaPublicKeyP donau_pub; /** * Signature from the donau on the @@ -3656,7 +3666,7 @@ struct TALER_DONAU_AccountMergeResponse /** * Online signing key used by the donau. */ - struct TALER_DonauPublicKeyP donau_pub; + struct TALER_DONAU_EddsaPublicKeyP donau_pub; /** * Timestamp of the donau for @e donau_sig. @@ -4249,7 +4259,7 @@ struct TALER_DONAU_charityPostAttestResult /** * Online signing key used by the donau. */ - struct TALER_DonauPublicKeyP donau_pub; + struct TALER_DONAU_EddsaPublicKeyP donau_pub; /** * Attributes being confirmed by the donau.