From 1f39f7e92be2b941bed6bf760fdc5b4fb22dc2d9 Mon Sep 17 00:00:00 2001 From: Jeff Burdges Date: Thu, 11 Aug 2016 21:28:48 +0200 Subject: This might fix the compile error --- src/util/crypto.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/util') diff --git a/src/util/crypto.c b/src/util/crypto.c index c1fd7da45..fb90dfe6c 100644 --- a/src/util/crypto.c +++ b/src/util/crypto.c @@ -183,6 +183,7 @@ TALER_setup_fresh_coin (const struct TALER_TransferSecretP *secret_seed, struct TALER_FreshCoinP *fc) { uint32_t be_salt = htonl (coin_num_salt); + unsigned char *p; GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_kdf (fc, @@ -198,9 +199,10 @@ TALER_setup_fresh_coin (const struct TALER_TransferSecretP *secret_seed, /* Taken from like 170-172 of libgcrypt/cipher/ecc.c * We note that libgcrypt stores the private key in the reverse order * from many Ed25519 implementatons. */ - fc->coin_priv[0] &= 0x7f; /* Clear bit 255. */ - fc->coin_priv[0] |= 0x40; /* Set bit 254. */ - fc->coin_priv[31] &= 0xf8; /* Clear bits 2..0 so that d mod 8 == 0 */ + p = (char *) fc->coin_priv; /*->key->bits; */ + p[0] &= 0x7f; /* Clear bit 255. */ + p[0] |= 0x40; /* Set bit 254. */ + p[31] &= 0xf8; /* Clear bits 2..0 so that d mod 8 == 0 */ /* FIXME: Run GNUNET_CRYPTO_ecdhe_key_create several times and inspect * the output to verify that the same bits are set and cleared. -- cgit v1.2.3