Commit graph

89 commits

Author SHA1 Message Date
Shawn Willden
cb6c717104 Merge "Don't send more than 2K to addRngEntropy" into oc-dev am: 7eeb6b5079
am: 35e1be70b4

Change-Id: I626faecd254e3e543308143cfe69d1393e1f9267
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
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
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
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
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
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
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
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
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
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