[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -ensure label has no zero bytes
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -ensure label has no zero bytes |
Date: |
Tue, 08 Mar 2022 11:47:54 +0100 |
This is an automated email from the git hooks/post-receive script.
oec pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new cd5ee233 -ensure label has no zero bytes
cd5ee233 is described below
commit cd5ee2338cd0c1d2923244d3ac2cc9695c5a8e25
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Tue Mar 8 11:47:51 2022 +0100
-ensure label has no zero bytes
---
src/util/age_restriction.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c
index 58db2341..92143ad0 100644
--- a/src/util/age_restriction.c
+++ b/src/util/age_restriction.c
@@ -184,7 +184,12 @@ TALER_age_commitment_derive (
new->proof.num,
struct TALER_AgeCommitmentPrivateKeyP);
- memcpy (label, &salt, sizeof(salt));
+ {
+ /* Because GNUNET_CRYPTO_ecdsa_public_key_derive expects char * (and calls
+ * strlen on it), we must avoid 0's in the label. */
+ uint64_t nz_salt = salt | 0x8040201008040201;
+ memcpy (label, &nz_salt, sizeof(nz_salt));
+ }
/* 1. Derive the public keys */
for (size_t i = 0; i < orig->commitment.num; i++)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: -ensure label has no zero bytes,
gnunet <=