measure single-use Keystore support instead of trusting the feature flags (v2.14.76) isSupported() gated PIN setup on FEATURE_KEYSTORE_LIMITED_USE_KEY / SINGLE_USE_KEY. Measured on a Galaxy Z Fold 6 (SM-F966U1, SDK 36), those flags are absent while setMaxUsageCount(1) HMAC keys are fully enforced in both StrongBox and TEE: the first MAC succeeds and the key is then gone, whereas a non-limited-use key survives a second MAC. The flags therefore disabled PIN unlock outright on hardware that supports it. isSupported() now runs the enforcement probe that configure() already required and caches the result per store instance, so SettingsViewModel's one call site pays a single key generation. configure() drops its now-redundant explicit probe, and the probe itself drops its isSupported() guard to break the circular dependency. The Settings error copy no longer names the feature flags. Verification on the Fold: PinUnlockStoreHardwareTest 6 passed / 2 skipped, with strongbox_tier_is_used_when_device_advertises_strongbox, wrong_pin_exhaustion_requires_master_password_replenishment, v3_envelope_survives_store_reinstantiation, and the single-use enforcement probe all green; the two skips require StrongBox-absent and unsupported hardware. Full JVM suite 1015 tests / 0 failures / 0 errors / 2 skipped; lintDebug clean; assembleDebug and debug androidTest sources compile.
$ koh steal kepr.uk/peach-android@106d9ea293aa
·
parent: c109b3212302
discussion
log in to leave a comment.