Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 299345bb authored by Joshua Duong's avatar Joshua Duong
Browse files

Use keymasterSwEnforcedUserAuthenticators if keymasterHwEnforcedUserAuthenticators is zero.

Bug: 186562600

Test: atest android.appsecurity.cts.AuthBoundKeyTest#useInvalidatedAuthBoundKey
Change-Id: I52a9c04b3e000416fb141d90d8d1f034348499de
parent 844e7e7f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -252,7 +252,9 @@ public class AndroidKeyStoreSecretKeyFactorySpi extends SecretKeyFactorySpi {
                blockModes,
                userAuthenticationRequired,
                (int) userAuthenticationValidityDurationSeconds,
                keymasterHwEnforcedUserAuthenticators,
                userAuthenticationRequirementEnforcedBySecureHardware
                        ? keymasterHwEnforcedUserAuthenticators
                        : keymasterSwEnforcedUserAuthenticators,
                userAuthenticationRequirementEnforcedBySecureHardware,
                userAuthenticationValidWhileOnBody,
                trustedUserPresenceRequired,