Commit graph

27969 commits

Author SHA1 Message Date
Shawn Willden
aef2a7562e Merge "Added a new test case to validate AES algorithm with invalid key sizes." 2021-05-05 19:48:28 +00:00
Tommy Chiu
384c82dd14 Merge "vts: Correct the parameters on strongbox" 2021-05-05 14:08:48 +00:00
Andy Hung
66ffc5b99a Merge "StreamOut: Fix STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED" 2021-05-04 20:49:44 +00:00
Shawn Willden
da2b9ae9f8 Merge changes Ic8949e22,Ia3a6363d
* changes:
  Update DeviceUniqueAttestationTest to match spec
  Make AttestKeyTest not crash if no cert is returned.
2021-05-04 19:50:41 +00:00
Tommy Chiu
3950b45a44 vts: Correct the parameters on strongbox
If GenerateKey() with user-provide key_blob, it needs to be specified in
the following begin() operations as well. Update the test case just to
take key_blob from private member instead of creating a local one.

Note:
- Remove redudent TAG_NO_AUTH_REQUIRED in DeviceUniqueAttestationTest

Change-Id: I81860294e1e7e01a57e66e08e75507a8292ec0c3
2021-05-04 23:09:56 +08:00
David Drysdale
3368b3c6b0 Merge "More KeyMint VTS testcases" 2021-05-04 08:00:41 +00:00
Shawn Willden
ced5c2c23a Update DeviceUniqueAttestationTest to match spec
Test: VtsAidlKeyMintTargetTest
Change-Id: Ic8949e223eb7ba2445d4738dcd9b31a1d244bb46
2021-05-03 16:36:49 -06:00
Shawn Willden
c410f6fb44 Make AttestKeyTest not crash if no cert is returned.
Test: VtsAidlKeyMintTargetTest
Change-Id: Ia3a6363d854742681f684ff989b98b7cfda30746
2021-05-03 16:36:33 -06:00
Marco Nelissen
a3645d38e9 Merge "Expand Gatekeeper test" 2021-05-03 21:32:08 +00:00
Shawn Willden
cc68516bd2 Make keymaster optional.
Keymaster is now optional because KeyMint can be used instead.  This
CL makes this change retroactively back to compatibility matrix v3,
per discussion with the Treble team.

Test: Replace Keymaster with KeyMint & build
Change-Id: Id26d5bac326c494e1810516582fdd56a42c04e0d
2021-05-03 09:08:12 -06:00
Shawn Willden
c46f9da49f Merge "AttestationKey documentation" 2021-05-03 15:07:38 +00:00
Andy Hung
e6e3a17126 StreamOut: Fix STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED
Use audio_metadata_byte_string_len method in asyncEventCallback.

Test: atest metadata_tests
Bug: 186894288
Change-Id: I04914bc5b2c778002b53b8f8da5bf29fff5c80f8
2021-04-30 21:07:33 -07:00
Paul Crowley
8b25958b75 Merge "Add getKeyCharacteristics method to KeyMint" 2021-04-30 21:06:14 +00:00
Andy Hung
b76d8e27fb Merge changes from topics "dra", "dts_uhd", "earc"
* changes:
  Audio: Add AUDIO_FORMAT_DRA
  audio: Add device constants for HDMI EARC
  Audio: Add AUDIO_FORMAT_DTS_UHD
2021-04-30 20:29:48 +00:00
David Drysdale
d2cc8c2c5e More KeyMint VTS testcases
Tests for:
 - non-prime RSA exponent (fails with CF KeyMint)
 - RSA exponent value of 3
 - key size > 512 for `STRONGBOX`
 - unknown tag inclusion
 - CBC input size not block size multiple
 - challenge omitted for attestation (fails with CF KeyMint)
 - import RSA key with implicit params
 - vestigial upgradeKey test
 - importWrappedKey errors
 - importWrappedKey sids ignored
 - duplicate/missing params on begin()
 - more tests for incompatible params on begin()
 - HMAC size not multiple of 8 (fails with CF KeyMint)
 - wrong size caller IV for 3DES rejected
 - too large MIN_MAC_LENGTH for HMAC
 - invalid AES-GCM minimum MAC length values
 - check failed updateAad() cancels operation
 - check that auto-generated nonces are distinct
 - (DISABLED_) invoke destroyAttestationIds()
 - omitting optional RSA keygen tags

