rename struct TALER_MINTDB_RefreshCommitLinkP to struct TALER_RefreshCommitLinkP
This commit is contained in:
parent
3ead9d772a
commit
6237981d96
@ -539,7 +539,7 @@ struct TALER_MINTDB_MeltCommitment
|
|||||||
/**
|
/**
|
||||||
* 2D-Array of #TALER_CNC_KAPPA and @e new_oldcoins links.
|
* 2D-Array of #TALER_CNC_KAPPA and @e new_oldcoins links.
|
||||||
*/
|
*/
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP *commit_links[TALER_CNC_KAPPA];
|
struct TALER_RefreshCommitLinkP *commit_links[TALER_CNC_KAPPA];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1002,7 +1002,7 @@ struct TALER_MINTDB_Plugin
|
|||||||
const struct GNUNET_HashCode *session_hash,
|
const struct GNUNET_HashCode *session_hash,
|
||||||
uint16_t cnc_index,
|
uint16_t cnc_index,
|
||||||
uint16_t num_links,
|
uint16_t num_links,
|
||||||
const struct TALER_MINTDB_RefreshCommitLinkP *commit_links);
|
const struct TALER_RefreshCommitLinkP *commit_links);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtain the commited (encrypted) refresh link data
|
* Obtain the commited (encrypted) refresh link data
|
||||||
@ -1024,7 +1024,7 @@ struct TALER_MINTDB_Plugin
|
|||||||
const struct GNUNET_HashCode *session_hash,
|
const struct GNUNET_HashCode *session_hash,
|
||||||
uint16_t cnc_index,
|
uint16_t cnc_index,
|
||||||
uint16_t num_links,
|
uint16_t num_links,
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP *links);
|
struct TALER_RefreshCommitLinkP *links);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -657,7 +657,7 @@ struct TALER_MintKeyValidityPS
|
|||||||
* Part of the construction of the refresh session's hash and
|
* Part of the construction of the refresh session's hash and
|
||||||
* thus of what is signed there.
|
* thus of what is signed there.
|
||||||
*/
|
*/
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP
|
struct TALER_RefreshCommitLinkP
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Transfer public key, used to decrypt the @e shared_secret_enc
|
* Transfer public key, used to decrypt the @e shared_secret_enc
|
||||||
|
@ -990,7 +990,7 @@ TALER_MINT_refresh_prepare (unsigned int num_melts,
|
|||||||
{
|
{
|
||||||
for (j = 0; j < num_melts; j++)
|
for (j = 0; j < num_melts; j++)
|
||||||
{
|
{
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP rcl;
|
struct TALER_RefreshCommitLinkP rcl;
|
||||||
struct TALER_TransferSecretP trans_sec;
|
struct TALER_TransferSecretP trans_sec;
|
||||||
|
|
||||||
GNUNET_CRYPTO_ecdhe_key_get_public (&md.melted_coins[j].transfer_priv[i].ecdhe_priv,
|
GNUNET_CRYPTO_ecdhe_key_get_public (&md.melted_coins[j].transfer_priv[i].ecdhe_priv,
|
||||||
@ -1003,7 +1003,7 @@ TALER_MINT_refresh_prepare (unsigned int num_melts,
|
|||||||
&rcl.shared_secret_enc);
|
&rcl.shared_secret_enc);
|
||||||
GNUNET_CRYPTO_hash_context_read (hash_context,
|
GNUNET_CRYPTO_hash_context_read (hash_context,
|
||||||
&rcl,
|
&rcl,
|
||||||
sizeof (struct TALER_MINTDB_RefreshCommitLinkP));
|
sizeof (struct TALER_RefreshCommitLinkP));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,7 +623,7 @@ TMH_DB_execute_refresh_melt (struct MHD_Connection *connection,
|
|||||||
unsigned int coin_count,
|
unsigned int coin_count,
|
||||||
const struct TMH_DB_MeltDetails *coin_melt_details,
|
const struct TMH_DB_MeltDetails *coin_melt_details,
|
||||||
struct TALER_MINTDB_RefreshCommitCoin *const* commit_coin,
|
struct TALER_MINTDB_RefreshCommitCoin *const* commit_coin,
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP *const* commit_link)
|
struct TALER_RefreshCommitLinkP *const* commit_link)
|
||||||
{
|
{
|
||||||
struct TMH_KS_StateHandle *key_state;
|
struct TMH_KS_StateHandle *key_state;
|
||||||
struct TALER_MINTDB_RefreshSession refresh_session;
|
struct TALER_MINTDB_RefreshSession refresh_session;
|
||||||
@ -839,11 +839,11 @@ check_commitment (struct MHD_Connection *connection,
|
|||||||
unsigned int j;
|
unsigned int j;
|
||||||
struct TALER_LinkSecretP last_shared_secret;
|
struct TALER_LinkSecretP last_shared_secret;
|
||||||
int secret_initialized = GNUNET_NO;
|
int secret_initialized = GNUNET_NO;
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP *commit_links;
|
struct TALER_RefreshCommitLinkP *commit_links;
|
||||||
struct TALER_MINTDB_RefreshCommitCoin *commit_coins;
|
struct TALER_MINTDB_RefreshCommitCoin *commit_coins;
|
||||||
|
|
||||||
commit_links = GNUNET_malloc (num_oldcoins *
|
commit_links = GNUNET_malloc (num_oldcoins *
|
||||||
sizeof (struct TALER_MINTDB_RefreshCommitLinkP));
|
sizeof (struct TALER_RefreshCommitLinkP));
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TMH_plugin->get_refresh_commit_links (TMH_plugin->cls,
|
TMH_plugin->get_refresh_commit_links (TMH_plugin->cls,
|
||||||
session,
|
session,
|
||||||
|
@ -130,7 +130,7 @@ TMH_DB_execute_refresh_melt (struct MHD_Connection *connection,
|
|||||||
unsigned int coin_count,
|
unsigned int coin_count,
|
||||||
const struct TMH_DB_MeltDetails *coin_melt_details,
|
const struct TMH_DB_MeltDetails *coin_melt_details,
|
||||||
struct TALER_MINTDB_RefreshCommitCoin *const* commit_coin,
|
struct TALER_MINTDB_RefreshCommitCoin *const* commit_coin,
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP *const* commit_link);
|
struct TALER_RefreshCommitLinkP *const* commit_link);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,7 +57,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection,
|
|||||||
const struct TMH_DB_MeltDetails *coin_melt_details,
|
const struct TMH_DB_MeltDetails *coin_melt_details,
|
||||||
const struct GNUNET_HashCode *session_hash,
|
const struct GNUNET_HashCode *session_hash,
|
||||||
struct TALER_MINTDB_RefreshCommitCoin *const* commit_coin,
|
struct TALER_MINTDB_RefreshCommitCoin *const* commit_coin,
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP *const* commit_link)
|
struct TALER_RefreshCommitLinkP *const* commit_link)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
struct TMH_KS_StateHandle *key_state;
|
struct TMH_KS_StateHandle *key_state;
|
||||||
@ -324,7 +324,7 @@ free_commit_coins (struct TALER_MINTDB_RefreshCommitCoin **commit_coin,
|
|||||||
* @param num_old_coins size of 2nd dimension
|
* @param num_old_coins size of 2nd dimension
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
free_commit_links (struct TALER_MINTDB_RefreshCommitLinkP **commit_link,
|
free_commit_links (struct TALER_RefreshCommitLinkP **commit_link,
|
||||||
unsigned int kappa,
|
unsigned int kappa,
|
||||||
unsigned int num_old_coins)
|
unsigned int num_old_coins)
|
||||||
{
|
{
|
||||||
@ -378,7 +378,7 @@ handle_refresh_melt_json (struct MHD_Connection *connection,
|
|||||||
struct GNUNET_HashCode session_hash;
|
struct GNUNET_HashCode session_hash;
|
||||||
struct GNUNET_HashContext *hash_context;
|
struct GNUNET_HashContext *hash_context;
|
||||||
struct TALER_MINTDB_RefreshCommitCoin *commit_coin[TALER_CNC_KAPPA];
|
struct TALER_MINTDB_RefreshCommitCoin *commit_coin[TALER_CNC_KAPPA];
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP *commit_link[TALER_CNC_KAPPA];
|
struct TALER_RefreshCommitLinkP *commit_link[TALER_CNC_KAPPA];
|
||||||
|
|
||||||
/* For the signature check, we hash most of the inputs together
|
/* For the signature check, we hash most of the inputs together
|
||||||
(except for the signatures on the coins). */
|
(except for the signatures on the coins). */
|
||||||
@ -532,10 +532,10 @@ handle_refresh_melt_json (struct MHD_Connection *connection,
|
|||||||
for (i = 0; i < TALER_CNC_KAPPA; i++)
|
for (i = 0; i < TALER_CNC_KAPPA; i++)
|
||||||
{
|
{
|
||||||
commit_link[i] = GNUNET_malloc (num_oldcoins *
|
commit_link[i] = GNUNET_malloc (num_oldcoins *
|
||||||
sizeof (struct TALER_MINTDB_RefreshCommitLinkP));
|
sizeof (struct TALER_RefreshCommitLinkP));
|
||||||
for (j = 0; j < num_oldcoins; j++)
|
for (j = 0; j < num_oldcoins; j++)
|
||||||
{
|
{
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP *rcl = &commit_link[i][j];
|
struct TALER_RefreshCommitLinkP *rcl = &commit_link[i][j];
|
||||||
|
|
||||||
res = TMH_PARSE_navigate_json (connection,
|
res = TMH_PARSE_navigate_json (connection,
|
||||||
transfer_pubs,
|
transfer_pubs,
|
||||||
@ -582,7 +582,7 @@ handle_refresh_melt_json (struct MHD_Connection *connection,
|
|||||||
|
|
||||||
GNUNET_CRYPTO_hash_context_read (hash_context,
|
GNUNET_CRYPTO_hash_context_read (hash_context,
|
||||||
rcl,
|
rcl,
|
||||||
sizeof (struct TALER_MINTDB_RefreshCommitLinkP));
|
sizeof (struct TALER_RefreshCommitLinkP));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -900,7 +900,7 @@ TMH_RESPONSE_reply_refresh_reveal_missmatch (struct MHD_Connection *connection,
|
|||||||
info_link_k = json_array ();
|
info_link_k = json_array ();
|
||||||
for (i=0;i<mc->num_newcoins;i++)
|
for (i=0;i<mc->num_newcoins;i++)
|
||||||
{
|
{
|
||||||
const struct TALER_MINTDB_RefreshCommitLinkP *cl;
|
const struct TALER_RefreshCommitLinkP *cl;
|
||||||
json_t *cl_json;
|
json_t *cl_json;
|
||||||
|
|
||||||
cl = &mc->commit_links[k][i];
|
cl = &mc->commit_links[k][i];
|
||||||
|
@ -2640,7 +2640,7 @@ postgres_insert_refresh_commit_links (void *cls,
|
|||||||
const struct GNUNET_HashCode *session_hash,
|
const struct GNUNET_HashCode *session_hash,
|
||||||
uint16_t cnc_index,
|
uint16_t cnc_index,
|
||||||
uint16_t num_links,
|
uint16_t num_links,
|
||||||
const struct TALER_MINTDB_RefreshCommitLinkP *links)
|
const struct TALER_RefreshCommitLinkP *links)
|
||||||
{
|
{
|
||||||
// FIXME: check logic! links is array!
|
// FIXME: check logic! links is array!
|
||||||
struct TALER_PQ_QueryParam params[] = {
|
struct TALER_PQ_QueryParam params[] = {
|
||||||
@ -2693,7 +2693,7 @@ postgres_get_refresh_commit_links (void *cls,
|
|||||||
const struct GNUNET_HashCode *session_hash,
|
const struct GNUNET_HashCode *session_hash,
|
||||||
uint16_t cnc_index,
|
uint16_t cnc_index,
|
||||||
uint16_t num_links,
|
uint16_t num_links,
|
||||||
struct TALER_MINTDB_RefreshCommitLinkP *links)
|
struct TALER_RefreshCommitLinkP *links)
|
||||||
{
|
{
|
||||||
// FIXME: check logic: was written for a single link!
|
// FIXME: check logic: was written for a single link!
|
||||||
struct TALER_PQ_QueryParam params[] = {
|
struct TALER_PQ_QueryParam params[] = {
|
||||||
@ -2801,7 +2801,7 @@ postgres_get_melt_commitment (void *cls,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
mc->commit_links[cnc_index]
|
mc->commit_links[cnc_index]
|
||||||
= GNUNET_malloc (mc->num_oldcoins *
|
= GNUNET_malloc (mc->num_oldcoins *
|
||||||
sizeof (struct TALER_MINTDB_RefreshCommitLinkP));
|
sizeof (struct TALER_RefreshCommitLinkP));
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
postgres_get_refresh_commit_links (cls,
|
postgres_get_refresh_commit_links (cls,
|
||||||
session,
|
session,
|
||||||
|
Loading…
Reference in New Issue
Block a user