[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated (04c59fc58 -> 9df9fb502)
From: |
gnunet |
Subject: |
[gnunet] branch master updated (04c59fc58 -> 9df9fb502) |
Date: |
Thu, 15 Feb 2024 22:50:17 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a change to branch master
in repository gnunet.
from 04c59fc58 uncrustify
new 72de675e3 CORE: Output own peer identity when using CLI
new 9df9fb502 uncrustify
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/cli/core/gnunet-core.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/src/cli/core/gnunet-core.c b/src/cli/core/gnunet-core.c
index d90c8e1f5..c7aef5349 100644
--- a/src/cli/core/gnunet-core.c
+++ b/src/cli/core/gnunet-core.c
@@ -150,6 +150,9 @@ run (void *cls,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
+ struct GNUNET_CRYPTO_EddsaPrivateKey pk;
+ struct GNUNET_CRYPTO_EddsaPublicKey pub;
+ char *keyfile;
(void) cls;
(void) cfgfile;
if (NULL != args[0])
@@ -157,6 +160,33 @@ run (void *cls,
fprintf (stderr, _ ("Invalid command line argument `%s'\n"), args[0]);
return;
}
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_filename (cfg,
+ "PEER",
+ "PRIVATE_KEY",
+ &keyfile))
+ {
+ GNUNET_log (
+ GNUNET_ERROR_TYPE_ERROR,
+ _ ("Core service is lacking HOSTKEY configuration setting.
Exiting.\n"));
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
+ if (GNUNET_SYSERR ==
+ GNUNET_CRYPTO_eddsa_key_from_file (keyfile,
+ GNUNET_YES,
+ &pk))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to read peer's private key!\n");
+ GNUNET_SCHEDULER_shutdown ();
+ GNUNET_free (keyfile);
+ return;
+ }
+ GNUNET_CRYPTO_eddsa_key_get_public (&pk, &pub);
+ fprintf (stdout,
+ _ ("Local peer: %s\n\n"),
+ GNUNET_i2s ((struct GNUNET_PeerIdentity*) &pub));
mh = GNUNET_CORE_monitor_start (cfg, &monitor_cb, NULL);
if (NULL == mh)
{
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (04c59fc58 -> 9df9fb502),
gnunet <=