summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-26 12:22:56 +0100
committerChristian Grothoff <christian@grothoff.org>2015-01-26 12:22:56 +0100
commit52591a77f01fadfd748b01a4fd101e50bd473661 (patch)
tree57a4aae90d96d19d91009d21a8161213ffcf0300 /src
parentae917eeee0a3100538cf71972a0cadcc80098d80 (diff)
parent734fd0aa2ef46a718dcddf73fa45b898535b9756 (diff)
downloadexchange-52591a77f01fadfd748b01a4fd101e50bd473661.tar.gz
exchange-52591a77f01fadfd748b01a4fd101e50bd473661.tar.bz2
exchange-52591a77f01fadfd748b01a4fd101e50bd473661.zip
intermediary commit, breaking the build by starting to move towards variable-size GNUnet signatures instead of fixed-size signatures; much broken now
Diffstat (limited to 'src')
-rw-r--r--src/lib/Makefile.am7
-rw-r--r--src/util/test_rsa.c26
2 files changed, 18 insertions, 15 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 5c740fe29..8632fc15b 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -1,10 +1,9 @@
-AM_CPPFLAGS = -I$(top_srcdir)/src/include $(POSTGRESQL_CPPFLAGS)
+AM_CPPFLAGS = -I$(top_srcdir)/src/include
lib_LTLIBRARIES = \
libtalermint.la
libtalermint_la_LDFLAGS = \
- $(POSTGRESQL_LDFLAGS) \
-version-info 0:0:0 \
-no-undefined
@@ -16,10 +15,6 @@ libtalermint_la_LIBADD = \
-ljansson \
-lcurl
-libtalermint_la_LDFLAGS = \
- -version-info 0:0:0 \
- -no-undefined
-
check_PROGRAMS = \
test_mint_api
diff --git a/src/util/test_rsa.c b/src/util/test_rsa.c
index 85114843d..fdacf5212 100644
--- a/src/util/test_rsa.c
+++ b/src/util/test_rsa.c
@@ -38,7 +38,7 @@
int
main (int argc, char *argv[])
{
-#define RND_BLK_SIZE 4096
+#define RND_BLK_SIZE 16524
unsigned char rnd_blk[RND_BLK_SIZE];
struct TALER_RSA_PrivateKey *priv;
struct TALER_RSA_PrivateKeyBinaryEncoded *priv_enc;
@@ -69,11 +69,13 @@ main (int argc, char *argv[])
ntohs (priv_enc->len))));
GNUNET_free (priv_enc);
priv_enc = NULL;
- EXITIF (GNUNET_OK != TALER_RSA_hash_verify (&hash,
- &sig,
- &pubkey));
- EXITIF (GNUNET_OK != TALER_RSA_verify (rnd_blk,
- RND_BLK_SIZE,
+ EXITIF (GNUNET_OK != TALER_RSA_verify (&hash, sizeof (hash),
+ &sig,
+ &pubkey));
+ /* corrupt our hash and see if the signature is still valid */
+ GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, &hash,
+ sizeof (struct GNUNET_HashCode));
+ EXITIF (GNUNET_OK == TALER_RSA_verify (&hash, sizeof (hash),
&sig,
&pubkey));
@@ -93,9 +95,15 @@ main (int argc, char *argv[])
EXITIF (GNUNET_OK != TALER_RSA_unblind (&sig,
bkey,
&pubkey));
- EXITIF (GNUNET_OK != TALER_RSA_hash_verify (&hash,
- &sig,
- &pubkey));
+ EXITIF (GNUNET_OK != TALER_RSA_verify (&hash, sizeof (hash),
+ &sig,
+ &pubkey));
+ /* corrupt our hash and see if the signature is still valid */
+ GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, &hash,
+ sizeof (struct GNUNET_HashCode));
+ EXITIF (GNUNET_OK == TALER_RSA_verify (&hash, sizeof (hash),
+ &sig,
+ &pubkey));
ret = 0; /* all OK */
EXITIF_exit: