Commit graph

576 commits

Author SHA1 Message Date
David Zeuthen
34abaaefcb identity: Fix attestation and documentation problems.
- The docs said that IdentityCredential.createEphemeralKey() returned
  data encoded PKCS#8 which is wrong. It's supposed to be in DER format
  which is also what the VTS tests and credstore expects.

- Clarify that createEphemeralKeyPair(), setReaderEphemeralPublicKey(),
  and createAuthChallenge() are all optional.

- Avoid passing an invalid profile ID in the IdentityCredentialTests.
  verifyOneProfileAndEntryPass test.

- Update requirements for which tags must be present in the attestation
  for CredentialKey as well as the requirements on expiration date and
  the issuer name.  Update default implementation to satisfy these
  requirements. Update VTS tests to carefully verify these requrements
  are met.

- Clarify requirements for X.509 cert for AuthenticationKey. Add VTS
  test to verify.

- Mandate that TAG_IDENTITY_CREDENTIAL_KEY must not be set for test
  credentials. Add VTS test to verify this.

- Make default implementation pretend to be implemented in a trusted
  environment and streamline VTS tests to not special-case for the
  default implementation.

- Switch to using the attestation extension parser from the KM 4.1
  support library instead of the one from system/keymaster. The latter
  one did not support the latest attestation extension and thus would
  fail for pretty much anything that wasn't the default HAL impl.

- Fix a couple of bugs in keymaster::V4_1::parse_attestation_record():
  - Report root_of_trust.security_level
  - Add support for Tag::IDENTITY_CREDENTIAL_KEY

- Fix how EMacKey is calculated.

- Add test vectors to verify how EMacKey and DeviceMac is calculated.

Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts
Bug: 171745570
Change-Id: I2f8bd772de078556733f769cec2021918d1d7de6
2020-11-17 13:44:00 -05:00
Selene Huang
31ab404a5e Implement keymint V1 aidl interfaces, service module, and vts tests.
Bug: b/160968242
Test: atest VtsHalKeyMintV1_0TargetTest

Change-Id: I5f9d642f96e262dd567d88f4d582e621d168dceb
2020-11-17 01:11:42 -08:00
Treehugger Robot
f65abbd1c8 Merge "Allowing GSI patch level to be greater than vbmeta SPL" am: b22330e065 am: c12559f79e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1256345

Change-Id: If6721904a50f164626d30460a2b13c59ffd2814f
2020-09-02 03:39:52 +00:00
Treehugger Robot
c12559f79e Merge "Allowing GSI patch level to be greater than vbmeta SPL" am: b22330e065
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1256345

Change-Id: Ic3b7ee64244f03625af7cd2aea055f31febdb19d
2020-09-02 02:27:02 +00:00
TreeHugger Robot
484456242d Merge "Keymaster: update the verifyAuthorization call time and delta time in VerificationToken VTS" into stage-aosp-rvc-ts-dev am: 9ade092595 am: 872216fd37
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12430970

Change-Id: I065b9d6122747a55eb4decf0b32b7ff20756e26c
2020-08-31 18:34:09 +00:00
Xin Li
36dcf1a404 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I6502829205ede2de914b27e6c2c5c42916af2b39
Change-Id: I7cb06511e43bd1fffd5f80a11dbdf5b1314cfe8e
2020-08-28 13:05:04 -07:00
Bowgo Tsai
63c0129fa6 Allowing GSI patch level to be greater than vbmeta SPL
The GSI patch level might be greater than the vbmeta SPL, because
GSI system.img might be updated via the DSU flow, where vbmeta.img won't
be updated in this scenario.

  https://developer.android.com/topic/dsu

Allowing GSI patch level to be greater than or equal to the vbmeta SPL,
since Treble allows new system.img works on old vendor images.

Bug: 145377203
Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: Ib761d80c88695eb2db08b0dc00e30fcdc2788865
2020-08-26 13:16:25 +08:00
Treehugger Robot
1790d8c313 Merge "Disable the test TooManyOperations in keymaster VTS" am: 8a42374ffa am: bf31c055f5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1370458

Change-Id: I438ee9a69722fc6e190a0c5440194dbd29c839ea
2020-08-26 00:37:03 +00:00
kh0705
f5b567afab Keymaster: update the verifyAuthorization call time and delta time in VerificationToken VTS
The keymaster function affects the performance of secure os. When considering the swtiching time of the normal world < - > Secure world and the processing delay of the SecureOS by the scheduling policy of the normal world, it is necessary to increase the time.
Even though Secure world is no problem, Sometimes there is a possibility of that the test will fail because it is a limited resource normal world.
On average, it is performed in a very fast time, but sometimes it takes a lot of time. After many tests, the safe time was measured.

Bug: 162115135

Change-Id: I55862204ef71f69bc88c79fe2259f7cb8365699a
Signed-off-by: kh0705 <kh0705.park@samsung.com>
2020-08-24 15:01:16 +08:00
Treehugger Robot
8a42374ffa Merge "Disable the test TooManyOperations in keymaster VTS" 2020-08-19 19:07:08 +00:00
Eran Messeri
6a1198e166 Merge "Fix Keymaster VTS unique attestation failure" am: 3e4d8d0856 am: b0f932739a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1372156

Change-Id: I0e2ee2609c8fcf82ad31d9c97423b9006862cb97
(cherry picked from commit 4e3c9a1d65)

Bug: 160518399

Exempt-From-Owner-Approval: already approved as aosp/1372156.
Change-Id: I0e2ee2609c8fcf82ad31d9c97423b9006862cb97
2020-08-05 14:54:17 +00:00
Dan Shi
e5c9b5e722 Suppress gtest error for tests without any instance am: ba4d532fee am: 73122cd284
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1374050

Change-Id: Ie5e956d4613f5e947c36ba4f1048f0c3aa8944ba
2020-07-29 05:45:58 +00:00
Dan Shi
ba4d532fee Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I8c1a48e6fbd7c8161137902b5332911fa0d7b8b3
2020-07-28 15:12:32 -07:00
Eran Messeri
4e3c9a1d65 Merge "Fix Keymaster VTS unique attestation failure" am: 3e4d8d0856 am: b0f932739a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1372156

Change-Id: I0e2ee2609c8fcf82ad31d9c97423b9006862cb97
2020-07-24 13:34:02 +00:00
allen.zhang
569a61290e Fix Keymaster VTS unique attestation failure
Adding TAG_DEVICE_UNIQUE_ATTESTATION & CheckedDeleteKey()
in TEST_P(DeviceUniqueAttestationTest, NonStrongBoxOnly)
Test procedure:
1.Build APP "VtsHalKeymasterV4_1TargetTest" in android project,
then replace it to VTS testcase(version in 0610).
2. ./vts-tradefed
3.run vts -m VtsHalKeymasterV4_1TargetTest
Result:all testcase pass

