diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-08 16:56:33 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-08 16:56:33 +0200 |
commit | 11ae9f030e13d07c505a4d5477d592ddb4b3acf6 (patch) | |
tree | 69ce120a7c60c84d0d074bab8fe2cd26e77300dc /src/hello/hello-ng.c | |
parent | 2348fe4ae8ffe93765d5c56c3cc5d4490eae946d (diff) | |
download | gnunet-11ae9f030e13d07c505a4d5477d592ddb4b3acf6.tar.gz gnunet-11ae9f030e13d07c505a4d5477d592ddb4b3acf6.zip |
fix sign api for to address #6164
Diffstat (limited to 'src/hello/hello-ng.c')
-rw-r--r-- | src/hello/hello-ng.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hello/hello-ng.c b/src/hello/hello-ng.c index 8dea616b9..d06feadd5 100644 --- a/src/hello/hello-ng.c +++ b/src/hello/hello-ng.c | |||
@@ -79,8 +79,7 @@ GNUNET_HELLO_sign_address ( | |||
79 | sa.purpose.size = htonl (sizeof(sa)); | 79 | sa.purpose.size = htonl (sizeof(sa)); |
80 | sa.mono_time = GNUNET_TIME_absolute_hton (mono_time); | 80 | sa.mono_time = GNUNET_TIME_absolute_hton (mono_time); |
81 | GNUNET_CRYPTO_hash (address, strlen (address), &sa.h_addr); | 81 | GNUNET_CRYPTO_hash (address, strlen (address), &sa.h_addr); |
82 | GNUNET_assert (GNUNET_YES == | 82 | GNUNET_CRYPTO_eddsa_sign (private_key, &sa, &sig); |
83 | GNUNET_CRYPTO_eddsa_sign (private_key, &sa.purpose, &sig)); | ||
84 | sig_str = NULL; | 83 | sig_str = NULL; |
85 | (void) GNUNET_STRINGS_base64_encode (&sig, sizeof(sig), &sig_str); | 84 | (void) GNUNET_STRINGS_base64_encode (&sig, sizeof(sig), &sig_str); |
86 | *result_size = | 85 | *result_size = |
@@ -165,7 +164,7 @@ GNUNET_HELLO_extract_address (const void *raw, | |||
165 | GNUNET_CRYPTO_hash (raw_addr, strlen (raw_addr), &sa.h_addr); | 164 | GNUNET_CRYPTO_hash (raw_addr, strlen (raw_addr), &sa.h_addr); |
166 | if (GNUNET_YES != | 165 | if (GNUNET_YES != |
167 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_ADDRESS, | 166 | GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_ADDRESS, |
168 | &sa.purpose, | 167 | &sa, |
169 | sig, | 168 | sig, |
170 | public_key)) | 169 | public_key)) |
171 | { | 170 | { |