Also add commenting to illustrate the ASN.1 structure of hex data.

Test: VtsKeyMintAidlTargetTest
Change-Id: I4663c42671cbb094ffe8d603e0352ffa9f1dbf2e
2021-04-30 19:15:39 +01:00
Paul Crowley
dadb18dd29 Add getKeyCharacteristics method to KeyMint
(cherry picked from commit 402d62f7be)

Bug: 186685601
Test: Treehugger
Merged-In: Ie72d865a37e2b6834fe6a86bf843d30286384aa5
Change-Id: Ie72d865a37e2b6834fe6a86bf843d30286384aa5
2021-04-30 10:58:31 -07:00
David Drysdale
b5ee70f125 Merge "Test for patchlevels and too much entropy" 2021-04-30 16:38:38 +00:00
Treehugger Robot
3b2b180a29 Merge "Add more symmetric KeyMint tests" 2021-04-30 16:30:49 +00:00
Amy Zhang
ddafbe597c Merge "Allow users to switch between FE source and DVR source when testing record/descrambling/broadcast" 2021-04-30 16:21:57 +00:00
David Drysdale
07045b7e83 Merge "KeyMint AIDL tweaks" 2021-04-30 14:44:35 +00:00
David Drysdale
bb3d85eaa4 Test for patchlevels and too much entropy
Add tests for:
 - Too much entropy should be rejected with INVALID_INPUT_LENGTH
 - All authorization lists should include a vendor and boot patchlevel.

These requirements are in both the KeyMint and the KeyMaster 4.0 AIDL
specificications, but have never been policed before.

Currently disabled with a command-line flag because CF does not have
the patchlevels and so fails lots of tests.

Test: VtsKeyMintAidlTargetTest
Change-Id: Ic9622ef3f1b80e013a34059218e3e029f392eb72
2021-04-30 14:50:14 +01:00
David Drysdale
7de9febd17 Add more symmetric KeyMint tests
Also fix some test name comments along the way.

Test: VtsKeyMintAidlTargetTest
Change-Id: I828acfaa676e1b9fa2e3c6f184f9dafb936b0e82
2021-04-30 14:50:12 +01:00
David Drysdale
40eb8f53ea KeyMint AIDL tweaks
- Describe 3DES requirements
- Remove references to non-existent getKeyCharacteristics() entrypoint
- Remove references to non-existent attestKey() entrypoint
- Remove mention of asymmetric verification operations
- Remove text describing incomplete update()
- Remove text discussing padding for ECDSA
- EC keys can't encrypt/decrypt
- Force use of curve not key size for EC keys
- Drop TODO re: CBOR encoding of wrapped key
- Indicate caller-provided nonces must have correct size
- Add more reference to IKeyMintOperation
- Align parameter names with signatures
- Correct MIN_MAC_LENGTH error code
- Make CREATION_DATETIME consistently optional
- Describe use of MGF1 digest option
- Fix typos

Test: VtsKeyMintAidlTargetTest (CF)
Change-Id: Ie01b99d33be7336e872bf24a7761a3ac5b1d584c
2021-04-30 14:19:31 +01:00
Andy Hung
6ce19700eb Audio: Add AUDIO_FORMAT_DRA
China DTMB digital TV.
See SJ/T11368-2006
“Specification for multichannel digital audio coding technology”.

Test: atest AudioFormatTest
Bug: 185950819
Merged-In: I941c4991e598e864babfb888a8827d1625d95990
Change-Id: I941c4991e598e864babfb888a8827d1625d95990
2021-04-29 19:07:10 -07:00
Andy Hung
1f90e1fbf8 audio: Add device constants for HDMI EARC
Implementation check by grep -E -r  "HDMI_ARC|HDMI_EARC" .

