1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-12 17:38:13 +00:00

refactor(common): remove pairing_in/out and channel_in/out proto options

[no changelog]
This commit is contained in:
M1nd3r 2024-12-04 16:33:47 +01:00
parent c03037f56a
commit d19b58c1ab
4 changed files with 57 additions and 79 deletions

View File

@ -15,24 +15,24 @@ option (include_in_bitcoin_only) = true;
enum ThpMessageType { enum ThpMessageType {
reserved 0 to 999; // Values reserved by other messages, see messages.proto reserved 0 to 999; // Values reserved by other messages, see messages.proto
ThpMessageType_ThpCreateNewSession = 1000[(bitcoin_only)=true, (channel_in) = true]; ThpMessageType_ThpCreateNewSession = 1000[(bitcoin_only)=true];
ThpMessageType_ThpNewSession = 1001[(bitcoin_only)=true, (channel_out) = true]; ThpMessageType_ThpNewSession = 1001[(bitcoin_only)=true];
ThpMessageType_ThpStartPairingRequest = 1008 [(bitcoin_only) = true, (pairing_in) = true]; ThpMessageType_ThpStartPairingRequest = 1008 [(bitcoin_only) = true];
ThpMessageType_ThpPairingPreparationsFinished = 1009 [(bitcoin_only) = true, (pairing_out) = true]; ThpMessageType_ThpPairingPreparationsFinished = 1009 [(bitcoin_only) = true];
ThpMessageType_ThpCredentialRequest = 1010 [(bitcoin_only) = true, (pairing_in) = true]; ThpMessageType_ThpCredentialRequest = 1010 [(bitcoin_only) = true];
ThpMessageType_ThpCredentialResponse = 1011 [(bitcoin_only) = true, (pairing_out) = true]; ThpMessageType_ThpCredentialResponse = 1011 [(bitcoin_only) = true];
ThpMessageType_ThpEndRequest = 1012 [(bitcoin_only) = true, (pairing_in) = true]; ThpMessageType_ThpEndRequest = 1012 [(bitcoin_only) = true];
ThpMessageType_ThpEndResponse = 1013[(bitcoin_only) = true, (pairing_out) = true]; ThpMessageType_ThpEndResponse = 1013[(bitcoin_only) = true];
ThpMessageType_ThpCodeEntryCommitment = 1016[(bitcoin_only)=true, (pairing_out) = true]; ThpMessageType_ThpCodeEntryCommitment = 1016[(bitcoin_only)=true];
ThpMessageType_ThpCodeEntryChallenge = 1017[(bitcoin_only)=true, (pairing_in) = true]; ThpMessageType_ThpCodeEntryChallenge = 1017[(bitcoin_only)=true];
ThpMessageType_ThpCodeEntryCpaceHost = 1018[(bitcoin_only)=true, (pairing_in) = true]; ThpMessageType_ThpCodeEntryCpaceHost = 1018[(bitcoin_only)=true];
ThpMessageType_ThpCodeEntryCpaceTrezor = 1019[(bitcoin_only)=true, (pairing_out) = true]; ThpMessageType_ThpCodeEntryCpaceTrezor = 1019[(bitcoin_only)=true];
ThpMessageType_ThpCodeEntryTag = 1020[(bitcoin_only)=true, (pairing_in) = true]; ThpMessageType_ThpCodeEntryTag = 1020[(bitcoin_only)=true];
ThpMessageType_ThpCodeEntrySecret = 1021[(bitcoin_only)=true, (pairing_out) = true]; ThpMessageType_ThpCodeEntrySecret = 1021[(bitcoin_only)=true];
ThpMessageType_ThpQrCodeTag = 1024[(bitcoin_only)=true, (pairing_in) = true]; ThpMessageType_ThpQrCodeTag = 1024[(bitcoin_only)=true];
ThpMessageType_ThpQrCodeSecret = 1025[(bitcoin_only)=true, (pairing_out) = true]; ThpMessageType_ThpQrCodeSecret = 1025[(bitcoin_only)=true];
ThpMessageType_ThpNfcUnidirectionalTag = 1032[(bitcoin_only)=true, (pairing_in) = true]; ThpMessageType_ThpNfcUnidirectionalTag = 1032[(bitcoin_only)=true];
ThpMessageType_ThpNfcUnidirectionalSecret = 1033[(bitcoin_only)=true, (pairing_in) = true]; ThpMessageType_ThpNfcUnidirectionalSecret = 1033[(bitcoin_only)=true];
reserved 1100 to 2147483647; // Values reserved by other messages, see messages.proto reserved 1100 to 2147483647; // Values reserved by other messages, see messages.proto
} }