Bug: 158724430
Test: m VtsHalKeymasterV4_1TargetTest && echo run vts -m VtsHalKeymasterV4_1TargetTest | ./vts-tradefed

Change-Id: I693c23596a045bf9af9fe6cc483924fd7cfc6ce6
2020-07-23 12:39:13 +01:00
Gaurav Kashyap
48f67e8438 Disable the test TooManyOperations in keymaster VTS
The test fails on devices because an unknown
client starts a keymaster BEGIN operation during
bootup but does not finish it. This affects the
keymaster hardware implementation's capability
to support the maximum possible operations while
running this test.

Bug: 154801042

Change-Id: Ib6adc6c28ebe76ddfdc2c66cd17cf78c04e5b468
2020-07-22 11:14:44 -07:00
Jooyung Han
d610435ac4 update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-07 16:22:36 +09:00
Joseph Jang
955aa4ecc6 Merge "Keymaster: Fix potential bug in extractUint32()/extractUint64()" am: 991650fd8a am: e9e59bd5d1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1354466

Change-Id: I1bf12c37f39067857ab27f51ed08bbe1bfd73ef3
2020-07-07 03:01:03 +00:00
josephjang
4feb8cd284 Keymaster: Fix potential bug in extractUint32()/extractUint64()
In deserializeVerificationToken(), we use extractUint64() to extract
VerificationToken.challenge. A potential bug was found in
extractUint64() that will cause VerificationToken.challenge()
incorrect.

Bug: 160198696
Merged-In: Ie0d2c0127cc34f1bb90455e4f7869e15e5542173
Change-Id: Ie0d2c0127cc34f1bb90455e4f7869e15e5542173
2020-07-06 07:03:27 +00:00
josephjang
c96b1fab12 Keymaster: Fix potential bug in extractUint32()/extractUint64()
In deserializeVerificationToken(), we use extractUint64() to extract
VerificationToken.challenge. A potential bug was found in
extractUint64() that will cause VerificationToken.challenge()
incorrect.

Bug: 160198696
Change-Id: Ie0d2c0127cc34f1bb90455e4f7869e15e5542173
2020-07-06 14:53:55 +08:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Shawn Willden
a2a6a33ea9 Fix delivery of earlyBootEnded to KM4.1
Bug: 152932559
Test: Boot and observe that Strongbox gets the message
Merged-In: I752b44f5cc20d85bf819188ccaaf0813a5607ba5
Change-Id: I752b44f5cc20d85bf819188ccaaf0813a5607ba5
2020-06-01 14:08:39 -06:00
Bowgo Tsai
307d2bba7d Allow unlocked in VTS
VTS was running on a userdebug build GSI before Android 10.
Starting from Android 10, VTS is switched to running on top of a
user build GSI image, plus the device-specific boot-debug.img to
allow adb root.

   https://source.android.com/compatibility/vts/vts-on-gsi

So 'ro.build.type' will be 'user' because the value comes from
/system/build.prop. Switching to using 'ro.debuggable' to decide
whether we should check the device is locked or not. Note that
'ro.debuggable' will be '1' for userdebug/eng images or when a
boot-debug.img is used.

Bug: 154449286
Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: If5a90d62f77489aa58f96e908553a052cf6d1e18
Merged-In: If5a90d62f77489aa58f96e908553a052cf6d1e18
(cherry picked from commit 43dd6e34bd)
2020-06-01 13:20:52 +08:00
Bowgo Tsai
40eb1a490b Allow unlocked in VTS am: 43dd6e34bd am: 767b4b3c2a
Change-Id: Ia559b9083b1ac7960b93f710fc5cb2d5390dfac7
2020-06-01 04:25:02 +00:00
Bowgo Tsai
43dd6e34bd Allow unlocked in VTS
VTS was running on a userdebug build GSI before Android 10.
Starting from Android 10, VTS is switched to running on top of a
user build GSI image, plus the device-specific boot-debug.img to
allow adb root.

   https://source.android.com/compatibility/vts/vts-on-gsi

So 'ro.build.type' will be 'user' because the value comes from
/system/build.prop. Switching to using 'ro.debuggable' to decide
whether we should check the device is locked or not. Note that
'ro.debuggable' will be '1' for userdebug/eng images or when a
boot-debug.img is used.

Bug: 154449286
Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: If5a90d62f77489aa58f96e908553a052cf6d1e18
2020-05-29 07:49:11 +00:00
David Zeuthen
b1e8ff545a Identity Credential: Add method to accept verification token.
This is to facilitate HAL implementations using a TA existing in a
different environment than where auth tokens are minted. This method
will be used by credstore in a companion CL.

This modifies version 2 of the Identity Credential API (which was
never been released) to add a new method and creates version 2 of the
Keymaster types-only AIDL API to include the new VerificationToken
parcelable and SecurityLevel enum.

Bug: 156076333
Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts
Merged-In: I7d05413a9ec70225ce419079f3cc9daf026cf744
Change-Id: Idd7ab041d87617556ed840403033b642f8c2ab86
2020-05-18 15:55:21 -04:00
Steven Moreland
1fd48bb036 Merge "Reminder to freeze keymaster at version "5"" am: a634e859df am: b9e98012e4
Change-Id: I08e4083e092030aaf16eb81c69783d9b1d24dc84
2020-05-11 19:45:36 +00:00
Treehugger Robot
5f2523d609 Merge "Identity Credential: Add method to accept verification token." am: 1ac087e4d6 am: 40577ac4f9
Change-Id: I232a8c45dd5d94cf8a2a2215fa99dd54425a9789
2020-05-11 19:45:12 +00:00
Steven Moreland
a634e859df Merge "Reminder to freeze keymaster at version "5"" 2020-05-11 17:46:10 +00:00
Steven Moreland
3c1519c550 Reminder to freeze keymaster at version "5"
Fixes: 155808722
Test: freeze-api produces error
Change-Id: I0b6d41a129f1a8cb064c394c73a3a70a6f2abc32
2020-05-08 16:33:55 +00:00
David Zeuthen
a8ed82cbb4 Identity Credential: Add method to accept verification token.
This is to facilitate HAL implementations using a TA existing in a
different environment than where auth tokens are minted. This method
will be used by credstore in a companion CL.

This modifies version 2 of the Identity Credential API (which was
never been released) to add a new method and creates version 2 of the
Keymaster types-only AIDL API to include the new VerificationToken
parcelable and SecurityLevel enum.

Bug: 156076333
Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts

