diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-02-05 20:49:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-02-05 20:49:21 +0000 |
commit | ca35f67faee8371fa763bdf49f04a8d5d4cdc021 (patch) | |
tree | 5535df5e5a2428ed838c6a0e60b2c6c68a7842c5 /src/peerinfo-tool | |
parent | dd7cca21c5dbaef4d56f92bab3932f0f73d092d1 (diff) | |
download | gnunet-ca35f67faee8371fa763bdf49f04a8d5d4cdc021.tar.gz gnunet-ca35f67faee8371fa763bdf49f04a8d5d4cdc021.zip |
switching to ECDHE cryptography f, implementation is incomplete and INSECURE, do not use for anything but testing
Diffstat (limited to 'src/peerinfo-tool')
-rw-r--r-- | src/peerinfo-tool/gnunet-peerinfo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c index 61185bc04..809b2a592 100644 --- a/src/peerinfo-tool/gnunet-peerinfo.c +++ b/src/peerinfo-tool/gnunet-peerinfo.c | |||
@@ -167,7 +167,7 @@ static struct GNUNET_PeerIdentity my_peer_identity; | |||
167 | /** | 167 | /** |
168 | * My public key. | 168 | * My public key. |
169 | */ | 169 | */ |
170 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded my_public_key; | 170 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded my_public_key; |
171 | 171 | ||
172 | /** | 172 | /** |
173 | * Head of list of print contexts. | 173 | * Head of list of print contexts. |
@@ -524,7 +524,7 @@ static void | |||
524 | run (void *cls, char *const *args, const char *cfgfile, | 524 | run (void *cls, char *const *args, const char *cfgfile, |
525 | const struct GNUNET_CONFIGURATION_Handle *c) | 525 | const struct GNUNET_CONFIGURATION_Handle *c) |
526 | { | 526 | { |
527 | struct GNUNET_CRYPTO_RsaPrivateKey *priv; | 527 | struct GNUNET_CRYPTO_EccPrivateKey *priv; |
528 | char *fn; | 528 | char *fn; |
529 | 529 | ||
530 | cfg = c; | 530 | cfg = c; |
@@ -551,22 +551,22 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
551 | { | 551 | { |
552 | /* load private key */ | 552 | /* load private key */ |
553 | if (GNUNET_OK != | 553 | if (GNUNET_OK != |
554 | GNUNET_CONFIGURATION_get_value_filename (cfg, "GNUNETD", "HOSTKEY", | 554 | GNUNET_CONFIGURATION_get_value_filename (cfg, "PEER", "PRIVATE_KEY", |
555 | &fn)) | 555 | &fn)) |
556 | { | 556 | { |
557 | FPRINTF (stderr, _("Could not find option `%s:%s' in configuration.\n"), | 557 | FPRINTF (stderr, _("Could not find option `%s:%s' in configuration.\n"), |
558 | "GNUNETD", "HOSTKEYFILE"); | 558 | "GNUNETD", "HOSTKEYFILE"); |
559 | return; | 559 | return; |
560 | } | 560 | } |
561 | if (NULL == (priv = GNUNET_CRYPTO_rsa_key_create_from_file (fn))) | 561 | if (NULL == (priv = GNUNET_CRYPTO_ecc_key_create_from_file (fn))) |
562 | { | 562 | { |
563 | FPRINTF (stderr, _("Loading hostkey from `%s' failed.\n"), fn); | 563 | FPRINTF (stderr, _("Loading hostkey from `%s' failed.\n"), fn); |
564 | GNUNET_free (fn); | 564 | GNUNET_free (fn); |
565 | return; | 565 | return; |
566 | } | 566 | } |
567 | GNUNET_free (fn); | 567 | GNUNET_free (fn); |
568 | GNUNET_CRYPTO_rsa_key_get_public (priv, &my_public_key); | 568 | GNUNET_CRYPTO_ecc_key_get_public (priv, &my_public_key); |
569 | GNUNET_CRYPTO_rsa_key_free (priv); | 569 | GNUNET_CRYPTO_ecc_key_free (priv); |
570 | GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), &my_peer_identity.hashPubKey); | 570 | GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), &my_peer_identity.hashPubKey); |
571 | } | 571 | } |
572 | 572 | ||