Commit graph

183 commits

Author SHA1 Message Date
Iris Chang
7fdf8d791f Merge "VTS: fix VtsHalKeymasterV3_0Target issue" am: 1912c73a7f
am: b87becf1c2

Change-Id: I4674864a39b3f558d30bf63f1b79505c69330867
2017-10-06 01:51:40 +00:00
Iris Chang
b87becf1c2 Merge "VTS: fix VtsHalKeymasterV3_0Target issue"
am: 1912c73a7f

Change-Id: I781812c77d96a0a7beb832298df8d537ce1d55da
2017-10-06 01:49:29 +00:00
Treehugger Robot
1912c73a7f Merge "VTS: fix VtsHalKeymasterV3_0Target issue" 2017-10-06 01:43:54 +00:00
Iris Chang
54ca32a130 VTS: fix VtsHalKeymasterV3_0Target issue
Failed cases:
AttestationTest.RsaAttestation
AttestationTest.EcAttestation

Analysis:
The verify_attestation_record() in Keymaster_hidl_hal_test.cpp calls
parse_attestation_record() to set the value of att_challenge. It fails
to compare att_challenge with challenge by memcmp.
Because setToExternal() method uses buffer pointer to local variable
(record), not use memcpy to copy into itself buffer in
parse_attestation_record(). When it leaves the parse_attestation_record(),
we will get the att_challenge which is null buffer to compare with challenge
incorrectly.

Fix: use memcpy to copy the buffer.

Bug: 65039571
Test: build passed. VtsHalKeymasterV3_0Target -> PASSED: 106, FAILED: 0.

Change-Id: I700a9242cc9a5f4cb196b62860823601e4088531
2017-10-06 00:45:42 +00:00
Steven Moreland
70bfb9d250 Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f am: b53e6ad535
am: 9a17f41f6f

Change-Id: I78d9292068b372238554fd9d35128e69f5b5f9d2
2017-10-04 21:54:11 +00:00
Steven Moreland
9a17f41f6f Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f
am: b53e6ad535

Change-Id: I23269fb7a9bdd352e670a80f390527d9eef31412
2017-10-04 21:51:00 +00:00
Steven Moreland
b53e6ad535 Merge "Update for hidl adapter module defaults." am: 988c977079
am: 861651985f

Change-Id: Ifdb878720d42120e7309dd2a49e5a91059ff4b72
2017-10-04 21:48:04 +00:00
Steven Moreland
861651985f Merge "Update for hidl adapter module defaults."
am: 988c977079

Change-Id: I289818be1b30397391847ba1c532d1014fdbed27
2017-10-04 21:45:09 +00:00
Steven Moreland
527fd76a0e Update for hidl adapter module defaults.
Test: pass
Change-Id: Idc6a943149a279bf17cfcfd0f2571473e53bbbbf
2017-10-04 12:47:03 -07:00
Janis Danisevskis
5a07ed4802 Switch to new NG AndroidKeymaster3Device
Test: VtsHalKeymasterV3_0TargetTest
Bug: 67358942
Change-Id: Idc7ac599c359b3af2e4866b9eb446a05e96132a0
2017-10-03 16:13:21 -07:00
Janis Danisevskis
b17178a1a4 Fix wrong origin assumption for wrapped KM0 hals
KM0 supports only asymmetric encryption. And for those we cannot
distinguish between imported and generated keys.
This patch adds correct handling for KM0 origin tags.

Test: run vts test with wrapped km0 module from
      system/security/softkeymaster

Bug: 67358942
Bug: 67363396

Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I7f5ddd21dde284dbfbd68b3b83fb75c1457dbd59
2017-10-03 16:13:21 -07:00
Janis Danisevskis
957b1dc654 Reflect: Removed KeymasterEnforcement dependencies on openssl
in system/keymaster.

Test: VtsHalKeymasterV3_0TargetTest

