0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-28 19:58:53 +02:00

modules/console: Catch verify errors in fed event.

This commit is contained in:
Jason Volk 2018-06-07 18:37:15 -07:00
parent ca1507cd48
commit cd611f4245

View file

@ -6613,8 +6613,15 @@ console_cmd__fed__event(opt &out, const string_view &line)
out << pretty(event) << std::endl;
if(!verify(event))
out << "- SIGNATURE FAILED" << std::endl;
try
{
if(!verify(event))
out << "- SIGNATURE FAILED" << std::endl;
}
catch(const std::exception &e)
{
out << "- SIGNATURE FAILED: " << e.what() << std::endl;
}
if(!verify_hash(event))
out << "- HASH MISMATCH: " << b64encode_unpadded(hash(event)) << std::endl;