diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-16 13:53:39 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-16 13:53:39 +0000 |
commit | e5cdb00d7e936e202f7ef57519dd3b4c8b168154 (patch) | |
tree | ae52f5177d44e024ab0127099aeed247e89cd76a | |
parent | 78965ef296afe639d28b4202bbcfba7139ad9dec (diff) | |
download | gnunet-e5cdb00d7e936e202f7ef57519dd3b4c8b168154.tar.gz gnunet-e5cdb00d7e936e202f7ef57519dd3b4c8b168154.zip |
-eliminate ShortHashCode residuals (#2936)
-rw-r--r-- | src/include/gnunet_common.h | 36 | ||||
-rw-r--r-- | src/namestore/gnunet-namestore-fcfsd.c | 4 |
2 files changed, 3 insertions, 37 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 4552e860e..6c27b88a3 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -259,15 +259,6 @@ struct GNUNET_HashCode | |||
259 | 259 | ||
260 | 260 | ||
261 | /** | 261 | /** |
262 | * @brief A SHA-256 hashcode | ||
263 | */ | ||
264 | struct GNUNET_CRYPTO_ShortHashCode | ||
265 | { | ||
266 | uint32_t bits[256 / 8 / sizeof (uint32_t)]; /* = 8 */ | ||
267 | }; | ||
268 | |||
269 | |||
270 | /** | ||
271 | * The identity of the host (basically the SHA-512 hashcode of | 262 | * The identity of the host (basically the SHA-512 hashcode of |
272 | * it's public key). | 263 | * it's public key). |
273 | */ | 264 | */ |
@@ -505,33 +496,6 @@ GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls); | |||
505 | 496 | ||
506 | /** | 497 | /** |
507 | * @ingroup logging | 498 | * @ingroup logging |
508 | * Convert a short hash value to a string (for printing debug messages). | ||
509 | * This is one of the very few calls in the entire API that is | ||
510 | * NOT reentrant! | ||
511 | * | ||
512 | * @param hc the short hash code | ||
513 | * @return string | ||
514 | */ | ||
515 | const char * | ||
516 | GNUNET_short_h2s (const struct GNUNET_CRYPTO_ShortHashCode * hc); | ||
517 | |||
518 | |||
519 | /** | ||
520 | * @ingroup logging | ||
521 | * Convert a short hash value to a string (for printing debug messages). | ||
522 | * This prints all 104 characters of a hashcode! | ||
523 | * This is one of the very few calls in the entire API that is | ||
524 | * NOT reentrant! | ||
525 | * | ||
526 | * @param hc the short hash code | ||
527 | * @return string | ||
528 | */ | ||
529 | const char * | ||
530 | GNUNET_short_h2s_full (const struct GNUNET_CRYPTO_ShortHashCode * hc); | ||
531 | |||
532 | |||
533 | /** | ||
534 | * @ingroup logging | ||
535 | * Convert a hash value to a string (for printing debug messages). | 499 | * Convert a hash value to a string (for printing debug messages). |
536 | * This is one of the very few calls in the entire API that is | 500 | * This is one of the very few calls in the entire API that is |
537 | * NOT reentrant! | 501 | * NOT reentrant! |
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c index 527e46eb9..7149a5206 100644 --- a/src/namestore/gnunet-namestore-fcfsd.c +++ b/src/namestore/gnunet-namestore-fcfsd.c | |||
@@ -511,7 +511,7 @@ zone_to_name_cb (void *cls, | |||
511 | { | 511 | { |
512 | struct Request *request = cls; | 512 | struct Request *request = cls; |
513 | struct GNUNET_NAMESTORE_RecordData r; | 513 | struct GNUNET_NAMESTORE_RecordData r; |
514 | struct GNUNET_CRYPTO_ShortHashCode pub; | 514 | struct GNUNET_CRYPTO_EccPublicSignKey pub; |
515 | 515 | ||
516 | request->qe = NULL; | 516 | request->qe = NULL; |
517 | if (NULL != name) | 517 | if (NULL != name) |
@@ -523,6 +523,8 @@ zone_to_name_cb (void *cls, | |||
523 | run_httpd_now (); | 523 | run_httpd_now (); |
524 | return; | 524 | return; |
525 | } | 525 | } |
526 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (zone_key, | ||
527 | &pub); | ||
526 | r.data = &pub; | 528 | r.data = &pub; |
527 | r.data_size = sizeof (pub); | 529 | r.data_size = sizeof (pub); |
528 | r.expiration_time = UINT64_MAX; | 530 | r.expiration_time = UINT64_MAX; |