Test: atest AudioDeviceInfoTest
Bug: 131385398
Bug: 151781316
Merged-In: Idfe27b468a9f09770a31b6b58d83de77bebc6c80
Change-Id: Idfe27b468a9f09770a31b6b58d83de77bebc6c80
2021-04-29 18:49:43 -07:00
Andy Hung
3c5fcc51f5 Audio: Add AUDIO_FORMAT_DTS_UHD
See ETSI TS 103 491 V1.2.1 (2019-05)
DTS-UHD Audio Format; Delivery of Channels,
Objects and Ambisonic Sound Fields

Test: atest AudioFormatTest
Bug: 184538197
Merged-In: I4123efb29a95a599982af85068f8e4468ff15159
Change-Id: I4123efb29a95a599982af85068f8e4468ff15159
2021-04-29 17:55:16 -07:00
Amy Zhang
63f4175b6e Allow users to switch between FE source and DVR source when testing
record/descrambling/broadcast

Test: atest VtsHalTvTunerV1_0TargetTest
Test: atest VtsHalTvTunerV1_1TargetTest
Bug: 182519645
CTS-Coverage-Bug: 184077478
Change-Id: I6c57657ac3539d6a6fb3f63d2ecc9af7f6b9e2dc
Merged-In: I6c57657ac3539d6a6fb3f63d2ecc9af7f6b9e2dc
2021-04-28 20:25:36 -07:00
Steven Moreland
2668e4bc46 Merge "Freeze HALs for Android S" 2021-04-28 17:28:42 +00:00
Jooyung Han
b4be35f854 Merge "aidl: Suppress warnings on out-array" 2021-04-27 22:47:15 +00:00
Jooyung Han
a886a5c4be Merge changes from topic "fix-aidl-warnings"
* changes:
  aidl: Set explicit default values
  aidl: Set explicit default values
  aidl: Set explicit default values for enum-type fields
  aidl: Set explicit defaults to enum-type fields
2021-04-27 22:46:40 +00:00
Treehugger Robot
af3b58e35a Merge "Add attestation format documentation" 2021-04-27 20:40:50 +00:00
Steven Moreland
d116916ba2 Freeze HALs for Android S
Bug: 178221726
Test: none
Change-Id: If18355915c40e8d47c721c1e373efb95db4dcdfa
Merged-In: I77ee02664242827d9aa96c985764cfc109c52b84
2021-04-27 18:18:03 +00:00
David Drysdale
5cde787c9f Merge "Align KeyMint AIDL with usage" 2021-04-27 16:43:01 +00:00
Shawn Willden
8691e58bd1 AttestationKey documentation
Test: N/A, only added documentation
Change-Id: I41ed99c385c99511e8a9a19a5aa7aec180ee41ac
2021-04-27 09:22:25 -06:00
Shawn Willden
3cb64a6822 Add attestation format documentation
Somehow the attestation format docs got dropped from KeyMint in the
transition from Keymaster.  This replaces them, and also clarifies
that KeyMint StrongBox should not support device attestation.

Test: VtsAidlKeyMintTargetTest
Change-Id: I2334e99b4797c7a0e2e59727ffa730cf7504df31
2021-04-27 09:22:25 -06:00
Jooyung Han
386e55b616 aidl: Set explicit default values
Fixes: 179853698
Test: mma in hardware/interfaces/vibrator
Change-Id: I231c3cfb17f812944bcc6a88e618d96d7068f6c2
2021-04-27 20:11:54 +09:00
Jooyung Han
9c3ebfc83f aidl: Set explicit default values
This fixes warnings in AIDL files(-Wenum-explicit-default).

No semantic changes. (Explicit values are all zero enumerators.)

