diff options
Diffstat (limited to 'src/mint/taler-mint-keyup.c')
-rw-r--r-- | src/mint/taler-mint-keyup.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/mint/taler-mint-keyup.c b/src/mint/taler-mint-keyup.c index 263618ade..c2a326566 100644 --- a/src/mint/taler-mint-keyup.c +++ b/src/mint/taler-mint-keyup.c | |||
@@ -105,7 +105,7 @@ static struct GNUNET_CRYPTO_EddsaPublicKey *master_pub; | |||
105 | static struct GNUNET_TIME_Absolute lookahead_sign_stamp; | 105 | static struct GNUNET_TIME_Absolute lookahead_sign_stamp; |
106 | 106 | ||
107 | 107 | ||
108 | int | 108 | static int |
109 | config_get_denom (const char *section, const char *option, struct TALER_Amount *denom) | 109 | config_get_denom (const char *section, const char *option, struct TALER_Amount *denom) |
110 | { | 110 | { |
111 | char *str; | 111 | char *str; |
@@ -117,7 +117,7 @@ config_get_denom (const char *section, const char *option, struct TALER_Amount * | |||
117 | } | 117 | } |
118 | 118 | ||
119 | 119 | ||
120 | char * | 120 | static char * |
121 | get_signkey_dir () | 121 | get_signkey_dir () |
122 | { | 122 | { |
123 | char *dir; | 123 | char *dir; |
@@ -128,7 +128,7 @@ get_signkey_dir () | |||
128 | } | 128 | } |
129 | 129 | ||
130 | 130 | ||
131 | char * | 131 | static char * |
132 | get_signkey_file (struct GNUNET_TIME_Absolute start) | 132 | get_signkey_file (struct GNUNET_TIME_Absolute start) |
133 | { | 133 | { |
134 | char *dir; | 134 | char *dir; |
@@ -140,13 +140,12 @@ get_signkey_file (struct GNUNET_TIME_Absolute start) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | 142 | ||
143 | |||
144 | /** | 143 | /** |
145 | * Hash the data defining the coin type. | 144 | * Hash the data defining the coin type. |
146 | * Exclude information that may not be the same for all | 145 | * Exclude information that may not be the same for all |
147 | * instances of the coin type (i.e. the anchor, overlap). | 146 | * instances of the coin type (i.e. the anchor, overlap). |
148 | */ | 147 | */ |
149 | void | 148 | static void |
150 | hash_coin_type (const struct CoinTypeParams *p, struct GNUNET_HashCode *hash) | 149 | hash_coin_type (const struct CoinTypeParams *p, struct GNUNET_HashCode *hash) |
151 | { | 150 | { |
152 | struct CoinTypeNBO p_nbo; | 151 | struct CoinTypeNBO p_nbo; |
@@ -254,7 +253,7 @@ get_anchor_iter (void *cls, | |||
254 | * @param overlap what's the overlap between the keys validity period? | 253 | * @param overlap what's the overlap between the keys validity period? |
255 | * @param[out] anchor the timestamp where the first new key should be generated | 254 | * @param[out] anchor the timestamp where the first new key should be generated |
256 | */ | 255 | */ |
257 | void | 256 | static void |
258 | get_anchor (const char *dir, | 257 | get_anchor (const char *dir, |
259 | struct GNUNET_TIME_Relative duration, | 258 | struct GNUNET_TIME_Relative duration, |
260 | struct GNUNET_TIME_Relative overlap, | 259 | struct GNUNET_TIME_Relative overlap, |
@@ -291,6 +290,7 @@ get_anchor (const char *dir, | |||
291 | // anchor is now the stamp where we need to create a new key | 290 | // anchor is now the stamp where we need to create a new key |
292 | } | 291 | } |
293 | 292 | ||
293 | |||
294 | static void | 294 | static void |
295 | create_signkey_issue_priv (struct GNUNET_TIME_Absolute start, | 295 | create_signkey_issue_priv (struct GNUNET_TIME_Absolute start, |
296 | struct GNUNET_TIME_Relative duration, | 296 | struct GNUNET_TIME_Relative duration, |
@@ -327,7 +327,7 @@ check_signkey_valid (const char *signkey_filename) | |||
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
330 | int | 330 | static int |
331 | mint_keys_update_signkeys () | 331 | mint_keys_update_signkeys () |
332 | { | 332 | { |
333 | struct GNUNET_TIME_Relative signkey_duration; | 333 | struct GNUNET_TIME_Relative signkey_duration; |
@@ -377,7 +377,7 @@ mint_keys_update_signkeys () | |||
377 | } | 377 | } |
378 | 378 | ||
379 | 379 | ||
380 | int | 380 | static int |
381 | get_cointype_params (const char *ct, struct CoinTypeParams *params) | 381 | get_cointype_params (const char *ct, struct CoinTypeParams *params) |
382 | { | 382 | { |
383 | const char *dir; | 383 | const char *dir; |
@@ -434,8 +434,8 @@ static void | |||
434 | create_denomkey_issue (struct CoinTypeParams *params, | 434 | create_denomkey_issue (struct CoinTypeParams *params, |
435 | struct TALER_MINT_DenomKeyIssuePriv *dki) | 435 | struct TALER_MINT_DenomKeyIssuePriv *dki) |
436 | { | 436 | { |
437 | GNUNET_assert (NULL != (dki->denom_priv = TALER_RSA_key_create ())); | 437 | GNUNET_assert (NULL != (dki->denom_priv = GNUNET_CRYPTO_rsa_private_key_create ())); |
438 | TALER_RSA_key_get_public (dki->denom_priv, &dki->issue.denom_pub); | 438 | dki->issue.denom_pub = GNUNET_CRYPTO_rsa_private_key_get_get_public (dki->denom_priv); |
439 | dki->issue.master = *master_pub; | 439 | dki->issue.master = *master_pub; |
440 | dki->issue.start = GNUNET_TIME_absolute_hton (params->anchor); | 440 | dki->issue.start = GNUNET_TIME_absolute_hton (params->anchor); |
441 | dki->issue.expire_withdraw = | 441 | dki->issue.expire_withdraw = |
@@ -470,7 +470,7 @@ check_cointype_valid (const char *filename, struct CoinTypeParams *params) | |||
470 | } | 470 | } |
471 | 471 | ||
472 | 472 | ||
473 | int | 473 | static int |
474 | mint_keys_update_cointype (const char *coin_alias) | 474 | mint_keys_update_cointype (const char *coin_alias) |
475 | { | 475 | { |
476 | struct CoinTypeParams p; | 476 | struct CoinTypeParams p; |
@@ -496,7 +496,7 @@ mint_keys_update_cointype (const char *coin_alias) | |||
496 | printf ("Target path: %s\n", dkf); | 496 | printf ("Target path: %s\n", dkf); |
497 | create_denomkey_issue (&p, &denomkey_issue); | 497 | create_denomkey_issue (&p, &denomkey_issue); |
498 | ret = TALER_MINT_write_denom_key (dkf, &denomkey_issue); | 498 | ret = TALER_MINT_write_denom_key (dkf, &denomkey_issue); |
499 | TALER_RSA_key_free (denomkey_issue.denom_priv); | 499 | GNUNET_CRYPTO_rsa_private_key_free (denomkey_issue.denom_priv); |
500 | if (GNUNET_OK != ret) | 500 | if (GNUNET_OK != ret) |
501 | { | 501 | { |
502 | fprintf (stderr, "Can't write to file '%s'\n", dkf); | 502 | fprintf (stderr, "Can't write to file '%s'\n", dkf); |
@@ -514,7 +514,7 @@ mint_keys_update_cointype (const char *coin_alias) | |||
514 | } | 514 | } |
515 | 515 | ||
516 | 516 | ||
517 | int | 517 | static int |
518 | mint_keys_update_denomkeys () | 518 | mint_keys_update_denomkeys () |
519 | { | 519 | { |
520 | char *coin_types; | 520 | char *coin_types; |
@@ -659,4 +659,3 @@ main (int argc, char *const *argv) | |||
659 | return 1; | 659 | return 1; |
660 | return 0; | 660 | return 0; |
661 | } | 661 | } |
662 | |||