Bug: 67358942
Change-Id: Ie3e1fb94a299635e6c7cf45d78822b03bedf5d11
2017-10-03 16:13:21 -07:00
Janis Danisevskis
7e03f98bd2 Software keymaster attestations return 3 as keymaster version
Bug: 67358942
Bug: 67359348
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: Ia04a55b407343ddddd4467c401ee2556e8fe9bd9
2017-10-03 16:13:21 -07:00
Janis Danisevskis
1235d348e6 Relax finish result on RSA operations
Some RSA operation tests expect ErrorCode::INVALID_ARGUMENT
and others ErrorCode::INVALID_INPUT_LENGTH for the same
diagnosed syndrome, i.e., the input message was too long.

This patch relaxes the expectations on one of these tests
expecting ErrorCode::INVALID_INPUT_LENGTH, to also accept the
more consistent ErrorCode::INVALID_ARGUMENT.

Bug: 67358942
Bug: 67359132
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I573d3a01b052f0256611064f23ae791007cf7122
2017-10-03 16:13:20 -07:00
Janis Danisevskis
02bc2768d4 Add OWNERS files to keymaster resources am: e6014f69ea am: 1ff3510d29 am: 2d83c98987
am: a0e1f49a11

Change-Id: Ic1eab465d8392c79411ce6c6097c40585748db1f
2017-10-03 22:31:13 +00:00
Janis Danisevskis
a0e1f49a11 Add OWNERS files to keymaster resources am: e6014f69ea am: 1ff3510d29
am: 2d83c98987

Change-Id: I97cc35b7736319ae679f1ff88f07bf98857acf30
2017-10-03 21:47:46 +00:00
Janis Danisevskis
2d83c98987 Add OWNERS files to keymaster resources am: e6014f69ea
am: 1ff3510d29

Change-Id: Ida237f73875e70d9d1e24547f1e9b90de12a7729
2017-10-03 21:35:50 +00:00
Janis Danisevskis
1ff3510d29 Add OWNERS files to keymaster resources
am: e6014f69ea

Change-Id: I71c2388fd278869daa652ae10fb8b7848b6e5443
2017-10-03 21:22:58 +00:00
Janis Danisevskis
e6014f69ea Add OWNERS files to keymaster resources
This patch adds swillden@ and jdanis@ as owners of keymaster/3.0/vts
and keymaster/3.0/default.

Test: No code changed
Change-Id: I04bc0f741e8fafd53aee7c9dd62954548b81263d
2017-10-03 13:37:19 -07:00
Steven Moreland
91799c6cc7 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3 am: 71a193a425
am: 9fdd241905

Change-Id: I1c852fa6600fecc44d5afd1a65a5f51c43ecf71c
2017-09-27 00:02:52 +00:00
Steven Moreland
9fdd241905 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3
am: 71a193a425

Change-Id: I45ae43f07323254212532acbf0f891d11143b05f
2017-09-26 23:58:51 +00:00
Steven Moreland
71a193a425 Merge "Fix typo in update makefiles." am: 9960148420
am: f07e364ce3

Change-Id: If5bbf259458363b755989578c2f3828cbcb3d07c
2017-09-26 23:55:59 +00:00
Steven Moreland
f07e364ce3 Merge "Fix typo in update makefiles."
am: 9960148420

Change-Id: I949634e72f817f3a5411130e968acd8efd1d7725
2017-09-26 23:51:07 +00:00
Steven Moreland
a5299ee739 Fix typo in update makefiles.
Bug: 37518178
Test: pass
Change-Id: Ic401b3a473f15ca4c01e58b3072e19db7c31b653
2017-09-26 21:59:43 +00:00
Steven Moreland
7741c0e17b Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e am: b94d0c7290
am: 97228c0b7d

Change-Id: Ic4b459b7c1a4325453945b0b00db8f44e4e77c26
2017-09-26 13:36:09 +00:00
Steven Moreland
97228c0b7d Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e
am: b94d0c7290

Change-Id: If766cffbcc003cc0cc5eb98969b924aa918fff44
2017-09-26 12:53:13 +00:00
Steven Moreland
b94d0c7290 Update makefiles for hidl adapter. am: 26a0bb2762
am: 73949c1d7e