View File

@ -37,10 +37,6 @@ The convention to achieve this is as follows:
optional bool wire_tiny = 50006; // message is handled by Trezor when the USB stack is in tiny mode optional bool wire_tiny = 50006; // message is handled by Trezor when the USB stack is in tiny mode
optional bool wire_bootloader = 50007; // message is only handled by Trezor Bootloader optional bool wire_bootloader = 50007; // message is only handled by Trezor Bootloader
optional bool wire_no_fsm = 50008; // message is not handled by Trezor unless the USB stack is in tiny mode optional bool wire_no_fsm = 50008; // message is not handled by Trezor unless the USB stack is in tiny mode
optional bool channel_in = 50009;
optional bool channel_out = 50010;
optional bool pairing_in = 50011;
optional bool pairing_out = 50012;
optional bool bitcoin_only = 60000; // enum value is available on BITCOIN_ONLY build optional bool bitcoin_only = 60000; // enum value is available on BITCOIN_ONLY build
// (messages not marked bitcoin_only will be EXCLUDED) // (messages not marked bitcoin_only will be EXCLUDED)

View File

@ -4076,36 +4076,32 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x98\xb2\x19\x01\"\xa8\x01\n\x1eThpAuthenticatedCredentialData\x12,\n\ \x98\xb2\x19\x01\"\xa8\x01\n\x1eThpAuthenticatedCredentialData\x12,\n\
\x12host_static_pubkey\x18\x01\x20\x01(\x0cR\x10hostStaticPubkey\x12R\n\ \x12host_static_pubkey\x18\x01\x20\x01(\x0cR\x10hostStaticPubkey\x12R\n\
\rcred_metadata\x18\x02\x20\x01(\x0b2-.hw.trezor.messages.thp.ThpCredent\ \rcred_metadata\x18\x02\x20\x01(\x0b2-.hw.trezor.messages.thp.ThpCredent\
ialMetadataR\x0ccredMetadata:\x04\x98\xb2\x19\x01*\xbe\x07\n\x0eThpMessa\ ialMetadataR\x0ccredMetadata:\x04\x98\xb2\x19\x01*\xf6\x06\n\x0eThpMessa\
geType\x121\n\"ThpMessageType_ThpCreateNewSession\x10\xe8\x07\x1a\x08\ geType\x12-\n\"ThpMessageType_ThpCreateNewSession\x10\xe8\x07\x1a\x04\
\x80\xa6\x1d\x01\xc8\xb5\x18\x01\x12+\n\x1cThpMessageType_ThpNewSession\ \x80\xa6\x1d\x01\x12'\n\x1cThpMessageType_ThpNewSession\x10\xe9\x07\x1a\
\x10\xe9\x07\x1a\x08\x80\xa6\x1d\x01\xd0\xb5\x18\x01\x124\n%ThpMessageTy\ \x04\x80\xa6\x1d\x01\x120\n%ThpMessageType_ThpStartPairingRequest\x10\
pe_ThpStartPairingRequest\x10\xf0\x07\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\ \xf0\x07\x1a\x04\x80\xa6\x1d\x01\x128\n-ThpMessageType_ThpPairingPrepara\
\x18\x01\x12<\n-ThpMessageType_ThpPairingPreparationsFinished\x10\xf1\ tionsFinished\x10\xf1\x07\x1a\x04\x80\xa6\x1d\x01\x12.\n#ThpMessageType_\
\x07\x1a\x08\x80\xa6\x1d\x01\xe0\xb5\x18\x01\x122\n#ThpMessageType_ThpCr\ ThpCredentialRequest\x10\xf2\x07\x1a\x04\x80\xa6\x1d\x01\x12/\n$ThpMessa\
edentialRequest\x10\xf2\x07\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x123\ geType_ThpCredentialResponse\x10\xf3\x07\x1a\x04\x80\xa6\x1d\x01\x12'\n\
\n$ThpMessageType_ThpCredentialResponse\x10\xf3\x07\x1a\x08\x80\xa6\x1d\ \x1cThpMessageType_ThpEndRequest\x10\xf4\x07\x1a\x04\x80\xa6\x1d\x01\x12\
\x01\xe0\xb5\x18\x01\x12+\n\x1cThpMessageType_ThpEndRequest\x10\xf4\x07\ (\n\x1dThpMessageType_ThpEndResponse\x10\xf5\x07\x1a\x04\x80\xa6\x1d\x01\
\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x12,\n\x1dThpMessageType_ThpEnd\ \x120\n%ThpMessageType_ThpCodeEntryCommitment\x10\xf8\x07\x1a\x04\x80\
Response\x10\xf5\x07\x1a\x08\x80\xa6\x1d\x01\xe0\xb5\x18\x01\x124\n%ThpM\ \xa6\x1d\x01\x12/\n$ThpMessageType_ThpCodeEntryChallenge\x10\xf9\x07\x1a\
essageType_ThpCodeEntryCommitment\x10\xf8\x07\x1a\x08\x80\xa6\x1d\x01\ \x04\x80\xa6\x1d\x01\x12/\n$ThpMessageType_ThpCodeEntryCpaceHost\x10\xfa\
\xe0\xb5\x18\x01\x123\n$ThpMessageType_ThpCodeEntryChallenge\x10\xf9\x07\ \x07\x1a\x04\x80\xa6\x1d\x01\x121\n&ThpMessageType_ThpCodeEntryCpaceTrez\
\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x123\n$ThpMessageType_ThpCodeEn\ or\x10\xfb\x07\x1a\x04\x80\xa6\x1d\x01\x12)\n\x1eThpMessageType_ThpCodeE\
tryCpaceHost\x10\xfa\x07\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x125\n&\ ntryTag\x10\xfc\x07\x1a\x04\x80\xa6\x1d\x01\x12,\n!ThpMessageType_ThpCod\
ThpMessageType_ThpCodeEntryCpaceTrezor\x10\xfb\x07\x1a\x08\x80\xa6\x1d\ eEntrySecret\x10\xfd\x07\x1a\x04\x80\xa6\x1d\x01\x12&\n\x1bThpMessageTyp\
\x01\xe0\xb5\x18\x01\x12-\n\x1eThpMessageType_ThpCodeEntryTag\x10\xfc\ e_ThpQrCodeTag\x10\x80\x08\x1a\x04\x80\xa6\x1d\x01\x12)\n\x1eThpMessageT\
\x07\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x120\n!ThpMessageType_ThpCo\ ype_ThpQrCodeSecret\x10\x81\x08\x1a\x04\x80\xa6\x1d\x01\x121\n&ThpMessag\
deEntrySecret\x10\xfd\x07\x1a\x08\x80\xa6\x1d\x01\xe0\xb5\x18\x01\x12*\n\ eType_ThpNfcUnidirectionalTag\x10\x88\x08\x1a\x04\x80\xa6\x1d\x01\x124\n\
\x1bThpMessageType_ThpQrCodeTag\x10\x80\x08\x1a\x08\x80\xa6\x1d\x01\xd8\ )ThpMessageType_ThpNfcUnidirectionalSecret\x10\x89\x08\x1a\x04\x80\xa6\
\xb5\x18\x01\x12-\n\x1eThpMessageType_ThpQrCodeSecret\x10\x81\x08\x1a\ \x1d\x01\"\x05\x08\0\x10\xe7\x07\"\t\x08\xcc\x08\x10\xff\xff\xff\xff\x07\
\x08\x80\xa6\x1d\x01\xe0\xb5\x18\x01\x125\n&ThpMessageType_ThpNfcUnidire\ *S\n\x10ThpPairingMethod\x12\x0c\n\x08NoMethod\x10\x01\x12\r\n\tCodeEntr\
ctionalTag\x10\x88\x08\x1a\x08\x80\xa6\x1d\x01\xd8\xb5\x18\x01\x128\n)Th\ y\x10\x02\x12\n\n\x06QrCode\x10\x03\x12\x16\n\x12NFC_Unidirectional\x10\
pMessageType_ThpNfcUnidirectionalSecret\x10\x89\x08\x1a\x08\x80\xa6\x1d\ \x04B;\n#com.satoshilabs.trezor.lib.protobufB\x10TrezorMessageThp\x80\
\x01\xd8\xb5\x18\x01\"\x05\x08\0\x10\xe7\x07\"\t\x08\xcc\x08\x10\xff\xff\ \xa6\x1d\x01\
\xff\xff\x07*S\n\x10ThpPairingMethod\x12\x0c\n\x08NoMethod\x10\x01\x12\r\
\n\tCodeEntry\x10\x02\x12\n\n\x06QrCode\x10\x03\x12\x16\n\x12NFC_Unidire\
ctional\x10\x04B;\n#com.satoshilabs.trezor.lib.protobufB\x10TrezorMessag\
eThp\x80\xa6\x1d\x01\
"; ";
/// `FileDescriptorProto` object which was a source for this generated file /// `FileDescriptorProto` object which was a source for this generated file

