From 306e63ced6de93868b471fe8db68c2eea6cc74a2 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Thu, 28 Mar 2024 15:19:43 +0100 Subject: [PATCH] Fix protobuf annotations --- common/protob/messages-thp.proto | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/common/protob/messages-thp.proto b/common/protob/messages-thp.proto index e1ff2c5c8..3cc30f0fc 100644 --- a/common/protob/messages-thp.proto +++ b/common/protob/messages-thp.proto @@ -7,7 +7,10 @@ option java_outer_classname = "TrezorMessageThp"; -// Numeric identifiers of pairing methods. +/** +* Numeric identifiers of pairing methods. +* @embed +*/ enum ThpPairingMethod { PairingMethod_NoMethod = 1; // Trust without MITM protection. PairingMethod_CodeEntry = 2; // User types code diplayed on Trezor into the host application. @@ -15,6 +18,9 @@ enum ThpPairingMethod { PairingMethod_NFC_Unidirectional = 4; // Trezor transmits an authentication key to the host device via NFC. } +/** +* @embed +*/ message ThpDeviceProperties { optional string internal_model = 1; // Internal model name e.g. "T2B1". optional uint32 model_variant = 2; // Encodes the device properties such as color. @@ -23,16 +29,28 @@ message ThpDeviceProperties { repeated ThpPairingMethod pairing_methods = 5; // The pairing methods supported by the Trezor. } +/** +* @embed +*/ message ThpHandshakeCompletionReqNoisePayload { optional bytes host_pairing_credential = 1; // Host's pairing credential repeated ThpPairingMethod pairing_methods = 2; // The pairing methods chosen by the host } +/** + * Request: Ask device for a new session with given passphrase + * @start + * @next ThpNewSession + */ message ThpCreateNewSession{ optional string passphrase = 1; optional bool on_device = 2; // user wants to enter passphrase on the device } +/** + * Response: Contains session_id of the newly created session + * @end + */ message ThpNewSession{ optional uint32 new_session_id = 1; }