Change-Id: I7d05413a9ec70225ce419079f3cc9daf026cf744
2020-05-08 11:33:23 -04:00
TreeHugger Robot
830c4875ad Merge "Round off attestation tests." into rvc-dev am: 2023afbe66
Change-Id: I1c83c78bd3ac674a5f4aeb2356d4e127ef2d617c
2020-05-07 16:28:58 +00:00
TreeHugger Robot
d35a504e05 Merge "Fix StrongBoxOnly test" into rvc-dev am: ba1a4c7f6d
Change-Id: Ie7ecb3d434786f3cf4bdb472cfe0c7cbfe673e4d
2020-05-07 16:28:44 +00:00
Treehugger Robot
349af3e40c Merge "Allow device properties tags for attestation" am: 9a2f497439 am: 3fd8b10984
Change-Id: I3b8e79ebf16b60d9236f1ba207255950ade3c701
2020-04-24 08:30:54 +00:00
nagendra modadugu
eb7f3527de Round off attestation tests.
This CL needs some polish.  Changes
herein are somewhat brute-force to
make things work, particularly with
authorization-list parsing and validation.

This CL also copies over support for
dumping attestation records.

Bug: 129282228
Test: VtsHalKeymasterV4_1TargetTest
Change-Id: I4fc0183dc0b8a76e84d14054b38ad7c1540a1897
2020-04-22 04:21:36 +00:00
nagendra modadugu
5d531a26c0 Fix StrongBoxOnly test
This test is expected to be run
on non-StrongBox instances.

Bug: 129282228
Test: StrongBoxOnly passes on TZ
Change-Id: Ia6b274d097b4c698904d1c51daed821188a50510
2020-04-22 02:17:08 +00:00
Dorin Drimus
b20a4e01ef Allow device properties tags for attestation
Test: atest CtsKeystoreTestCases
Bug: 152945378
Change-Id: I9c85283f007535612bf4ebbfbe8b7e86a758286c
2020-04-20 17:44:56 +02:00
TreeHugger Robot
0260d7d1ee Merge "Fix delivery of earlyBootEnded to KM4.1" into rvc-dev 2020-04-15 14:56:34 +00:00
Shawn Willden
08c7e71236 Fix delivery of earlyBootEnded to KM4.1
Bug: 152932559
Test: Boot and observe that Strongbox gets the message
Change-Id: I752b44f5cc20d85bf819188ccaaf0813a5607ba5
2020-04-14 21:48:11 -06:00
TreeHugger Robot
ecd5e55cc1 Merge "Correct UseHmacKey parameter" into rvc-dev 2020-04-15 02:19:58 +00:00
Treehugger Robot
08ea51852b Merge "Remove IOperation and beginOp." 2020-04-10 16:23:49 +00:00
Shawn Willden
ca71a6e839 Merge "Fixed encoding of device_locked field" into rvc-dev 2020-04-10 16:08:07 +00:00
Shawn Willden
994c65e5bc Fixed encoding of device_locked field
The attestation code used boringssl's ASN.1 encoding tools
incorrectly, causing it to encode incorrect values in device_locked.

Bug: b/152503089
Test: Build & boot
Merged-In: I3c5352523b2db37d539ad353ac8c48c1585eb08d
Change-Id: I3c5352523b2db37d539ad353ac8c48c1585eb08d
2020-04-09 15:44:36 -06:00
Jeongik Cha
a73d6bc97e Freeze vintf aidl interfaces
AIDL interfaces which are vintf-stable have to be frozen in release.
But these interfaces have been never frozen, so freeze them.

- android.hardware.power
- android.hardware.identity
- android.hardware.keymaster
- android.hardware.vibrator
- android.hardware.light
- android.hardware.tests.extension.vibrator

Bug: 153500421
Bug: 153500550
Bug: 153511407
Bug: 153500549
Bug: 153501107
Bug: 153501202
Test: m
Change-Id: I643c25fc695f9d1e874dcceb327d465c49e9cab6
Merged-In: I643c25fc695f9d1e874dcceb327d465c49e9cab6
2020-04-09 08:27:34 +00:00
Treehugger Robot
15664d3f58 Merge "Freeze vintf aidl interfaces" 2020-04-09 07:49:49 +00:00
Jeongik Cha
cfb374895d Freeze vintf aidl interfaces
AIDL interfaces which are vintf-stable have to be frozen in release.
But these interfaces have been never frozen, so freeze them.

- android.hardware.power
- android.hardware.identity
- android.hardware.keymaster
- android.hardware.vibrator
- android.hardware.light
- android.hardware.tests.extension.vibrator

Bug: 153500421
Bug: 153500550
Bug: 153511407
Bug: 153500549
Bug: 153501107
Bug: 153501202
Test: m
Change-Id: I643c25fc695f9d1e874dcceb327d465c49e9cab6
2020-04-08 20:28:40 +09:00
Jiyong Park
fbaea712a3 Update the current API dump
All aidl_interface modules should by default considered as stable, in
case it is used across system and vendor partitions, or across modules.
Like other API surfaces, we need to have a dump for the current
(yet-to-be-released) version and update it when there is an API change.
This is done via .

Then the owner of the interface can freeze the current version as a
numbered version via .

This change shal be rejected only when the owner is certain that the
interface is not used across the updatable boundaries.

Bug: 152655547
Test: m
Change-Id: Id167905590c0a596b0ed470ef668c47810966836
Merged-In: Id167905590c0a596b0ed470ef668c47810966836
2020-04-08 18:38:49 +09:00
Dan Shi
aad51fa000 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 16:37:40 -07:00
Dan Shi
ba894f81db Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 15:17:02 -07:00
Shawn Willden
e32c142da4 Remove IOperation and beginOp.
The way I planned for this to work doesn't work.  We'll revisit in
Keymaster5.  For now, removing IOperation and beginOp.

Test: Build & boot
Merged-In: I017d17079380cc3bacc6f05b2486e1b6e6c3f675
Change-Id: I017d17079380cc3bacc6f05b2486e1b6e6c3f675
2020-04-02 12:47:32 -06:00
Shawn Willden
664ff765af Fixed encoding of device_locked field
The attestation code used boringssl's ASN.1 encoding tools
incorrectly, causing it to encode incorrect values in device_locked.

Bug: b/152503089
Test: Build & boot
Change-Id: I3c5352523b2db37d539ad353ac8c48c1585eb08d
2020-04-01 13:54:33 -06:00
Tommy Chiu
83691500e1 Correct UseHmacKey parameter
HMAC key was created with Digest(Digest::SHA_2_256) which is missing in
the UseHmacKey function

