diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-27 21:48:50 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-27 21:48:50 +0100 |
commit | 426f05adbd6320c335248f9b40da881efae31ad3 (patch) | |
tree | bd376286534b4a115280da792752abbf57029ba9 /src/mint | |
parent | bd42711209042d17cc596da195aebd0868ff4eeb (diff) |
fix typos, make tests build
Diffstat (limited to 'src/mint')
-rw-r--r-- | src/mint/taler-mint-httpd_keys.h | 1 | ||||
-rw-r--r-- | src/mint/test_mint_common.c | 13 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/mint/taler-mint-httpd_keys.h b/src/mint/taler-mint-httpd_keys.h index 596350345..4672c1359 100644 --- a/src/mint/taler-mint-httpd_keys.h +++ b/src/mint/taler-mint-httpd_keys.h @@ -25,6 +25,7 @@ #include <gnunet/gnunet_util_lib.h> #include <microhttpd.h> +#include <jansson.h> #include "taler-mint-httpd.h" #include "mint.h" diff --git a/src/mint/test_mint_common.c b/src/mint/test_mint_common.c index 7946f4f1a..99526b9da 100644 --- a/src/mint/test_mint_common.c +++ b/src/mint/test_mint_common.c @@ -13,17 +13,18 @@ You should have received a copy of the GNU General Public License along with TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> */ - /** * @file mint/test_mint_common.c * @brief test cases for some functions in mint/mint_common.c * @author Sree Harsha Totakura <sreeharsha@totakura.in> */ - #include "platform.h" #include "gnunet/gnunet_util_lib.h" #include "mint.h" +#define RSA_KEY_SIZE 1024 + + #define EXITIF(cond) \ do { \ if (cond) { GNUNET_break (0); goto EXITIF_exit; } \ @@ -52,13 +53,13 @@ main (int argc, const char *const argv[]) &dki.issue.signature, sizeof (dki) - offsetof (struct TALER_MINT_DenomKeyIssue, signature)); - dki.denom_priv = GNUNET_CRYPTO_rsa_private_key_create (); + dki.denom_priv = GNUNET_CRYPTO_rsa_private_key_create (RSA_KEY_SIZE); enc_size = GNUNET_CRYPTO_rsa_private_key_encode (dki.denom_priv, &enc); EXITIF (NULL == (tmpfile = GNUNET_DISK_mktemp ("test_mint_common"))); EXITIF (GNUNET_OK != TALER_MINT_write_denom_key (tmpfile, &dki)); EXITIF (GNUNET_OK != TALER_MINT_read_denom_key (tmpfile, &dki_read)); - enc_read_size = GNUNET_CRYPTO_rsa_privae_key_encode (dki_read.denom_priv, - &enc_read); + enc_read_size = GNUNET_CRYPTO_rsa_private_key_encode (dki_read.denom_priv, + &enc_read); EXITIF (enc_size != enc_read_size); EXITIF (0 != memcmp (enc, enc_read, @@ -76,6 +77,6 @@ main (int argc, const char *const argv[]) if (NULL != dki.denom_priv) GNUNET_CRYPTO_rsa_private_key_free (dki.denom_priv); if (NULL != dki_read.denom_priv) - GNUNET_CRYPOT_rsa_private_key_free (dki_read.denom_priv); + GNUNET_CRYPTO_rsa_private_key_free (dki_read.denom_priv); return ret; } |