Change-Id: I9af2df255ccdac36c8c11bbca973c42ea2e758fe
2017-09-26 12:48:40 +00:00
Steven Moreland
73949c1d7e Update makefiles for hidl adapter.
am: 26a0bb2762

Change-Id: I3a811f5cd49bd4e81e8fcd5c8e88922115812539
2017-09-25 23:14:44 +00:00
Steven Moreland
26a0bb2762 Update makefiles for hidl adapter.
Bug: 37518178
Test: manual
Change-Id: I50e999907d3c64d2b039272b823971998da64d1b
2017-09-25 18:35:56 +00:00
Shawn Willden
b4766e598b Merge "Don't send more than 2K to addRngEntropy" into oc-dev am: 7eeb6b5079 am: 35e1be70b4
am: 64978d763d

Change-Id: I9e3f621fb66a357d7f81975bd7fe14ab79e07013
2017-09-12 16:37:22 +00:00
Shawn Willden
64978d763d Merge "Don't send more than 2K to addRngEntropy" into oc-dev am: 7eeb6b5079
am: 35e1be70b4

Change-Id: Ic1b7023117d6531da2f535a6b6cb145a228259bf
2017-09-12 16:34:52 +00:00
Shawn Willden
35e1be70b4 Merge "Don't send more than 2K to addRngEntropy" into oc-dev
am: 7eeb6b5079

Change-Id: Id0ee0e3f22ee4f2d2b730054043d28c01ac19c6f
2017-09-12 16:31:32 +00:00
TreeHugger Robot
7eeb6b5079 Merge "Don't send more than 2K to addRngEntropy" into oc-dev 2017-09-12 16:28:44 +00:00
Shawn Willden
e5266362e9 Merge "Reduce max keymaster message size to 2K" into oc-dev am: 42d61ce03a
am: ac06f7576e

Change-Id: Ib6e0f30a2ca4d6b075bdc4c232cbf47c6febc82e
2017-09-12 06:53:16 +00:00
Shawn Willden
859db2ba9e Merge "Reduce max keymaster message size to 2K" into oc-dev am: 42d61ce03a
am: ac06f7576e

Change-Id: I219c56653ec9051d35a4c7c8f012c9c06e555881
2017-09-12 06:53:16 +00:00
Shawn Willden
ac06f7576e Merge "Reduce max keymaster message size to 2K" into oc-dev
am: 42d61ce03a

Change-Id: Ia2915bb4305268e5048689ef3e4cf6cf9793d483
2017-09-12 06:50:47 +00:00
Jaekyun Seok
81104ae5ef Add 'vendor.' prefix to a vendor HAL service name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I4e8fbee791ec917a8f627a1366f4d44ec7e6febc
2017-09-12 08:01:42 +09:00
Shawn Willden
02ffb2be41 Don't send more than 2K to addRngEntropy
Bug: 63745893
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I136920d3b62e026b22fbe06594bc40ccddc57dc3
(cherry picked from commit 3e1267edf0)
2017-08-30 22:13:30 +00:00
Steven Moreland
dfd8287506 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Merged-In: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
Change-Id: I170fa1c4fe39f8109b1670db58ef99bb11afc0be
2017-08-14 20:25:09 +00:00
Steven Moreland
ff308ea6ba Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Change-Id: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
2017-08-11 22:58:47 +00:00
Shawn Willden
3e1267edf0 Don't send more than 2K to addRngEntropy
Bug: 63745893
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I136920d3b62e026b22fbe06594bc40ccddc57dc3
2017-08-11 14:34:37 -06:00
Shawn Willden
cf1f4870fc Reduce max keymaster message size to 2K
Bug: 63745895
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I9b8c2e551f04bd2124462095f232bd08ff1f63c6
2017-08-11 14:34:37 -06:00
Tri Vo
fcc37424e5 Merge "Keymaster test statically links to dependencies." into oc-mr1-dev am: c20d4caa4c
am: a48a2eab55

