[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: use void * instead of char * for RSA key
From: |
gnunet |
Subject: |
[gnunet] branch master updated: use void * instead of char * for RSA key material to make it more clear that these are not 0-terminated strings |
Date: |
Tue, 17 Mar 2020 01:09:33 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 2fb32626a use void * instead of char * for RSA key material to make it
more clear that these are not 0-terminated strings
2fb32626a is described below
commit 2fb32626a1dea43c1b43cda8ac71df2ed5bc69ad
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Mar 17 01:05:17 2020 +0100
use void * instead of char * for RSA key material to make it more clear
that these are not 0-terminated strings
---
src/util/gnunet-crypto-tvg.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/util/gnunet-crypto-tvg.c b/src/util/gnunet-crypto-tvg.c
index 7d151c10b..a09a6ff50 100644
--- a/src/util/gnunet-crypto-tvg.c
+++ b/src/util/gnunet-crypto-tvg.c
@@ -200,13 +200,13 @@ run (void *cls,
struct GNUNET_CRYPTO_RsaBlindingKeySecret bks;
struct GNUNET_CRYPTO_RsaSignature *blinded_sig;
struct GNUNET_CRYPTO_RsaSignature *sig;
- char *blinded_data;
+ void *blinded_data;
size_t blinded_len;
- char *public_enc_data;
+ void *public_enc_data;
size_t public_enc_len;
- char *blinded_sig_enc_data;
+ void *blinded_sig_enc_data;
size_t blinded_sig_enc_length;
- char *sig_enc_data;
+ void *sig_enc_data;
size_t sig_enc_length;
skey = GNUNET_CRYPTO_rsa_private_key_create (2048);
pkey = GNUNET_CRYPTO_rsa_private_key_get_public (skey);
@@ -214,8 +214,10 @@ run (void *cls,
sizeof (struct GNUNET_HashCode));
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, &bks, sizeof
(struct
GNUNET_CRYPTO_RsaBlindingKeySecret));
- GNUNET_assert (GNUNET_YES == GNUNET_CRYPTO_rsa_blind (&message_hash, &bks,
- pkey, &blinded_data,
+ GNUNET_assert (GNUNET_YES == GNUNET_CRYPTO_rsa_blind (&message_hash,
+ &bks,
+ pkey,
+ &blinded_data,
&blinded_len));
blinded_sig = GNUNET_CRYPTO_rsa_sign_blinded (skey, blinded_data,
blinded_len);
@@ -275,4 +277,5 @@ main (int argc,
return 0;
}
+
/* end of gnunet-crypto-tvg.c */
--
To stop receiving notification emails like this one, please contact
address@hidden.