intermediary commit, breaking the build by starting to move towards variable-size GNUnet signatures instead of fixed-size signatures; much broken now
This commit is contained in:
commit
52591a77f0
@ -1,10 +1,9 @@
|
|||||||
AM_CPPFLAGS = -I$(top_srcdir)/src/include $(POSTGRESQL_CPPFLAGS)
|
AM_CPPFLAGS = -I$(top_srcdir)/src/include
|
||||||
|
|
||||||
lib_LTLIBRARIES = \
|
lib_LTLIBRARIES = \
|
||||||
libtalermint.la
|
libtalermint.la
|
||||||
|
|
||||||
libtalermint_la_LDFLAGS = \
|
libtalermint_la_LDFLAGS = \
|
||||||
$(POSTGRESQL_LDFLAGS) \
|
|
||||||
-version-info 0:0:0 \
|
-version-info 0:0:0 \
|
||||||
-no-undefined
|
-no-undefined
|
||||||
|
|
||||||
@ -16,10 +15,6 @@ libtalermint_la_LIBADD = \
|
|||||||
-ljansson \
|
-ljansson \
|
||||||
-lcurl
|
-lcurl
|
||||||
|
|
||||||
libtalermint_la_LDFLAGS = \
|
|
||||||
-version-info 0:0:0 \
|
|
||||||
-no-undefined
|
|
||||||
|
|
||||||
check_PROGRAMS = \
|
check_PROGRAMS = \
|
||||||
test_mint_api
|
test_mint_api
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#define RND_BLK_SIZE 4096
|
#define RND_BLK_SIZE 16524
|
||||||
unsigned char rnd_blk[RND_BLK_SIZE];
|
unsigned char rnd_blk[RND_BLK_SIZE];
|
||||||
struct TALER_RSA_PrivateKey *priv;
|
struct TALER_RSA_PrivateKey *priv;
|
||||||
struct TALER_RSA_PrivateKeyBinaryEncoded *priv_enc;
|
struct TALER_RSA_PrivateKeyBinaryEncoded *priv_enc;
|
||||||
@ -69,11 +69,13 @@ main (int argc, char *argv[])
|
|||||||
ntohs (priv_enc->len))));
|
ntohs (priv_enc->len))));
|
||||||
GNUNET_free (priv_enc);
|
GNUNET_free (priv_enc);
|
||||||
priv_enc = NULL;
|
priv_enc = NULL;
|
||||||
EXITIF (GNUNET_OK != TALER_RSA_hash_verify (&hash,
|
EXITIF (GNUNET_OK != TALER_RSA_verify (&hash, sizeof (hash),
|
||||||
&sig,
|
&sig,
|
||||||
&pubkey));
|
&pubkey));
|
||||||
EXITIF (GNUNET_OK != TALER_RSA_verify (rnd_blk,
|
/* corrupt our hash and see if the signature is still valid */
|
||||||
RND_BLK_SIZE,
|
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, &hash,
|
||||||
|
sizeof (struct GNUNET_HashCode));
|
||||||
|
EXITIF (GNUNET_OK == TALER_RSA_verify (&hash, sizeof (hash),
|
||||||
&sig,
|
&sig,
|
||||||
&pubkey));
|
&pubkey));
|
||||||
|
|
||||||
@ -93,9 +95,15 @@ main (int argc, char *argv[])
|
|||||||
EXITIF (GNUNET_OK != TALER_RSA_unblind (&sig,
|
EXITIF (GNUNET_OK != TALER_RSA_unblind (&sig,
|
||||||
bkey,
|
bkey,
|
||||||
&pubkey));
|
&pubkey));
|
||||||
EXITIF (GNUNET_OK != TALER_RSA_hash_verify (&hash,
|
EXITIF (GNUNET_OK != TALER_RSA_verify (&hash, sizeof (hash),
|
||||||
&sig,
|
&sig,
|
||||||
&pubkey));
|
&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 */
|
ret = 0; /* all OK */
|
||||||
|
|
||||||
EXITIF_exit:
|
EXITIF_exit:
|
||||||
|
Loading…
Reference in New Issue
Block a user