[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: fix alignment warnings
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: fix alignment warnings |
Date: |
Tue, 16 Feb 2021 00:52:20 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new 765267f fix alignment warnings
765267f is described below
commit 765267fa2f02a9405c97c07bb01ca542ccb9cd0a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Feb 16 00:52:17 2021 +0100
fix alignment warnings
---
src/include/anastasis_crypto_lib.h | 2 +-
src/lib/anastasis_recovery.c | 2 +-
src/reducer/anastasis_api_redux.c | 16 ++++++++--------
src/util/anastasis_crypto.c | 15 ++++++++++-----
4 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/src/include/anastasis_crypto_lib.h
b/src/include/anastasis_crypto_lib.h
index cbb7b9e..4b2c146 100644
--- a/src/include/anastasis_crypto_lib.h
+++ b/src/include/anastasis_crypto_lib.h
@@ -495,7 +495,7 @@ ANASTASIS_CRYPTO_core_secret_encrypt (
void
ANASTASIS_CRYPTO_core_secret_recover (
const struct ANASTASIS_CRYPTO_EncryptedMasterKeyP *encrypted_master_key,
- const struct ANASTASIS_CRYPTO_PolicyKeyP policy_key,
+ const struct ANASTASIS_CRYPTO_PolicyKeyP *policy_key,
const void *encrypted_core_secret,
size_t encrypted_core_secret_size,
void **core_secret,
diff --git a/src/lib/anastasis_recovery.c b/src/lib/anastasis_recovery.c
index 7a58ad6..ca99de6 100644
--- a/src/lib/anastasis_recovery.c
+++ b/src/lib/anastasis_recovery.c
@@ -385,7 +385,7 @@ keyshare_lookup_cb (void *cls,
&rdps->salt,
&policy_key);
ANASTASIS_CRYPTO_core_secret_recover (&rdps->emk,
- policy_key,
+ &policy_key,
recovery->enc_core_secret,
recovery->enc_core_secret_size,
&core_secret,
diff --git a/src/reducer/anastasis_api_redux.c
b/src/reducer/anastasis_api_redux.c
index 649e3f9..69f4291 100644
--- a/src/reducer/anastasis_api_redux.c
+++ b/src/reducer/anastasis_api_redux.c
@@ -1120,10 +1120,10 @@ enter_user_attributes (json_t *state,
(! validate_regex (attribute_value,
regexp)) )
{
- ANASTASIS_redux_fail (cb,
- cb_cls,
- TALER_EC_ANASTASIS_REDUCER_INPUT_REGEX_FAILED,
- regexp);
+ ANASTASIS_redux_fail_ (cb,
+ cb_cls,
+ TALER_EC_ANASTASIS_REDUCER_INPUT_REGEX_FAILED,
+ regexp);
return NULL;
}
@@ -1135,10 +1135,10 @@ enter_user_attributes (json_t *state,
reglog))) &&
(! regfun (attribute_value)) )
{
- ANASTASIS_redux_fail (cb,
- cb_cls,
-
TALER_EC_ANASTASIS_REDUCER_INPUT_VALIDATION_FAILED,
- reglog);
+ ANASTASIS_redux_fail_ (cb,
+ cb_cls,
+
TALER_EC_ANASTASIS_REDUCER_INPUT_VALIDATION_FAILED,
+ reglog);
return NULL;
}
}
diff --git a/src/util/anastasis_crypto.c b/src/util/anastasis_crypto.c
index 6bfd525..354f629 100644
--- a/src/util/anastasis_crypto.c
+++ b/src/util/anastasis_crypto.c
@@ -278,6 +278,7 @@ ANASTASIS_CRYPTO_user_identifier_derive (
struct ANASTASIS_CRYPTO_UserIdentifierP *id)
{
char *json_enc;
+ struct GNUNET_HashCode hash;
json_enc = json_dumps (id_data,
JSON_COMPACT | JSON_SORT_KEYS);
@@ -285,8 +286,8 @@ ANASTASIS_CRYPTO_user_identifier_derive (
GNUNET_CRYPTO_pow_hash (&server_salt->salt,
json_enc,
strlen (json_enc),
- &id->hash);
-
+ &hash);
+ id->hash = hash;
free (json_enc);
}
@@ -527,8 +528,9 @@ ANASTASIS_CRYPTO_core_secret_encrypt (
{
struct GNUNET_CRYPTO_SymmetricSessionKey i_sk;
struct GNUNET_CRYPTO_SymmetricInitializationVector i_iv;
+ struct GNUNET_HashCode key = policy_keys[i].key;
- GNUNET_CRYPTO_hash_to_aes_key (&policy_keys[i].key,
+ GNUNET_CRYPTO_hash_to_aes_key (&key,
&i_sk,
&i_iv);
GNUNET_assert (
@@ -545,7 +547,7 @@ ANASTASIS_CRYPTO_core_secret_encrypt (
void
ANASTASIS_CRYPTO_core_secret_recover (
const struct ANASTASIS_CRYPTO_EncryptedMasterKeyP *encrypted_master_key,
- const struct ANASTASIS_CRYPTO_PolicyKeyP policy_key,
+ const struct ANASTASIS_CRYPTO_PolicyKeyP *policy_key,
const void *encrypted_core_secret,
size_t encrypted_core_secret_size,
void **core_secret,
@@ -556,9 +558,12 @@ ANASTASIS_CRYPTO_core_secret_recover (
struct GNUNET_CRYPTO_SymmetricSessionKey core_sk;
struct GNUNET_CRYPTO_SymmetricInitializationVector core_iv;
struct GNUNET_HashCode master_key;
+ struct GNUNET_HashCode key = policy_key->key;
*core_secret = GNUNET_malloc (encrypted_core_secret_size);
- GNUNET_CRYPTO_hash_to_aes_key (&policy_key.key, &mk_sk, &mk_iv);
+ GNUNET_CRYPTO_hash_to_aes_key (&key,
+ &mk_sk,
+ &mk_iv);
GNUNET_assert (
GNUNET_SYSERR !=
GNUNET_CRYPTO_symmetric_decrypt (
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: fix alignment warnings,
gnunet <=