Bug: 152932473
Test: VtsHalKeymasterV4_1TargetTest
Change-Id: If63dd197fe12172e14be9890ab07a00c3eef4a4c
2020-04-01 07:02:35 +00:00
TreeHugger Robot
eb4c2de355 Merge "Update the current API dump" into rvc-dev 2020-03-31 01:00:06 +00:00
TreeHugger Robot
220b3237dd Merge "Remove IOperation and beginOp." into rvc-dev 2020-03-30 17:59:00 +00:00
Jiyong Park
905ebbed43 Update the current API dump
All aidl_interface modules should by default considered as stable, in
case it is used across system and vendor partitions, or across modules.
Like other API surfaces, we need to have a dump for the current
(yet-to-be-released) version and update it when there is an API change.
This is done via .

Then the owner of the interface can freeze the current version as a
numbered version via .

This change shal be rejected only when the owner is certain that the
interface is not used across the updatable boundaries.

Bug: 152655547
Test: m
Change-Id: Id167905590c0a596b0ed470ef668c47810966836
2020-03-30 14:59:06 +09:00
Roman Kiryanov
779c6327ec Add vintf_fragments to keymaster@4.1-service
Bug: 152616625
Bug: 152554068
Test: boot emulator, lshal | grep keymaster
Signed-off-by: Roman Kiryanov <rkir@google.com>
Merged-In: I36818fdc0f7732174fc7b2fd7619b1ae75b5b33d
Change-Id: I2d7336c3f45ee7722d04ade091d50432e1fd6f99
2020-03-27 15:30:23 -07:00
Roman Kiryanov
1cc355b57b Add vintf_fragments to keymaster@4.1-service
Bug: 152616625
Bug: 152554068
Test: boot emulator, lshal | grep keymaster
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I36818fdc0f7732174fc7b2fd7619b1ae75b5b33d
2020-03-27 10:46:21 -07:00
Shawn Willden
e0affee86b Remove IOperation and beginOp.
The way I planned for this to work doesn't work.  We'll revisit in
Keymaster5.  For now, removing IOperation and beginOp.

Bug: 152536287
Test: Build & boot
Change-Id: I017d17079380cc3bacc6f05b2486e1b6e6c3f675
2020-03-26 13:49:28 -06:00
Selene Huang
ee37ee9252 Add attestation certificate generation and identity credential tags.
Bug: 149908474
Test: atest android.security.identity.cts.AttestationTest
Test: atest VtsHalIdentityCredentialTargetTest
Test: atest android.hardware.identity-support-lib-test
Merged-In: I18c5d05d806d4157c9dce42a398cc89421e26907
Change-Id: Ifaffef3606a6398613e33982ff5db81ade1af0b2
2020-03-09 12:30:11 -04:00
Selene Huang
459cb80866 Add attestation certificate generation and identity credential tags.
Bug: 149908474
Test: atest android.security.identity.cts.AttestationTest
Test: atest VtsHalIdentityCredentialTargetTest
Test: atest android.hardware.identity-support-lib-test

Change-Id: I18c5d05d806d4157c9dce42a398cc89421e26907
2020-02-21 16:02:26 -08:00
Automerger Merge Worker
124b3af285 Merge "Port IdentityCredential HAL to AIDL." am: 6a83338df9 am: 02a80f6aab am: e216d2b09c
Change-Id: Iee51e1c0cb87eefef0c4a0208bb231ea67bb215d
2020-02-19 23:18:16 +00:00
David Zeuthen
81603155a9 Port IdentityCredential HAL to AIDL.
This includes add a partial types-only HAL for KeyMaster for
HardwareAuthToken.

Bug: 111446262
Test: atest android.security.identity.cts
Test: VtsHalIdentityTargetTest
Test: android.hardware.identity-support-lib-test
Change-Id: I7a6254d33200bfd62269aed1957cbb2a84b16272
2020-02-14 13:48:55 -05:00
Barani Muthukumaran
9e8014d1d5 Add STORAGE_KEY tag to keymaster 4.1
These are keymaster keys used specifically for storage
encryption. This provides the ability for keymaster implementations to
securely protect storage encryption keys.

Test: VtsHalKeymasterV4_1TargetTest
Bug: 147733587
Change-Id: I5f7f83755fcbed96d8f38fa51812aa6d2eb0927b
Merged-In: I5f7f83755fcbed96d8f38fa51812aa6d2eb0927b
2020-02-11 15:51:03 -07:00
Shawn Willden
166c5c70c2 Add support lib wrappers for clients
Bug: 140193672
Bug: 140192237
Test: CtsKeystoreTestCases
Change-Id: I0157df310f85d83cef07282ea80204c035626518
Merged-In: I0157df310f85d83cef07282ea80204c035626518
2020-02-11 15:51:03 -07:00
Shawn Willden
3f7c80ac05 Keymaster 4.1 VTS tests
Bug: 140193672
Bug: 140192237
Test:  VtsHalKeymasterV4_1TargetTest
Change-Id: I488402079ebb3940e021ac1558aeee15c4b133c9
Merged-In: I488402079ebb3940e021ac1558aeee15c4b133c9
2020-02-11 15:51:03 -07:00
Shawn Willden
390825b291 Update KM4 VTS tests to allow s/w implementation to pass.
Although no real devices should have a software implementation,
emulator and cloud devices do, and it's useful to be able to use them
as a development platform, which is facilitated by having useful VTS
tests.

This is in preparation for Keymaster 4.1 implementation and VTS work.

Bug: 140193672
Bug: 140192237
Bug: 140824829
Test: VtsHalKeymaster4.0TargetTest
Change-Id: Idc5de13c342ef1ac62d3131a1a2185d5e78a0d45
Merged-In: Idc5de13c342ef1ac62d3131a1a2185d5e78a0d45
2020-02-11 15:51:03 -07:00
Shawn Willden
4c813d3c21 Remove service death test.
Moving to KM4.1 VTS.

Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I8f2b7ab3305833fe8639fdefb9cc263f99684920
Merged-In: I8f2b7ab3305833fe8639fdefb9cc263f99684920
2020-02-11 15:51:03 -07:00
Shawn Willden
d6afe21ccd Change finish input test to avoid large sizes.
We'll add a large-size test to the Keymaster 4.1 VTS tests.

Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I2460106cf918e44ea5eeac5c518a89c311756eb3
Merged-In: I2460106cf918e44ea5eeac5c518a89c311756eb3
2020-02-11 15:51:03 -07:00
Shawn Willden
ef28554d35 Update Keymaster 4.0 VTS to use parameterized tests.
Bug: 139437880
Test: VtsHalKeyamsterV4_0TargetTest
Change-Id: I487000cc19fe355fdef88f1561a38b2cbfd3c3c3
Merged-In: I487000cc19fe355fdef88f1561a38b2cbfd3c3c3
2020-02-11 15:51:03 -07:00
Shawn Willden
fcc4c5c71b Remove dependency on libsoftkeymaster.
This is part of a refactor to facilitate reuse in Keymaster 4.1 VTS
tests.

