From 868a4ce76d543aaf0de7a12dbbddd3fd1d4571b6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 23 Oct 2021 07:11:23 +0200 Subject: -resovling more FTBFS issues --- src/include/taler_crypto_lib.h | 27 +++++++++++++++++ src/include/taler_exchangedb_plugin.h | 2 +- src/include/taler_pq_lib.h | 57 ++++++++++++++++++++++++++++++++--- 3 files changed, 81 insertions(+), 5 deletions(-) (limited to 'src/include') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 185c29a1..561f2bd0 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -623,6 +623,33 @@ struct TALER_TrackTransferDetails }; +/** + * Free internals of @a denom_pub, but not @a denom_pub itself. + * + * @param[in] denom_pub key to free + */ +void +TALER_denom_pub_free (struct TALER_DenominationPublicKey *denom_pub); + + +/** + * Free internals of @a denom_priv, but not @a denom_priv itself. + * + * @param[in] denom_priv key to free + */ +void +TALER_denom_priv_free (struct TALER_DenominationPrivateKey *denom_priv); + + +/** + * Free internals of @a denom_sig, but not @a denom_sig itself. + * + * @param[in] denom_sig signature to free + */ +void +TALER_denom_sig_free (struct TALER_DenominationSignature *denom_sig); + + /** * Compute the hash of the given @a denom_pub. * diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 83040dbe..8b01ee65 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -1969,7 +1969,7 @@ typedef enum GNUNET_GenericReturnValue struct GNUNET_TIME_Absolute timestamp, const struct TALER_Amount *amount, const struct TALER_CoinSpendPublicKeyP *old_coin_pub, - const struct TLAER_DenominationHash *old_denom_pub_hash, + const struct TALER_DenominationHash *old_denom_pub_hash, const struct TALER_CoinPublicInfo *coin, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_CoinSpendSignatureP *coin_sig, diff --git a/src/include/taler_pq_lib.h b/src/include/taler_pq_lib.h index 4545b6d5..07057722 100644 --- a/src/include/taler_pq_lib.h +++ b/src/include/taler_pq_lib.h @@ -41,10 +41,10 @@ TALER_PQ_query_param_amount_nbo (const struct TALER_AmountNBO *x); /** - * Generate query parameter for a currency, consisting of the three - * components "value", "fraction" and "currency" in this order. The - * types must be a 64-bit integer, 32-bit integer and a - * #TALER_CURRENCY_LEN-sized BLOB/VARCHAR respectively. + * Generate query parameter for an amount, consisting of the two + * components "value" and "fraction" in this order. The + * types must be a 64-bit integer and a 32-bit integer + * respectively. The currency is dropped. * * @param x pointer to the query parameter to pass */ @@ -52,6 +52,31 @@ struct GNUNET_PQ_QueryParam TALER_PQ_query_param_amount (const struct TALER_Amount *x); +/** + * Generate query parameter for a denomination public + * key. Internally, the various attributes of the + * public key will be serialized into on variable-size + * BLOB. + * + * @param x pointer to the query parameter to pass + */ +struct GNUNET_PQ_QueryParam +TALER_PQ_query_param_denom_pub ( + const struct TALER_DenominationPublicKey *denom_pub); + + +/** + * Generate query parameter for a denomination signature. Internally, the + * various attributes of the signature will be serialized into on + * variable-size BLOB. + * + * @param x pointer to the query parameter to pass + */ +struct GNUNET_PQ_QueryParam +TALER_PQ_query_param_denom_sig ( + const struct TALER_DenominationSignature *denom_sig); + + /** * Generate query parameter for a JSON object (stored as a string * in the DB). Note that @a x must really be a JSON object or array, @@ -119,6 +144,30 @@ TALER_PQ_result_spec_amount (const char *name, struct TALER_Amount *amount); +/** + * Denomination public key expected. + * + * @param name name of the field in the table + * @param[out] denom_pub where to store the public key + * @return array entry for the result specification to use + */ +struct GNUNET_PQ_ResultSpec +TALER_PQ_result_spec_denom_pub (const char *name, + struct TALER_DenominationPublicKey *denom_pub); + + +/** + * Denomination signature expected. + * + * @param name name of the field in the table + * @param[out] denom_sig where to store the denomination signature + * @return array entry for the result specification to use + */ +struct GNUNET_PQ_ResultSpec +TALER_PQ_result_spec_denom_sig (const char *name, + struct TALER_DenominationSignature *denom_sig); + + /** * json_t expected. * -- cgit v1.2.3