Change-Id: I6a445e551b9a135a8411e1f351acd61a2e56a5ee
2017-08-11 01:41:33 +00:00
Tri Vo
c20d4caa4c Merge "Keymaster test statically links to dependencies." into oc-mr1-dev 2017-08-11 01:07:22 +00:00
Tri Vo
0631f8ea9a Keymaster test statically links to dependencies.
This test now statically links to libs not guaranteed to be on the
device.

Bug: 64040096
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check 
--skip-preconditions --module VtsHalKeymasterV3_0Target
Change-Id: I6a7b8c116153f18f61a71e5b5bef98343a4de43b
2017-08-10 20:18:36 +00:00
Justin Yun
723c2dbd43 Update make file for vndk enabled. am: 608d773ef8
am: d66371512c

Change-Id: I35b778c39c2349346278deb6dea56b8cd3701f7d
2017-08-05 02:17:38 +00:00
Justin Yun
608d773ef8 Update make file for vndk enabled.
Update the Android.bp generated with hidl-gen.

Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
2017-08-04 14:12:23 +09:00
Shawn Willden
703c242322 Reduce max keymaster message size to 2K
Bug: 63745895
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I9b8c2e551f04bd2124462095f232bd08ff1f63c6
2017-08-03 20:45:46 +00:00
Tri Vo
0621d2f517 Update Android.bp HIDL makefiles am: f5d136c231
am: 7694738e26

Change-Id: I7592025d540bbe46d2e2726ae39ae34f352a1a30
2017-08-03 15:37:24 +00:00
Tri Vo
f5d136c231 Update Android.bp HIDL makefiles
Allow HAL definition libs to be static.

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
2017-08-03 00:30:01 +00:00
Shawn Willden
26dc50cefb Re-enable fuzzing tests
A pair of tests that send corrupted data to keymaster were disabled
because they cause a reboot on Angler and Bullhead.  Because VTS is not
being run on those devices, I'm enabling them.

Separately, I'm going to get this bug triaged as a security
vulnerability, which may result in a fix being forthcoming.  As a simple
functional defect, the vendor refused to fix the old devices.

Bug: 33385206
Test: adb shell data/nativetests64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest
Change-Id: I3bdea4e9756d3f77d54de09fd7ed2de04edeb1fd
2017-07-25 13:15:02 -06:00
Shawn Willden
6715433ca7 Merge "Test import of a EC P-521 key." into oc-dev
am: ad40c6ccd7

Change-Id: I42bd0035153a5312b4654ec8b27f6ad6589d56e1
2017-06-23 15:39:19 +00:00
Shawn Willden
709e2e1ed9 Test import of a EC P-521 key.
This failure is also diagnosed by CTS, but it should be validated in VTS
as well.

Merged-In: Ia7654ff8813942fbca9dfa838337e9de5839a9e2
Bug: 33945114
Test: adb shell data/nativetests64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest
Change-Id: Ia7654ff8813942fbca9dfa838337e9de5839a9e2
2017-06-22 15:14:30 -06:00
Shawn Willden
2bd3e23f3c Test import of a EC P-521 key.
This failure is also diagnosed by CTS, but it should be validated in VTS
as well.

Bug: 33945114
Test: adb shell data/nativetests64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest
Change-Id: Ia7654ff8813942fbca9dfa838337e9de5839a9e2
2017-06-22 14:29:19 -06:00
Shawn Willden
18996b5aa5 Merge "Check return from DeleteKey correctly." into oc-dev
am: c4f859d1b5

Change-Id: Id817044028fa9bf060305fa7864d8d89755353dc
2017-06-21 00:54:09 +00:00
Shawn Willden
da4568eb18 Merge "Check return from DeleteKey correctly." into oc-dev
am: c4f859d1b5

Change-Id: Ib41e416ab79a56cddbaa61084645f626b4a3b22b
2017-06-21 00:54:07 +00:00
TreeHugger Robot
c4f859d1b5 Merge "Check return from DeleteKey correctly." into oc-dev 2017-06-21 00:45:17 +00:00
Janis Danisevskis
eb5a6056bc Merge "Purge unsupported RSA key sizes from VTS tests" into oc-dev
am: bc970b089f