View File

@ -42,14 +42,6 @@ pub mod exts {
pub const wire_no_fsm: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); pub const wire_no_fsm: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const channel_in: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const channel_out: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const pairing_in: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const pairing_out: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(50012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const bitcoin_only: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(60000, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); pub const bitcoin_only: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(60000, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
pub const has_bitcoin_only_values: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(51001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); pub const has_bitcoin_only_values: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(51001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
@ -76,25 +68,19 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\x08wireTiny\ \x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\x08wireTiny\
:L\n\x0fwire_bootloader\x18\xd7\x86\x03\x20\x01(\x08\x12!.google.protobu\ :L\n\x0fwire_bootloader\x18\xd7\x86\x03\x20\x01(\x08\x12!.google.protobu\
f.EnumValueOptionsR\x0ewireBootloader:C\n\x0bwire_no_fsm\x18\xd8\x86\x03\ f.EnumValueOptionsR\x0ewireBootloader:C\n\x0bwire_no_fsm\x18\xd8\x86\x03\
\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\twireNoFsm:B\n\ncha\ \x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\twireNoFsm:F\n\x0cb\
nnel_in\x18\xd9\x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptio\ itcoin_only\x18\xe0\xd4\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueO\
nsR\tchannelIn:D\n\x0bchannel_out\x18\xda\x86\x03\x20\x01(\x08\x12!.goog\ ptionsR\x0bbitcoinOnly:U\n\x17has_bitcoin_only_values\x18\xb9\x8e\x03\
le.protobuf.EnumValueOptionsR\nchannelOut:B\n\npairing_in\x18\xdb\x86\ \x20\x01(\x08\x12\x1c.google.protobuf.EnumOptionsR\x14hasBitcoinOnlyValu\
\x03\x20\x01(\x08\x12!.google.protobuf.EnumValueOptionsR\tpairingIn:D\n\ es:T\n\x14experimental_message\x18\xa1\x96\x03\x20\x01(\x08\x12\x1f.goog\
\x0bpairing_out\x18\xdc\x86\x03\x20\x01(\x08\x12!.google.protobuf.EnumVa\ le.protobuf.MessageOptionsR\x13experimentalMessage:>\n\twire_type\x18\
lueOptionsR\npairingOut:F\n\x0cbitcoin_only\x18\xe0\xd4\x03\x20\x01(\x08\ \xa2\x96\x03\x20\x01(\r\x12\x1f.google.protobuf.MessageOptionsR\x08wireT\
\x12!.google.protobuf.EnumValueOptionsR\x0bbitcoinOnly:U\n\x17has_bitcoi\ ype:F\n\rinternal_only\x18\xa3\x96\x03\x20\x01(\x08\x12\x1f.google.proto\
n_only_values\x18\xb9\x8e\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumO\ buf.MessageOptionsR\x0cinternalOnly:N\n\x12experimental_field\x18\x89\
ptionsR\x14hasBitcoinOnlyValues:T\n\x14experimental_message\x18\xa1\x96\ \x9e\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x11experimen\
\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x13experimenta\ talField:U\n\x17include_in_bitcoin_only\x18\xe0\xd4\x03\x20\x01(\x08\x12\
lMessage:>\n\twire_type\x18\xa2\x96\x03\x20\x01(\r\x12\x1f.google.protob\ \x1c.google.protobuf.FileOptionsR\x14includeInBitcoinOnlyB4\n#com.satosh\
uf.MessageOptionsR\x08wireType:F\n\rinternal_only\x18\xa3\x96\x03\x20\ ilabs.trezor.lib.protobufB\rTrezorOptions\
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cinternalOnly:N\n\
\x12experimental_field\x18\x89\x9e\x03\x20\x01(\x08\x12\x1d.google.proto\
buf.FieldOptionsR\x11experimentalField:U\n\x17include_in_bitcoin_only\
\x18\xe0\xd4\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x14in\
cludeInBitcoinOnlyB4\n#com.satoshilabs.trezor.lib.protobufB\rTrezorOptio\
ns\
"; ";
/// `FileDescriptorProto` object which was a source for this generated file /// `FileDescriptorProto` object which was a source for this generated file