Fixes: 179853367
Test: mma in hardware/interfaces/keymaster
Change-Id: If5a70da3efd05a344c39ef1d2e73b7ec2b894f33
2021-04-27 18:33:17 +09:00
Jooyung Han
3a966323ef aidl: Set explicit default values for enum-type fields
Fixes: 179853674
Test: mma in hardware/interfaces/neuralnetworks
Change-Id: I9fdc7089eaf1202299da098220875ef8398667fe
2021-04-27 13:58:46 +09:00
Jooyung Han
695ef7acfe aidl: Set explicit defaults to enum-type fields
Fixes: 179853398
Test: mma in hardware/interfaces/graphics
Change-Id: I6f93bca4ba3c8d538765fc9a811b9050c6142cc3
2021-04-27 12:17:39 +09:00
Jooyung Han
d63cd3fff6 aidl: Suppress warnings on out-array
out-param arrays are considered harmful since the Java backend requires
them to be correctly allocated at caller site. But the only user of
android.hardware.identity is in C++, we can just ignore them.

Fixes: 179853403
Test: mma in hardware/interfaces/identity
Change-Id: Ib9b7ad895b3827c0888869a5b154696e3aff5624
2021-04-27 10:51:57 +09:00
Ady Abraham
2fff170562 composer: VtsDisplay::setDimensions shouldn't be const
Fix the usage of const attribute in VtsDisplay

Test: run composer 2.4 VTS
Bug: 185195256
Change-Id: I616ea044f46bc080ad0e82753b5031d9a38369f3
2021-04-26 12:00:06 -07:00
Andy Dyer-smith
e1dd0085d9 Merge "Fix typo in PAD_V2 comments" 2021-04-26 17:48:17 +00:00
Selene Huang
8f9494c4f6 Added various vts tests for attestKey.
- Added tests for signing attest key with factory chain.
  - Added test for signing encryption keys.
  - Added tests for chaining many RSA attest keys on the same chain.
  - Added tests for chaining many Ec attest keys on the same chain.
  - Added tests for alternate chaining of rsa-ec-rsa-ec-rsa attesti
    keys on the same chain.

Test: atest VtsAidlKeyMintTargetTest
Change-Id: I9c67e2b928d6bba6cc4074a4b65f639f33c9ec26
2021-04-24 22:43:13 -07:00
Treehugger Robot
24c422c48b Merge "Bluetooth: Turn Bluetooth off while device setup" 2021-04-23 17:46:53 +00:00
Andy Dyer-Smith
889c46c11a Fix typo in PAD_V2 comments
Bug: 158315823
Test: m

Change-Id: Ic7ba213f2e0ff523349e4b80926a302399db8d88
2021-04-23 16:25:12 +00:00
Treehugger Robot
f04466c090 Merge "Added vts tests for certificate subject and serial for various algorithms and self sign or non-self sign certificates." 2021-04-23 07:53:20 +00:00
Cheney Ni
1f3312ce04 Bluetooth: Turn Bluetooth off while device setup
Because there's only one HCI interface, it won't open if Bluetooth is in
use, but encounter unexpected results. Based on the auto-generated test
config file, and this adds BT off condition in the device setup stage.

Bug: 184720725
Test: android-vts/tools/vts-tradefed run commandAndExit vts -m VtsHalBluetoothV1_*TargetTest
Change-Id: If03d3621f9e0cfebce7574126def134c4303b97f
2021-04-23 11:59:33 +08:00
Aaron Tsai
47e14e567f Adding 1s time gap between back-to-back calling setDataThrottling API
Modem has restriction that it can not process back-to-back thermal actions.
Adding 1s delay to prevent unexpected errors.

Bug: 181634712
Test: atest VtsHalRadioV1_6TargetTest -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=*setDataThrottling/0_slot1"
Change-Id: I70a717cbc3a63d5b1abb4be9d3920d0ee3451b14
2021-04-23 02:35:23 +00:00
Treehugger Robot
40bbe789a4 Merge "libgtest_prod: use headers." 2021-04-23 01:17:59 +00:00
Ady Abraham
fc67ba997e Merge "composer: update VtsDisplay dimensions" 2021-04-23 00:39:20 +00:00