Change-Id: Id5c16a9a8a2ff95e18254da4b8568d68e15e5834
2017-06-14 02:32:40 +00:00
Janis Danisevskis
324ffd65ee Merge "Purge unsupported RSA key sizes from VTS tests" into oc-dev
am: bc970b089f

Change-Id: Id40754b5761b2acca8a487d33a4479c3d9fb0c33
2017-06-14 02:32:40 +00:00
Janis Danisevskis
39daaa0f96 Purge unsupported RSA key sizes from VTS tests
Support for 256 bit RSA keys are not mandated by keymaster specs and
must not be used in the VTS tests.

Bug: 62581389
Change-Id: If315088db2752ac2efe31fdb95db7ca13c3ce225
2017-06-13 13:30:15 -07:00
Janis Danisevskis
d4c2e5d8a5 Fix expected attestation version.
am: 538b7d85ef

Change-Id: I5ba0326f7e2f1547a1e08c2f44055a8938414ae4
2017-06-08 01:55:37 +00:00
Janis Danisevskis
db5b71c924 Fix expected attestation version.
am: 538b7d85ef

Change-Id: I35fd340baa71984a9aa5b1db6d8df1b09cda7a6c
2017-06-08 01:51:38 +00:00
Janis Danisevskis
538b7d85ef Fix expected attestation version.
The attestation version cannot be infered from the keymaster version
because we provide software attestation for legacy keymaster 1 keys.
This patch changes the attestation test to expect either attestation
version 1 or 2.

Bug: 37351644
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I4db83a543db20191d288b2ca8308aa6597cd8e22
2017-06-07 11:49:56 -07:00
Shawn Willden
76627c3f72 Annotate DeleteKey test with bug number. am: abcd323019
am: 392db77668

Change-Id: If2800344b883ae35e8372d977cc63abdf1832e0d
2017-06-01 15:29:01 +00:00
Shawn Willden
392db77668 Annotate DeleteKey test with bug number.
am: abcd323019

Change-Id: I1e3eb2b93c0054fb48fc8dbd9e844a74736afe46
2017-06-01 15:26:30 +00:00
Shawn Willden
abcd323019 Annotate DeleteKey test with bug number.
Bug: 37623742
Change-Id: I2cb4bb39bacb3aabf5fff7937f60c7355c9636e3
Test: VTS test, manually run
2017-06-01 07:47:04 -06:00
Shawn Willden
1c69c5fcb8 Check return from DeleteKey correctly.
DeleteKey may legitimately return ErrorCode::UNIMPLEMENTED rather than
ErrorCode::OK, but the VTS test didn't allow that in all cases.  In many
case the return code was also left unchecked.

Test: adb shell/data/nativetest64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest
Bug: 62193967
Change-Id: I19a90a87850675b0700baf7409e57098e0584d54
2017-06-01 07:44:27 -06:00
Shawn Willden
41fbd43c10 Validate certificate names.
Bug: 38394614
Test: adb shell /data/nativetest64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest
Change-Id: If9d985807000f54f57f979f0c2d9f38df8fbd3d3
2017-05-23 19:56:02 -06:00
Shawn Willden
319e5c5c02 Verify that attestation root is a valid self-signed cert.
Bug: 38243685
Test: adb shell /data/nativetests64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest
Change-Id: I6b57025e4aab7d475116c51fb43ae9f31778d7c8
2017-05-23 19:45:47 -06:00
Shawn Willden
032d2afb2e Check HAL return codes.
Test: adb shell /data/nativetest64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest
Change-Id: I1772cfa97f60bab5acf12b4afccc242a11946085
2017-05-23 19:45:47 -06:00
Steven Moreland
7708449766 Update makefiles. (2/2) am: 76cfb84140
am: f203167814

Change-Id: I1f13401266f3c2f78c627088b09c79cd7c8d0276
2017-05-22 17:29:04 +00:00
Steven Moreland
f203167814 Update makefiles. (2/2)
am: 76cfb84140

