1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-21 23:18:13 +00:00

common/protob: Add CancelAuthorization message.

This commit is contained in:
Andrew Kozlik 2020-08-03 18:13:12 +02:00 committed by Andrew Kozlik
parent a6c06b5c5f
commit 5c1f197602
8 changed files with 43 additions and 1 deletions

View File

@ -387,3 +387,12 @@ message DoPreauthorized {
*/
message PreauthorizedRequest {
}
/**
* Request: Cancel any outstanding authorization in the current session.
* @start
* @next Success
* @next Failure
*/
message CancelAuthorization {
}

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -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