From fa816c9e97eb1a8f24ac2ab9e89f0c6e7f150248 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 25 Sep 2019 11:36:48 +0200 Subject: [PATCH] core: disable sd_protect for now --- core/src/apps/management/__init__.py | 1 - tests/device_tests/test_msg_sd_protect.py | 62 ----------------------- 2 files changed, 63 deletions(-) delete mode 100644 tests/device_tests/test_msg_sd_protect.py diff --git a/core/src/apps/management/__init__.py b/core/src/apps/management/__init__.py index 51eb80ced0..e1bbbc3869 100644 --- a/core/src/apps/management/__init__.py +++ b/core/src/apps/management/__init__.py @@ -14,4 +14,3 @@ def boot() -> None: wire.add(MessageType.ApplyFlags, __name__, "apply_flags") wire.add(MessageType.ChangePin, __name__, "change_pin") wire.add(MessageType.SetU2FCounter, __name__, "set_u2f_counter") - wire.add(MessageType.SdProtect, __name__, "sd_protect") diff --git a/tests/device_tests/test_msg_sd_protect.py b/tests/device_tests/test_msg_sd_protect.py deleted file mode 100644 index 943d968fcf..0000000000 --- a/tests/device_tests/test_msg_sd_protect.py +++ /dev/null @@ -1,62 +0,0 @@ -# This file is part of the Trezor project. -# -# Copyright (C) 2012-2019 SatoshiLabs and contributors -# -# This library is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# as published by the Free Software Foundation. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the License along with this library. -# If not, see . - -import pytest - -from trezorlib import debuglink, device, messages as proto -from trezorlib.exceptions import TrezorFailure - -from ..common import MNEMONIC12 - - -@pytest.mark.skip_t1 -class TestMsgSdProtect: - @pytest.mark.setup_client(mnemonic=MNEMONIC12) - def test_sd_protect(self, client): - - # Disabling SD protection should fail - with pytest.raises(TrezorFailure): - device.sd_protect(client, proto.SdProtectOperationType.DISABLE) - - # Enable SD protection - device.sd_protect(client, proto.SdProtectOperationType.ENABLE) - - # Enabling SD protection should fail - with pytest.raises(TrezorFailure): - device.sd_protect(client, proto.SdProtectOperationType.ENABLE) - - # Wipe - device.wipe(client) - debuglink.load_device_by_mnemonic( - client, - mnemonic=MNEMONIC12, - pin="", - passphrase_protection=False, - label="test", - ) - - # Enable SD protection - device.sd_protect(client, proto.SdProtectOperationType.ENABLE) - - # Refresh SD protection - device.sd_protect(client, proto.SdProtectOperationType.REFRESH) - - # Disable SD protection - device.sd_protect(client, proto.SdProtectOperationType.DISABLE) - - # Refreshing SD protection should fail - with pytest.raises(TrezorFailure): - device.sd_protect(client, proto.SdProtectOperationType.REFRESH)