Bug: 140193672
Bug: 140192237
Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I9310a851648c028850f9795d303419c6a7e29a11
Merged-In: I9310a851648c028850f9795d303419c6a7e29a11
2020-02-11 15:51:03 -07:00
Barani Muthukumaran
9bc9059842 Add STORAGE_KEY tag to keymaster 4.1
These are keymaster keys used specifically for storage
encryption. This provides the ability for keymaster implementations to
securely protect storage encryption keys.

Test: VtsHalKeymasterV4_1TargetTest
Bug: 147733587
Change-Id: I5f7f83755fcbed96d8f38fa51812aa6d2eb0927b
2020-01-22 11:33:44 -07:00
Shawn Willden
7b37dc5d9c Merge "Updates to KM4.1" 2020-01-21 21:18:21 +00:00
Shawn Willden
26a803beef Merge "Add support lib wrappers for clients" 2020-01-21 20:48:20 +00:00
TreeHugger Robot
c78e55d510 Merge changes I48840207,Idc5de13c,I8f2b7ab3,I2460106c
* changes:
  Keymaster 4.1 VTS tests
  Update KM4 VTS tests to allow s/w implementation to pass.
  Remove service death test.
  Change finish input test to avoid large sizes.
2020-01-21 20:47:04 +00:00
Automerger Merge Worker
8999898f9c Merge "Update Keymaster support lib OWNERS" am: f7238c9c01 am: e65c023c44 am: d8fd3aa17e
Change-Id: Ib7f6d20166de39022ec202450225ac90e6322842
2020-01-21 18:10:02 +00:00
Shawn Willden
c0125fb930 Update Keymaster support lib OWNERS
Test:  VtsHalKeymasterV4_0TargetTest && VtsHalKeymasterV4_1TargetTest
Change-Id: Ibc719cdc4bd8821d67659eb6a2cf4d0094322322
Merged-In: Ibc719cdc4bd8821d67659eb6a2cf4d0094322322
2020-01-21 10:30:29 -07:00
Shawn Willden
3d035b9c0b Add support lib wrappers for clients
Test: CtsKeystoreTestCases
Change-Id: I0157df310f85d83cef07282ea80204c035626518
2020-01-21 01:56:38 -07:00
Shawn Willden
b26a225b9c Keymaster 4.1 VTS tests
Test:  VtsHalKeymasterV4_1TargetTest
Change-Id: I488402079ebb3940e021ac1558aeee15c4b133c9
2020-01-21 01:31:39 -07:00
Shawn Willden
0a6755018f Update KM4 VTS tests to allow s/w implementation to pass.
Although no real devices should have a software implementation,
emulator and cloud devices do, and it's useful to be able to use them
as a development platform, which is facilitated by having useful VTS
tests.

This is in preparation for Keymaster 4.1 implementation and VTS work.

Bug: 140193672
Bug: 140192237
Bug: 140824829
Test: VtsHalKeymaster4.0TargetTest
Change-Id: Idc5de13c342ef1ac62d3131a1a2185d5e78a0d45
2020-01-21 01:31:28 -07:00
Shawn Willden
13f4bf8491 Remove service death test.
Moving to KM4.1 VTS.

Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I8f2b7ab3305833fe8639fdefb9cc263f99684920
2020-01-21 01:31:16 -07:00
Shawn Willden
c78dc91896 Change finish input test to avoid large sizes.
We'll add a large-size test to the Keymaster 4.1 VTS tests.

Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I2460106cf918e44ea5eeac5c518a89c311756eb3
2020-01-21 01:24:16 -07:00
Shawn Willden
5e1347cedf Update Keymaster 4.0 VTS to use parameterized tests.
Bug: 139437880
Test: VtsHalKeyamsterV4_0TargetTest
Change-Id: I487000cc19fe355fdef88f1561a38b2cbfd3c3c3
2020-01-21 01:12:31 -07:00
Shawn Willden
2adf7fb2d5 Remove dependency on libsoftkeymaster.
This is part of a refactor to facilitate reuse in Keymaster 4.1 VTS
tests.

Bug: 140193672
Bug: 140192237
Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I9310a851648c028850f9795d303419c6a7e29a11
2020-01-21 01:01:31 -07:00
Shawn Willden
f3d741744a Updates to KM4.1
This CL adds:

- The IDENTITY_CREDENTIAL_KEY tag.  This new tag is not actually used
  by Keymaster at all.  It's used by the new Identity Credential HAL in
  its key attestations, which use the Keymaster format and the Keymaster
  attestation key.

- A VerificationToken argument to deviceLocked, used for StrongBox
  implementations.

- Some error codes, including one to diagnose unprovisioned
  attestation keys/ids.

- Clarifications in the documentation.

Test: VtsHalKeymasterV41TargetTest
Change-Id: Iae7151e2d9b328dd73e5cd78e59687ef29bab4f0
Merged-In: Iae7151e2d9b328dd73e5cd78e59687ef29bab4f0
2020-01-17 15:52:07 -07:00
Shawn Willden
2d7394209e Updates to KM4.1
This CL adds:

- The IDENTITY_CREDENTIAL_KEY tag.  This new tag is not actually used
  by Keymaster at all.  It's used by the new Identity Credential HAL in
  its key attestations, which use the Keymaster format and the Keymaster
  attestation key.

- A VerificationToken argument to deviceLocked, used for StrongBox
  implementations.

- Some error codes, including one to diagnose unprovisioned
  attestation keys/ids.

- Clarifications in the documentation.

