diff --git a/core/src/apps/common/storage/common.py b/core/src/apps/common/storage/common.py index f00c3ea36..4425c337c 100644 --- a/core/src/apps/common/storage/common.py +++ b/core/src/apps/common/storage/common.py @@ -10,7 +10,7 @@ if False: APP_DEVICE = const(0x01) APP_RECOVERY = const(0x02) APP_RECOVERY_SHARES = const(0x03) -APP_FIDO2 = const(0x04) +APP_WEBAUTHN = const(0x04) # fmt: on _FALSE_BYTE = b"\x00" diff --git a/core/src/apps/common/storage/webauthn.py b/core/src/apps/common/storage/webauthn.py index faf2d3585..a86a19c32 100644 --- a/core/src/apps/common/storage/webauthn.py +++ b/core/src/apps/common/storage/webauthn.py @@ -26,7 +26,7 @@ def get_resident_credential( return None stored_cred_data = common.get( - common.APP_FIDO2, index + _RESIDENT_CREDENTIAL_START_KEY + common.APP_WEBAUTHN, index + _RESIDENT_CREDENTIAL_START_KEY ) if stored_cred_data is None: return None @@ -50,7 +50,7 @@ def store_resident_credential(cred: Fido2Credential) -> bool: slot = None for i in range(_MAX_RESIDENT_CREDENTIALS): stored_cred_data = common.get( - common.APP_FIDO2, i + _RESIDENT_CREDENTIAL_START_KEY + common.APP_WEBAUTHN, i + _RESIDENT_CREDENTIAL_START_KEY ) if stored_cred_data is None: if slot is None: @@ -78,7 +78,7 @@ def store_resident_credential(cred: Fido2Credential) -> bool: return False common.set( - common.APP_FIDO2, + common.APP_WEBAUTHN, slot + _RESIDENT_CREDENTIAL_START_KEY, cred.rp_id_hash + cred.id, ) @@ -87,11 +87,11 @@ def store_resident_credential(cred: Fido2Credential) -> bool: def erase_resident_credentials() -> None: for i in range(_MAX_RESIDENT_CREDENTIALS): - common.delete(common.APP_FIDO2, i + _RESIDENT_CREDENTIAL_START_KEY) + common.delete(common.APP_WEBAUTHN, i + _RESIDENT_CREDENTIAL_START_KEY) def erase_resident_credential(index: int) -> bool: if not (0 <= index < _MAX_RESIDENT_CREDENTIALS): return False - common.delete(common.APP_FIDO2, index + _RESIDENT_CREDENTIAL_START_KEY) + common.delete(common.APP_WEBAUTHN, index + _RESIDENT_CREDENTIAL_START_KEY) return True