Change-Id: I24d21438a5b2f447d2160929c6ff6e17b2b66820
2017-05-22 17:15:20 +00:00
Steven Moreland
76cfb84140 Update makefiles. (2/2)
Adds default configuration for all hals.

Bug: 38415912
Test: pass
Change-Id: Idd1f3a2b7b16ad956d31784a513e93a066cdd02e
2017-05-19 15:54:03 -07:00
Steven Moreland
d09cf863da Update makefiles for c++-sources and c++-headers. (2/2) am: bc71124120
am: a32ebce372

Change-Id: Ic1dd8f98e72656bc12a6e5224e541f75afb79daa
2017-05-11 01:38:14 +00:00
Steven Moreland
a32ebce372 Update makefiles for c++-sources and c++-headers. (2/2)
am: bc71124120

Change-Id: Icf36068a4d863a8520854c7a83e51f960c188e12
2017-05-11 00:48:55 +00:00
Steven Moreland
bc71124120 Update makefiles for c++-sources and c++-headers. (2/2)
Test: pass
Bug: 38174080
Change-Id: Icad451f9f9ad5f46412356a4171a8a1222f8e545
2017-05-09 19:58:43 -07:00
Shawn Willden
7c30ca2cc5 Merge "Add missing application ID tag to AES/HMAC attestation calls" into oc-dev am: 585acc6778
am: bc25041f6e

Change-Id: Ib18b4c599813d8503712d33f9070eea11948f4ca
2017-05-05 17:51:36 +00:00
Shawn Willden
bc25041f6e Merge "Add missing application ID tag to AES/HMAC attestation calls" into oc-dev
am: 585acc6778

Change-Id: I613bc59b8eeeed229131fcff32835e91d26adda6
2017-05-05 17:43:22 +00:00
TreeHugger Robot
585acc6778 Merge "Add missing application ID tag to AES/HMAC attestation calls" into oc-dev 2017-05-05 17:29:21 +00:00
Janis Danisevskis
71ebd5f6b4 Rename libkeymaster to libkeymaster_staging
Fix a build breakage by renaming libkeymaster to
libkeymaster_staging. fugu's vendor tree already had
a libkeymaster.so which masked system/keymaster/libkeymaster.

Bug: 37997750
Change-Id: Ie478726bf81e965be64fb913844b881064e9b66c
2017-05-04 14:16:20 -07:00
Janis Danisevskis
448b624803 Merge "libkeymaster1 was split into libkeymaster and _portable" 2017-05-04 16:16:45 +00:00
Shawn Willden
839ef0db40 Merge "Fix Keymaster HAL crash." into oc-dev
am: a22bc7450b

Change-Id: I7c765d18c3a6fc8e9741e45802f2991b07cf6fdf
2017-05-03 21:59:29 +00:00
TreeHugger Robot
a22bc7450b Merge "Fix Keymaster HAL crash." into oc-dev 2017-05-03 21:50:23 +00:00
Janis Danisevskis
85e15db319 libkeymaster1 was split into libkeymaster and _portable
libkeyamster1 was split into libkeymaster and
libkeymaster_portable.
Also removed UniquePtr usage from keymaster hal.

Bug: 37467707
Test: keymaster vts test and keystore cts test
Change-Id: Ic660586d3d9cfd20022a9c694f276da89e796e5d
2017-05-03 15:54:13 +00:00
Nick Kralevich
7372185739 Merge "Revert "libkeymaster1 was split into libkeymaster and _portable"" 2017-05-03 00:41:33 +00:00
Janis Danisevskis
2590b96be2 Revert "libkeymaster1 was split into libkeymaster and _portable"
This reverts commit beee35c850.

Reason for revert: fix broken build

Change-Id: I60762c834b6837c78027574dda54c5382dbcceec
2017-05-03 00:34:10 +00:00
Steven Moreland
5c63b11f76 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Merged-In: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 15:29:30 -07:00
TreeHugger Robot
31944dc58e Merge "Remove redundant dependencies" 2017-05-02 21:51:28 +00:00
Steven Moreland
2cd0d42d72 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 10:17:28 -07:00
Janis Danisevskis
beee35c850 libkeymaster1 was split into libkeymaster and _portable
libkeyamster1 was split into libkeymaster and
libkeymaster_portable.