Test: VtsHalKeymasterV41TargetTest
Change-Id: Iae7151e2d9b328dd73e5cd78e59687ef29bab4f0
2020-01-17 12:53:42 -07:00
Automerger Merge Worker
9193bd3eae Merge "Add TAG_MAC_LENGTH to EncryptionOperationsTest.AesWrongPurpose" am: a4bffdbeb0 am: 336af5783c am: c4b764ca09
Change-Id: I2847afc7dffa74a30f99a73042c7a07bd768188b
2020-01-06 19:02:05 +00:00
Wenhao Wang
a4bffdbeb0 Merge "Add TAG_MAC_LENGTH to EncryptionOperationsTest.AesWrongPurpose" 2020-01-06 18:22:49 +00:00
Automerger Merge Worker
c6f6cc6240 Merge "Remove creation time checks." am: 0184f1836d am: 58a95666eb am: 0804118fd5
Change-Id: Idb23e003f85002890d423c4e79329990bf8cb3af
2020-01-03 21:34:37 +00:00
Treehugger Robot
0184f1836d Merge "Remove creation time checks." 2020-01-03 21:09:18 +00:00
Shawn Willden
534085b76a Remove creation time checks.
We should not be relying on the HAL service to add CREATION_TIME to
keys.  It was always intended to be an optional tag that could be
added by keystore, or maybe the caller of keystore.  One widespread
Keymaster implementation started adding it (somewhat erroneously) if
it wasn't provided, and it appears that this implementation's behavior
became assumed to be the required behavior.

Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I34267c4e1f59fd8ee5f898f8c746a7b49f4d74a5
2019-12-29 21:33:00 -08:00
Wenhao Wang
6008f37ae9 Add TAG_MAC_LENGTH to EncryptionOperationsTest.AesWrongPurpose
Without the setting of TAG_MAC_LENGTH, the test fails due to
MISSING_MAC_PURPOSE.

Bug: 145626599
Test: VtsHalKeymasterV4_0TargetTest
Change-Id: Ic58411b86e07dfeeb78211abf9271ee995beabc9
2019-12-23 11:29:19 -08:00
Automerger Merge Worker
418ddc1754 Merge "Updating a public exponent check" am: 3702b15a2a am: 42b6ecbd53 am: d680601c72
Change-Id: If2a31f11981f6c793efc70a739fe54160c4fc281
2019-12-19 17:10:39 +00:00
Automerger Merge Worker
1026f2c33f Merge "Adding sanity check for VBMeta device state" am: 63cc8d12a5 am: 051f044853 am: ff9179099e
Change-Id: I305f6f30a2f5f4ddb483131a5ef48cf501fb2b74
2019-12-19 17:10:29 +00:00
Treehugger Robot
3702b15a2a Merge "Updating a public exponent check" 2019-12-19 15:28:33 +00:00
Max Bires
444468b3dd Updating a public exponent check
This is updating the public exponent being checked from 3 to 65537. The
test was updated to use the latter public exponent without the check
also being updated

Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: I55fa2e67c94f0c52a1d65644f16b5f703a661e00
2019-12-19 00:49:24 -08:00
Treehugger Robot
63cc8d12a5 Merge "Adding sanity check for VBMeta device state" 2019-12-19 08:43:15 +00:00
Automerger Merge Worker
82bf9e83f9 Merge "Convert VtsHalKeymasterV*_0TargetTest to be parameterized test" am: aae9ff2315 am: 5960d7b49e am: 78648b8a28
Change-Id: I6d7383a4649ac9c1f2144c7ec05580e3c79486ca
2019-12-11 22:28:32 +00:00
Dan Shi
3bacd7f634 Convert VtsHalKeymasterV*_0TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalKeymasterV3_0TargetTest \
  VtsHalKeymasterV4_0TargetTest

Change-Id: I0fbda4d9ab810a4ef616f8741919c522d5d58cc0
2019-12-11 09:46:54 -08:00
Max Bires
3d5713851e Adding sanity check for VBMeta device state
This test should will flag builds running as eng or userdebug that
report back the device is locked during development. This will also
catch the case where the device is a user build but reporting that it
isn't locked. This should help to avoid instances in the future where
userdebug builds report a locked device in the VBMeta information.

This patch also does a little bit of cleanup of the surrounding VBMeta
checking code.

Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: I3b387ade5eeee6a68b9ff307e503417d264ecbfe
2019-12-09 15:01:29 -08:00
Automerger Merge Worker
db21c8e59e Merge "Fixing RSA tests not using the correct exponent" am: ba111275cb am: 97a8659242
Change-Id: I6914b88f2a65188bd5057cca7c85c6bd58e05126
2019-12-03 20:03:33 +00:00
Max Bires
ee1ccd88ba Fixing RSA tests not using the correct exponent
The Keymaster 4.0 HAL specifies that the public exponent for RSA is F4
(2^16+1). There were a few tests still using 3 as the exponent. This
patch updates those incorrect exponents accordingly.

Bug: 143404829
Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: Ibc82a8a912bc5926bcdd544e0370e4185a888c0d
2019-12-03 09:45:39 -08:00
Rob Barnes
4fffa4a9d8 Merge "Added standalone benchmark for keymaster." am: 3f7f55b378 am: 7d67ad3453
am: 3213e8a929

Change-Id: I3fa6d9d485edb066f8c79e27775c58e4485bbfa2
2019-12-02 14:32:31 -08:00
Rob Barnes
3f7f55b378 Merge "Added standalone benchmark for keymaster." 2019-12-02 22:13:23 +00:00
Steven Moreland
c2a2995047 Merge "./update-makefiles.sh, for union changes/memory" am: 00daede4d5 am: 0942e33017
am: 87fe284668

Change-Id: I3a331b5e1c5418426a084f1c7bfe436214a1b68f
2019-11-26 15:00:11 -08:00
Steven Moreland
7696aa885f ./update-makefiles.sh, for union changes/memory
Many more types can be used in Java.

Bug: 143566068
Test: N/A
Change-Id: Ie18e1e0f9c22f2ea15b755df3b048c9d651c4945
2019-11-26 09:24:31 -08:00
Rob Barnes
f82aa5d4fe Added standalone benchmark for keymaster.
Test: Run benchmark
Bug: 139890773
Change-Id: I23c511b70bd27c58a188b5fc8ae690cdbb775dec
2019-11-25 21:16:01 +00:00
Shawn Willden
bdc9434b3c Merge changes from topic "add-km-41" am: f66777ad50 am: 7f7e9608dc
am: 78926e3375

Change-Id: I7964555358e9150d58f53eb154ee7acf5eea1a78
2019-11-21 15:01:55 -08:00
Shawn Willden
94ad891792 Add Keymaster 4.1
Note that CL is missing complete tests (what's included is just a
stub, really) and support library code.  All of that will come in
near-future CLs.  This CL omits them because they'll take time and
there's a need to unblock Keymaster 4.1 implementers now.

Bug: 140193672
Bug: 140192237
Bug: 140824829
Test: Will be in a future CL
Change-Id: I0e6e3a38356f0517158a10604b549415641ad1b9
2019-11-20 12:14:36 -07:00
Rob Barnes
b046774b26 Merge "Added LargeFinishInput test" am: 0cd9dd3893 am: 2b7a5caaf1
am: e5567ae93d

