aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_plugin_transport.c
diff options
context:
space:
mode:
authorAnna Wimbauer <anna.wimbauer@gmx.de>2020-04-27 09:28:53 +0200
committerAnna Wimbauer <anna.wimbauer@gmx.de>2020-04-27 09:28:53 +0200
commite5bc04c4a1499a472f3b6f0bd41c275a8537071f (patch)
tree29fa88bb7336ac5c148f3c6304304a2b904f02c5 /src/transport/test_plugin_transport.c
parent9a91e41070e368e929e7534c047c8360e60d1901 (diff)
parent91fd7860cba14c27d52850f91b17060790855145 (diff)
downloadgnunet-e5bc04c4a1499a472f3b6f0bd41c275a8537071f.tar.gz
gnunet-e5bc04c4a1499a472f3b6f0bd41c275a8537071f.zip
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src/transport/test_plugin_transport.c')
-rw-r--r--src/transport/test_plugin_transport.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index 10e07dae5..04687d845 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -49,7 +49,7 @@ static struct GNUNET_PeerIdentity my_identity;
49/** 49/**
50 * Our private key. 50 * Our private key.
51 */ 51 */
52static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key; 52static struct GNUNET_CRYPTO_EddsaPrivateKey my_private_key;
53 53
54/** 54/**
55 * Our configuration. 55 * Our configuration.
@@ -647,16 +647,20 @@ run (void *cls,
647 } 647 }
648 648
649 max_connect_per_transport = (uint32_t) tneigh; 649 max_connect_per_transport = (uint32_t) tneigh;
650 my_private_key = GNUNET_CRYPTO_eddsa_key_create_from_file (keyfile); 650 if (GNUNET_SYSERR ==
651 GNUNET_free (keyfile); 651 GNUNET_CRYPTO_eddsa_key_from_file (keyfile,
652 if (NULL == my_private_key) 652 GNUNET_YES,
653 &my_private_key))
653 { 654 {
655 GNUNET_free (keyfile);
654 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 656 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
655 "Could not access hostkey. Exiting.\n"); 657 "Could not access hostkey. Exiting.\n");
656 end_badly_now (); 658 end_badly_now ();
657 return; 659 return;
658 } 660 }
659 GNUNET_CRYPTO_eddsa_key_get_public (my_private_key, &my_identity.public_key); 661 GNUNET_free (keyfile);
662 GNUNET_CRYPTO_eddsa_key_get_public (&my_private_key,
663 &my_identity.public_key);
660 664
661 hello = GNUNET_HELLO_create (&my_identity.public_key, NULL, NULL, GNUNET_NO); 665 hello = GNUNET_HELLO_create (&my_identity.public_key, NULL, NULL, GNUNET_NO);
662 666