Test: keymaster vts test and keystore cts test
Change-Id: Ia117199f07f6d55d35b2ae781ebab62386006474
2017-05-01 12:35:05 -07:00
Janis Danisevskis
0c3dd48665 Fix KM3.0 deleteKey behavior inconsistent with VTS test.
Keymaster 3.0 VTS test required that deleteKey returns
ErrorCode::OK even if the key blob parameter is invalid or garbage.
The rationale is that deleteKey shall have the invariant that
key blobs are unusable after the deleteKey call. If it was unusable
before, this invariant is upheld.

This patch makes the legacy wrapper for the Keymaster HAL translate
an ErrorCode::INVALID_KEY_BLOB retuned by the legacy delete_key to
ErrorCode::OK.

Bug: 37351644
Test: Manually run VtsHalKeymasterV3_0TargetTest with legacy keymaster
      HAL installed (tested with sailfish)

Change-Id: Ib22c8b8e10334770a1d4a5570acf16c2c52a6c60
2017-04-27 08:43:25 -07:00
Shawn Willden
58ce93480b Add missing application ID tag to AES/HMAC attestation calls
Test: Manually verified by running VTS
Change-Id: Iaba04736e3ccc43a662407a6c18416f20d0ee4ea
2017-04-27 13:58:36 +00:00
Shawn Willden
fa67c8fc1d Fix Keymaster HAL crash.
Test: VTS test validates this fix
Change-Id: I5996c2166cf4141c97424df64a380f45b001d52e
2017-04-24 08:11:07 -06:00
Bartosz Fabianowski
8304a9040c Finish adding manufacturer and model to device ID attestation
This is a follow-up to change I5a9fd839497976cdb1e44cbe4a2d5b7730732b4c,
where manufacturer and model were added to the set of attestable device
IDs.

Bug: 37522655
Test: GTS com.google.android.gts.security.DeviceIdAttestationHostTest

Change-Id: Ied4246f4fc490feb2093f04c268aab83c8e1326d
2017-04-20 04:47:44 +02:00
TreeHugger Robot
206e38a4e8 Merge "Remove dependency of libhardware_legacy from HAL services" into oc-dev 2017-04-18 00:26:33 +00:00
Hung-ying Tyan
4f1bbf7074 Remove dependency of libhardware_legacy from HAL services
It is not used by these services.

Bug: 33241851
Bug: 37305530
Test: built and tested on sailfish
Change-Id: I1f3f51981d7dfcf27e18d9495c747b7662867d31
2017-04-15 10:17:16 +08:00
Shawn Willden
dc9965665e Require attestation app ID.
Bug: 37318025
Test: Manually tested
Change-Id: Iaa992c8d22e0c88c2a2570355199befa484adc19
2017-04-14 11:38:17 +00:00
Shawn Willden
4b93bb21dc Fix handling of KM3 attestations.
Test: Manually tested
Bug: 37318025
Change-Id: I91c0c0fe6d36fb4a02d6b58a3b0836a6f8996012
2017-04-14 11:37:42 +00:00
Steven Moreland
3b36a83a2e Update makefiles (2/2).
Test: pass
Change-Id: Ic7e6289c7b69785491708ce0acbb657f4c704229
2017-04-11 09:58:03 -07:00
Janis Danisevskis
1cc38f1e9c Adds default keymaster service to the early_hal class
The keymaster service is required by vold which starts very early
during boot up. This leads to the dependency loop:
init->installkey->vdc->vold->keymaster-service->init

This patch resolves this issue by adding service keymaster to the class
early-hal which will get started right after hwservicemanager on devices
that get treble.

Bug: 35764921
Test: Device boots. And lshal shows that service keymaster has two
      clients, keystore and vold.

Change-Id: Id0b6722de900b5513d46adb81d76b02fa6e155df
2017-04-05 17:22:46 -07:00