Change-Id: I2f7cd04aef3847dfebc6dda8ad335858283f167b
2019-11-15 12:27:57 -08:00
Rob Barnes
0cd9dd3893 Merge "Added LargeFinishInput test" 2019-11-15 19:56:44 +00:00
Rob Barnes
f5fc7c640b Added LargeFinishInput test
This tests passing a large input to finish. This should either succeed
or fail with the right error code.

Test: Run new VTS test
Change-Id: Ic4ef90adc6274317796bbe752f95fc9efa5fdb07
2019-11-14 18:05:25 -07:00
Max Bires
c7cb2e9cc8 Merge "Adding test to check another ASN.1 Encoding Case" am: 8fb7cbd26b am: 2e220a7507
am: 2dd6fa731b

Change-Id: I35f3a58b3299c2cff56f829f0efececd0f5f8045
2019-11-14 14:19:18 -08:00
Treehugger Robot
8fb7cbd26b Merge "Adding test to check another ASN.1 Encoding Case" 2019-11-14 21:54:44 +00:00
Max Bires
05f700ffeb Merge "Removing invalid HMAC tests." am: b09819f2da am: 2557502d5e
am: 6c54a3df7e

Change-Id: I68f5ba01fc1d3357263dfbc54aca9f72e3dc8297
2019-11-12 15:09:54 -08:00
Max Bires
ff02baaca9 Adding test to check another ASN.1 Encoding Case
This test will check that the length of the attestation application id
field will be properly encoded in valid DER ASN.1 in cases where the
length is long enough to require extra bytes to encode. In those cases,
the encoding of that field should include:
-A byte to specify how many bytes are required to enumerate the length
-The bytes required to enumerate the length
-The actual data that follows

Bug: 142674020
Test: atest keymaster_hidl_hal_test
Change-Id: I6d162efa4c8c6e0922989e234d0377caf3c1758e
2019-11-12 09:35:18 -08:00
Max Bires
2cdc273e8f Removing invalid HMAC tests.
Per Keymaster 4.0 spec, TEE and StrongBox implementations are only
required to support HMAC keys between 64 and 512 bits in length.
StrongBox implementations additionally must not support anything larger
than 512 bits. The tests removed in this CL specified key sizes larger
than 512 bits.

Bug: 143404829
Test: m VtsHalKeymasterV4_0TargetTest && adb sync data && \
adb shell data/nativetest64/VtsHalKeymasterV4_0TargetTest/VtsHalKeymasterV4_0TargetTest

Change-Id: I96ee3a20b981c288d88366f536b9924f907268f3
2019-11-07 12:48:07 -08:00
Max Bires
99d0ee3e26 Merge "Adding jbires to VTS OWNERS" am: 9756532b64 am: 3137c54d4f am: 7558ead96c
am: c70d259d06

Change-Id: Id6b967b677d60eaf49dcce53b9b1dd19f9f2ff9d
2019-10-25 11:51:23 -07:00
Treehugger Robot
9756532b64 Merge "Adding jbires to VTS OWNERS" 2019-10-25 17:54:54 +00:00
Max Bires
9f30a06060 Merge "Adding test to check that ASN.1 lengths are properly encoded" am: c6b086785d am: b3ee534556 am: 96098b0cd9
am: 995fa3dbe8

Change-Id: I8eb3a3b80f219a050250eb266949978d531bf3fb
2019-10-24 15:54:26 -07:00
Max Bires
a722ff42a9 Adding test to check that ASN.1 lengths are properly encoded
This test checks that length metadata for the ASN.1 encoding of
attestation application ids are correct. It generates an app id that
will have a length between 127 and 256, which should create an encoding
that requires two bytes of length metadata - one byte to specify how many
bytes are needed for the length, and one byte for the length.

Some implementations of keymaster only use one byte in this case, which
will fail on strict ASN.1 parsers.

Bug: 142674020
Test: m VtsHalKeymasterV4_0TargetTest && adb sync data \
&& adb shell data/nativetest64/VtsHalKeymasterV4_0TargetTest/VtsHalKeymasterV4_0TargetTest

Change-Id: I7dfc38a09247eb3cb237f33a202044668d15cbca
2019-10-16 15:21:14 -07:00
Janis Danisevskis
1a4755ee0a Fix UB in class NullOr am: cf5d7e83fd am: 24db85e33e am: 51bbd6719b
am: 6f630d198f

Change-Id: Id21d0cfa6852dda9f0158f233063c462989b93f4
2019-10-10 21:47:58 -07:00
Janis Danisevskis
cf5d7e83fd Fix UB in class NullOr
NullOr now stores the references a pointers internally. This fixes UB
where the internal reference was initalized by dereferencing nullptr.

Test: Compiles
Bug: 121390225
Change-Id: I2073e5aeac401309aa63b08e05db3c467fab6b69
2019-10-10 09:21:18 -07:00
Rob Barnes
147f26b1ea Merge "Add Keymaster VTS tests for some AES cases:" am: 772fb53999 am: 0baa38ed55 am: 0eb84f484a
am: e70544b15c

Change-Id: Id496d05e590aa8e1e9f2c78bdc21306e8c839faa
2019-10-02 01:29:54 -07:00
Treehugger Robot
772fb53999 Merge "Add Keymaster VTS tests for some AES cases:" 2019-10-02 07:04:26 +00:00
Rob Barnes
1b598f5da3 Merge "Added VTS tests for clearing operation slots after service death." am: fd877b5479 am: 2b3640a442 am: 89cd80c9da
am: f610e72c81

Change-Id: Ie2c68f4195d494a1c5af712234f6a7d98c98892e
2019-10-01 10:28:23 -07:00
Rob Barnes
fd877b5479 Merge "Added VTS tests for clearing operation slots after service death." 2019-10-01 16:52:49 +00:00
Colin Cross
6962c45657 Merge "Use libcrypto_static instead of libcrypto" am: c048c187be am: 06b758a918 am: 978e59e401
am: 135b3a4417

Change-Id: I2ae264a5c9998b7c6a2a4bb868e313161f1a3701
2019-09-26 08:20:46 -07:00
Rob Barnes
8ddc1c700d Add Keymaster VTS tests for some AES cases:
1.  AES operation attempted with unauthorized purpose.
2.  AES-GCM encryption performed with different nonces, should
generate different ciphertexts.
3.  AES-GCM encryption decryption round trip with delays between
begin and update and finish.

Bug: 133258003
Test: VtsHalKeymasterV4_0TargetTest
Change-Id: Ia8b4b4b317ecff51b18e64dfa3b84bf77475812d
2019-09-19 10:03:35 -06:00
Colin Cross
263d2df2c7 Use libcrypto_static instead of libcrypto
Replace libcrypto with libcrypto_static, which can be protected through
visibility to ensure only modules that don't affect FIPS certification
can use it.

