diff options
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keys.h')
-rw-r--r-- | src/exchange/taler-exchange-httpd_keys.h | 77 |
1 files changed, 52 insertions, 25 deletions
diff --git a/src/exchange/taler-exchange-httpd_keys.h b/src/exchange/taler-exchange-httpd_keys.h index 8758afb71..e526385ff 100644 --- a/src/exchange/taler-exchange-httpd_keys.h +++ b/src/exchange/taler-exchange-httpd_keys.h @@ -154,6 +154,48 @@ struct TEH_KeyStateHandle; void TEH_check_invariants (void); +/** + * Clean up wire subsystem. + */ +void +TEH_wire_done (void); + + +/** + * Look up wire fee structure by @a ts. + * + * @param ts timestamp to lookup wire fees at + * @param method wire method to lookup fees for + * @return the wire fee details, or + * NULL if none are configured for @a ts and @a method + */ +const struct TALER_WireFeeSet * +TEH_wire_fees_by_time ( + struct GNUNET_TIME_Timestamp ts, + const char *method); + + +/** + * Initialize wire subsystem. + * + * @return #GNUNET_OK on success + */ +enum GNUNET_GenericReturnValue +TEH_wire_init (void); + + +/** + * Something changed in the database. Rebuild the wire replies. This function + * should be called if the exchange learns about a new signature from our + * master key. + * + * (We do not do so immediately, but merely signal to all threads that they + * need to rebuild their wire state upon the next call to + * #TEH_keys_get_state()). + */ +void +TEH_wire_update_state (void); + /** * Return the current key state for this thread. Possibly re-builds the key @@ -234,8 +276,8 @@ TEH_keys_denomination_by_hash ( * or NULL if @a h_denom_pub could not be found */ struct TEH_DenominationKey * -TEH_keys_denomination_by_hash2 ( - struct TEH_KeyStateHandle *ksh, +TEH_keys_denomination_by_hash_from_state ( + const struct TEH_KeyStateHandle *ksh, const struct TALER_DenominationHashP *h_denom_pub, struct MHD_Connection *conn, MHD_RESULT *mret); @@ -258,22 +300,7 @@ struct TEH_CoinSignData /** - * Request to sign @a csd for melting. - * - * @param csd identifies data to blindly sign and key to sign with - * @param for_melt true if this is for a melt operation - * @param[out] bs set to the blind signature on success - * @return #TALER_EC_NONE on success - */ -enum TALER_ErrorCode -TEH_keys_denomination_sign ( - const struct TEH_CoinSignData *csd, - bool for_melt, - struct TALER_BlindedDenominationSignature *bs); - - -/** - * Request to sign @a csds for melting. + * Request to sign @a csds. * * @param csds array with data to blindly sign (and keys to sign with) * @param csds_length length of @a csds array @@ -283,10 +310,10 @@ TEH_keys_denomination_sign ( */ enum TALER_ErrorCode TEH_keys_denomination_batch_sign ( - const struct TEH_CoinSignData *csds, unsigned int csds_length, + const struct TEH_CoinSignData csds[static csds_length], bool for_melt, - struct TALER_BlindedDenominationSignature *bss); + struct TALER_BlindedDenominationSignature bss[static csds_length]); /** @@ -302,7 +329,7 @@ struct TEH_CsDeriveData /** * Nonce to use. */ - const struct TALER_CsNonce *nonce; + const struct GNUNET_CRYPTO_CsSessionNonce *nonce; }; @@ -318,7 +345,7 @@ enum TALER_ErrorCode TEH_keys_denomination_cs_r_pub ( const struct TEH_CsDeriveData *cdd, bool for_melt, - struct TALER_DenominationCSPublicRPairP *r_pub); + struct GNUNET_CRYPTO_CSPublicRPairP *r_pub); /** @@ -333,10 +360,10 @@ TEH_keys_denomination_cs_r_pub ( */ enum TALER_ErrorCode TEH_keys_denomination_cs_batch_r_pub ( - const struct TEH_CsDeriveData *cdds, unsigned int cdds_length, + const struct TEH_CsDeriveData cdds[static cdds_length], bool for_melt, - struct TALER_DenominationCSPublicRPairP *r_pubs); + struct GNUNET_CRYPTO_CSPublicRPairP r_pubs[static cdds_length]); /** @@ -363,7 +390,7 @@ TEH_keys_finished (void); /** - * Resumse all suspended /keys requests, we may now have key material + * Resumes all suspended /keys requests, we may now have key material * (or are shutting down). * * @param do_shutdown are we shutting down? |