diff --git a/common/protob/messages-management.proto b/common/protob/messages-management.proto index 9a62403fe..64cecea98 100644 --- a/common/protob/messages-management.proto +++ b/common/protob/messages-management.proto @@ -387,3 +387,12 @@ message DoPreauthorized { */ message PreauthorizedRequest { } + +/** + * Request: Cancel any outstanding authorization in the current session. + * @start + * @next Success + * @next Failure + */ +message CancelAuthorization { +} diff --git a/common/protob/messages.proto b/common/protob/messages.proto index f23244bb5..033f0cdea 100644 --- a/common/protob/messages.proto +++ b/common/protob/messages.proto @@ -66,6 +66,7 @@ enum MessageType { MessageType_EndSession = 83 [(wire_in) = true]; MessageType_DoPreauthorized = 84 [(wire_in) = true]; MessageType_PreauthorizedRequest = 85 [(wire_out) = true]; + MessageType_CancelAuthorization = 86 [(wire_in) = true]; // Deprecated messages, kept for protobuf compatibility. // Both are marked wire_out so that we don't need to implement incoming handler for legacy diff --git a/core/src/trezor/messages/CancelAuthorization.py b/core/src/trezor/messages/CancelAuthorization.py new file mode 100644 index 000000000..90e212529 --- /dev/null +++ b/core/src/trezor/messages/CancelAuthorization.py @@ -0,0 +1,14 @@ +# Automatically generated by pb2py +# fmt: off +import protobuf as p + +if __debug__: + try: + from typing import Dict, List # noqa: F401 + from typing_extensions import Literal # noqa: F401 + except ImportError: + pass + + +class CancelAuthorization(p.MessageType): + MESSAGE_WIRE_TYPE = 86 diff --git a/core/src/trezor/messages/MessageType.py b/core/src/trezor/messages/MessageType.py index 8cbe72433..cbeb374aa 100644 --- a/core/src/trezor/messages/MessageType.py +++ b/core/src/trezor/messages/MessageType.py @@ -41,6 +41,7 @@ ChangeWipeCode = 82 # type: Literal[82] EndSession = 83 # type: Literal[83] DoPreauthorized = 84 # type: Literal[84] PreauthorizedRequest = 85 # type: Literal[85] +CancelAuthorization = 86 # type: Literal[86] Deprecated_PassphraseStateRequest = 77 # type: Literal[77] Deprecated_PassphraseStateAck = 78 # type: Literal[78] FirmwareErase = 6 # type: Literal[6] diff --git a/legacy/firmware/protob/Makefile b/legacy/firmware/protob/Makefile index ac5f5642c..aff7aecf5 100644 --- a/legacy/firmware/protob/Makefile +++ b/legacy/firmware/protob/Makefile @@ -4,7 +4,8 @@ endif SKIPPED_MESSAGES := Binance Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tezos WebAuthn \ DebugLinkRecordScreen DebugLinkReseedRandom DebugLinkShowText DebugLinkEraseSdCard DebugLinkWatchLayout \ - GetOwnershipProof OwnershipProof GetOwnershipId OwnershipId AuthorizeCoinJoin DoPreauthorized + GetOwnershipProof OwnershipProof GetOwnershipId OwnershipId AuthorizeCoinJoin DoPreauthorized \ + CancelAuthorization ifeq ($(BITCOIN_ONLY), 1) SKIPPED_MESSAGES += Ethereum Lisk NEM Stellar diff --git a/python/src/trezorlib/messages/CancelAuthorization.py b/python/src/trezorlib/messages/CancelAuthorization.py new file mode 100644 index 000000000..21c31a28a --- /dev/null +++ b/python/src/trezorlib/messages/CancelAuthorization.py @@ -0,0 +1,14 @@ +# Automatically generated by pb2py +# fmt: off +from .. import protobuf as p + +if __debug__: + try: + from typing import Dict, List # noqa: F401 + from typing_extensions import Literal # noqa: F401 + except ImportError: + pass + + +class CancelAuthorization(p.MessageType): + MESSAGE_WIRE_TYPE = 86 diff --git a/python/src/trezorlib/messages/MessageType.py b/python/src/trezorlib/messages/MessageType.py index a6733a50e..ac26d2663 100644 --- a/python/src/trezorlib/messages/MessageType.py +++ b/python/src/trezorlib/messages/MessageType.py @@ -39,6 +39,7 @@ ChangeWipeCode = 82 # type: Literal[82] EndSession = 83 # type: Literal[83] DoPreauthorized = 84 # type: Literal[84] PreauthorizedRequest = 85 # type: Literal[85] +CancelAuthorization = 86 # type: Literal[86] Deprecated_PassphraseStateRequest = 77 # type: Literal[77] Deprecated_PassphraseStateAck = 78 # type: Literal[78] FirmwareErase = 6 # type: Literal[6] diff --git a/python/src/trezorlib/messages/__init__.py b/python/src/trezorlib/messages/__init__.py index 818728456..84f849fc8 100644 --- a/python/src/trezorlib/messages/__init__.py +++ b/python/src/trezorlib/messages/__init__.py @@ -21,6 +21,7 @@ from .BinanceTxRequest import BinanceTxRequest from .ButtonAck import ButtonAck from .ButtonRequest import ButtonRequest from .Cancel import Cancel +from .CancelAuthorization import CancelAuthorization from .CardanoAddress import CardanoAddress from .CardanoAddressParametersType import CardanoAddressParametersType from .CardanoBlockchainPointerType import CardanoBlockchainPointerType