Bug: 141248879
Test: m checkbuild
Change-Id: I8685cb06d15f3425eeb96d998ffda54c82dcd387
2019-09-18 11:07:09 -07:00
Rob Barnes
bd37c3bf35 Added VTS tests for clearing operation slots after service death.
BUG: b/139689895
TEST: Added VTS tests to keymaster_hidl_hal_test.cpp
TEST: Ran on emulator against soft keymaster::v4_0::ng
Change-Id: I6c682cafee65cf7ea426bd03865bf868586efc62
2019-09-10 21:14:14 +00:00
Steven Moreland
38c46d0b98 Merge "Remove libhwbinder/libhidltransport deps" am: 6b62c58a9a am: 8c22c3862f am: 6684ee8c36
am: 9a5ffa3196

Change-Id: I3a80895d10767fe68e90a907312a83ded976cbcc
2019-09-06 16:06:13 -07:00
Steven Moreland
b3a4d3832e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
2019-09-06 01:07:02 +00:00
Max Bires
c806e75033 Merge "Adding testing functionality for TAG_ROLLBACK_RESISTANCE" am: 28a7fed681 am: dddf75c01b am: 28446e0722 am: 9031031e47
am: eb651fa35d

Change-Id: Ic920d776365bbd94d2cb9031760ee4a3eec417c2
2019-08-23 06:05:10 -07:00
Max Bires
dddf75c01b Merge "Adding testing functionality for TAG_ROLLBACK_RESISTANCE"
am: 28a7fed681

Change-Id: I48327bcf5effe56e5f57fa53092cde6c10c62ecd
2019-08-23 05:28:49 -07:00
Max Bires
b1b45ff81c Adding testing functionality for TAG_ROLLBACK_RESISTANCE
Due to changes in implementation between keymaster 3.0 and 4.0, rollback
resistance is now specified by the caller. This patch addresses that
inconsistency to make sure rollback resistance is properly tested. If
rollback resistance is supported by the hardware, then it will now be
tested.

Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: I21e8d1e66932ddfad2d42ce8a43591431f3ff284
2019-08-15 12:46:56 -07:00
Max Bires
a0a2e8a035 Adding jbires to VTS OWNERS
Added OWNERS entry for Keymaster 4.0 VTS changes.

Test: jbires can +2 changes in VTS
Change-Id: I152d1e9f6fa7a021caa83d4b74beddde03384331
2019-08-14 17:39:31 -07:00
Felix
84af4f6e7e Merge "Add interface info to .rc files" am: 98d0f4d52c am: 37298a7616 am: 3531ec0183
am: bf481c99ed

Change-Id: Ie44e2aa87f7407a9820dc6f1ad6298b61bae34f3
2019-07-08 12:57:01 -07:00
Felix
37298a7616 Merge "Add interface info to .rc files"
am: 98d0f4d52c

Change-Id: Ie6cfbacd523c4b09f77bee3369ec8e88b3fa0419
2019-07-08 12:22:23 -07:00
nagendra modadugu
ff3170c48a Merge "keymaster: Relax testing under GSI" into qt-dev am: d10841a83d am: eec090610b
am: 7ad0166631

Change-Id: I03ecf5d514221673891486bcc06e6b512e6c6a3e
2019-06-29 12:46:49 -07:00
nagendra modadugu
eec090610b Merge "keymaster: Relax testing under GSI" into qt-dev
am: d10841a83d

Change-Id: If435ebd75ee04f1f6ea6324437683713b85a613a
2019-06-29 12:03:43 -07:00
nagendra modadugu
f18a8328a1 keymaster: Relax testing under GSI
GSI images do not have AVB verification enabled and therefore lack
several properties the keymaster HAL test depended on.  Selectively
disable those parts of the test that would fail with AVB verification
disabled.  Also disable date format checks under GSI.  When invoked from
GSI the TEE-backed keymaster doesn't use the correct date format.

Bug: 130843899
Test: VtsHalKeymasterV4_0TargetTest
Exempt-From-Owner-Approval: change only affects VTS-on-GSI behavior
Change-Id: Idaafb7b515c41290c766a8132f35d498ca15f48a
2019-06-29 18:27:38 +00:00
Garret Kelly
f947777ec0 Merge "Increase leniency of attestation record timestamps" into qt-dev am: 6c4e33d079 am: 89fda5c7f9
am: 4684c6f469

Change-Id: I6a10db36c762a589cc04ac7bac7f01cec603f7d8
2019-06-25 23:36:37 -07:00
Garret Kelly
4684c6f469 Merge "Increase leniency of attestation record timestamps" into qt-dev am: 6c4e33d079
am: 89fda5c7f9

Change-Id: I063e8cd6e53da1af4a50df9273a5ada4b9e7ea87
2019-06-25 23:28:39 -07:00
Garret Kelly
72c4746cda Merge "Increase leniency of attestation record timestamps" into qt-dev
am: 6c4e33d079

Change-Id: I741568f862d553a92344618406f0fb2f7a3d46f5
2019-06-25 23:19:49 -07:00
Felix
551b8d15ce Add interface info to .rc files
Signed-off-by: Felix <google@ix5.org>
Change-Id: I6d70bbdb66c3dce280bf6908c3750316a6f6cf70
2019-06-25 20:00:07 +02:00
Garret Kelly
9c0a45795f Increase leniency of attestation record timestamps
The TEE keymaster has been seen to be almost a minute out of sync with
the host clock during attestation.  Increase the leniency window to two
minutes.

Bug: 134408892
Bug: 134408367
Test: VtsHalKeymasterV4_0TargetTest
Change-Id: Ic256a939dcd7e7b108099cfcf237cacde8dde059
2019-06-24 23:28:52 +00:00
Max Bires
90cda58d54 Merge "Removing an extraneous test" into qt-dev
am: 16b2c77456

Change-Id: I2bd55543991178bf313996841e51aff838986a5c
2019-06-17 14:44:44 -07:00
Max Bires
cf9daece29 Removing an extraneous test
Test: VTS passes
Bug: 133316458
Change-Id: I98d73ff025515a89e2743ed20950c840aedb5114
(cherry picked from commit b28e69f37e)
2019-06-17 15:32:05 +00:00
Janis Danisevskis
f69d8bc9c5 Keymaster memory management is inconsistent
Object derived from RefBase must be owned by sp rather then other smart
pointer implementations.

Bug: 79474587
Change-Id: I866f67e1cb091efb3026450d50a410b5985539b6
2019-06-14 14:26:55 -07:00
TreeHugger Robot
aefd16ace9 Merge "Removing an extraneous test" 2019-05-30 20:13:31 +00:00