-simply assert
This commit is contained in:
parent
a01c1acc3c
commit
5659ba8675
@ -222,7 +222,8 @@ run (void *cls,
|
|||||||
&priv),
|
&priv),
|
||||||
GNUNET_JSON_spec_end ()
|
GNUNET_JSON_spec_end ()
|
||||||
};
|
};
|
||||||
if (GNUNET_OK != GNUNET_JSON_parse (args,
|
if (GNUNET_OK !=
|
||||||
|
GNUNET_JSON_parse (args,
|
||||||
kx_spec,
|
kx_spec,
|
||||||
NULL,
|
NULL,
|
||||||
NULL))
|
NULL))
|
||||||
@ -232,21 +233,17 @@ run (void *cls,
|
|||||||
global_ret = 1;
|
global_ret = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (GNUNET_OK != GNUNET_CRYPTO_ecdh_eddsa (&priv,
|
GNUNET_assert (GNUNET_OK ==
|
||||||
|
GNUNET_CRYPTO_ecdh_eddsa (&priv,
|
||||||
&pub,
|
&pub,
|
||||||
&key_material))
|
&key_material));
|
||||||
{
|
|
||||||
// FIXME: Return as result?
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
|
||||||
"kx failed\n");
|
|
||||||
global_ret = 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
resp = GNUNET_JSON_PACK (
|
resp = GNUNET_JSON_PACK (
|
||||||
GNUNET_JSON_pack_data_auto ("h",
|
GNUNET_JSON_pack_data_auto ("h",
|
||||||
&key_material)
|
&key_material)
|
||||||
);
|
);
|
||||||
json_dumpf (resp, stdout, JSON_COMPACT);
|
json_dumpf (resp,
|
||||||
|
stdout,
|
||||||
|
JSON_COMPACT);
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
|
Loading…
Reference in New Issue
Block a user