summaryrefslogtreecommitdiffstats
path: root/src/protocols/ec25519_fhmqvc/util.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-26 20:30:05 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-26 20:37:47 +0200
commit4020ee614cfe248010764028902d80b4a9091f7d (patch)
treed0bc8cb336401d1d87b60ab66a2595f0294aaddf /src/protocols/ec25519_fhmqvc/util.c
parent1ea5ef8944db5da3ff9eeb2d72bcf8a887599925 (diff)
downloadfastd-4020ee614cfe248010764028902d80b4a9091f7d.tar
fastd-4020ee614cfe248010764028902d80b4a9091f7d.zip
Revise shell command API
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/util.c')
-rw-r--r--src/protocols/ec25519_fhmqvc/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/ec25519_fhmqvc/util.c b/src/protocols/ec25519_fhmqvc/util.c
index 8d11eeb..a53513f 100644
--- a/src/protocols/ec25519_fhmqvc/util.c
+++ b/src/protocols/ec25519_fhmqvc/util.c
@@ -64,18 +64,18 @@ void fastd_protocol_ec25519_fhmqvc_show_key(void) {
print_hexdump("Public: ", conf.protocol_config->key.public.u8);
}
-void fastd_protocol_ec25519_fhmqvc_set_shell_env(const fastd_peer_t *peer) {
+void fastd_protocol_ec25519_fhmqvc_set_shell_env(fastd_shell_env_t *env, const fastd_peer_t *peer) {
char buf[65];
hexdump(buf, conf.protocol_config->key.public.u8);
- setenv("LOCAL_KEY", buf, 1);
+ fastd_shell_env_set(env, "LOCAL_KEY", buf);
if (peer && peer->protocol_config) {
hexdump(buf, peer->protocol_config->public_key.u8);
- setenv("PEER_KEY", buf, 1);
+ fastd_shell_env_set(env, "PEER_KEY", buf);
}
else {
- unsetenv("PEER_KEY");
+ fastd_shell_env_set(env, "PEER_KEY", NULL);
}
}