diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-03-17 01:05:17 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-03-17 01:05:17 +0100 |
commit | 2fb32626a1dea43c1b43cda8ac71df2ed5bc69ad (patch) | |
tree | 1257da492408ab0e45d51a098997b5e251f83a68 /src/util | |
parent | cb50ebbc641ed40d24a0fed24797dded5bcc5745 (diff) |
use void * instead of char * for RSA key material to make it more clear that these are not 0-terminated strings
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/gnunet-crypto-tvg.c | 15 |
1 files 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 */ |