-fix
authorMartin Schanzenbach <mschanzenbach@posteo.de>
Mon, 2 Jul 2012 13:20:35 +0000 (13:20 +0000)
committerMartin Schanzenbach <mschanzenbach@posteo.de>
Mon, 2 Jul 2012 13:20:35 +0000 (13:20 +0000)
src/gns/gnunet-gns.c

index f859c915ad4ccdd4bee7d644ba119c5658fb39ea..7d2f8a8b61cc6de76a8028fada57531e846c663c 100644 (file)
@@ -196,7 +196,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     if (GNUNET_YES == GNUNET_DISK_file_test (keyfile))
     {
       shorten_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile);
-      GNUNET_CRYPTO_rsa_key_get_public (key, &pkey);
+      GNUNET_CRYPTO_rsa_key_get_public (shorten_key, &pkey);
       GNUNET_CRYPTO_short_hash(&pkey,
                          sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
                          &shorten_zone);
@@ -223,7 +223,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     if (GNUNET_YES == GNUNET_DISK_file_test (keyfile))
     {
       private_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile);
-      GNUNET_CRYPTO_rsa_key_get_public (key, &pkey);
+      GNUNET_CRYPTO_rsa_key_get_public (private_key, &pkey);
       GNUNET_CRYPTO_short_hash(&pkey,
                          sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
                          &private_zone);