[noise] Trim resume flash usage and never dump the ticket secret

This commit is contained in:
J. Nick Koston
2026-08-24 15:53:33 -05:00
parent cf97e4c4e8
commit d1f7e71efb
6 changed files with 82 additions and 82 deletions
+7
View File
@@ -2799,6 +2799,10 @@ def build_message_type(
public_content.append(prot)
# If no fields to calculate size for or message doesn't need encoding, the default implementation in ProtoMessage will be used
# Sensitive messages (keys, tickets) dump only their name
if desc.name in SENSITIVE_MESSAGES:
dump = []
# dump_to method declaration in header
prot = "#ifdef HAS_PROTO_MESSAGE_DUMP\n"
prot += "const char *dump_to(DumpBuffer &out) const override;\n"
@@ -2845,6 +2849,9 @@ def build_message_type(
return out, cpp, dump_cpp
# Messages whose contents are secret; dump_to prints only the name
SENSITIVE_MESSAGES = {"NoiseResumeTicket"}
SOURCE_BOTH = 0
SOURCE_SERVER = 1
SOURCE_CLIENT = 2