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

Commit b0addbaa authored by Chad Brubaker's avatar Chad Brubaker
Browse files

Fix testAuthNeeded test

begin now returns OP_AUTH_REQUIRED for per operations with per op
authorization instead of NO_ERROR.

Change-Id: I1f472125f46155833e03ab30bf18363ff51b2c58
parent a51f14d0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -944,7 +944,8 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> {
        assertEquals("Generate should succeed", KeyStore.NO_ERROR, rc);
        OperationResult result = mKeyStore.begin(name, KeymasterDefs.KM_PURPOSE_ENCRYPT,
                true, args, null, out);
        assertEquals("Begin should succeed", KeyStore.NO_ERROR, result.resultCode);
        assertEquals("Begin should expect authorization", KeyStore.OP_AUTH_NEEDED,
                result.resultCode);
        IBinder token = result.token;
        result = mKeyStore.update(token, null, new byte[] {0x01, 0x02, 0x03, 0x04});
        assertEquals("Update should require authorization",