Whoops. Compile fixes.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3707 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2021-12-27 22:00:37 +00:00
parent 2e1b0089ae
commit c590eb3a44
3 changed files with 12 additions and 2 deletions

View File

@ -512,6 +512,12 @@ bool tf_ssb_verify_and_strip_signature(JSContext* context, JSValue val, char* ou
if (!verified)
{
printf("crypto_sign_verify_detached fail (r=%d)\n", r);
if (false)
{
printf("val=[%.*s]\n", (int)strlen(sigstr), sigstr);
printf("sig=%.*s\n", (int)(sigkind - str), str);
printf("public key=%.*s\n", (int)(type - author_id), author_id);
}
}
}
else
@ -1061,7 +1067,9 @@ static bool _tf_ssb_connection_box_stream_recv(tf_ssb_connection_t* connection)
connection->body_len = htons(*(uint16_t*)header);
if (connection->body_len > k_tf_ssb_rpc_message_body_length_max)
{
_tf_ssb_connection_close(connection, "body length is too large");
char reason[512];
snprintf(reason, sizeof(reason), "body length is too large: %d", connection->body_len);
_tf_ssb_connection_close(connection, reason);
return false;
}
memcpy(connection->body_auth_tag, header + sizeof(uint16_t), sizeof(connection->body_auth_tag));