Commit graph

24 commits

Author SHA1 Message Date
Ashwini Oruganti
e575157366 Remove the cert for GooglePermissionController
We no longer need to specify seinfo for privapps when defining rules in
seapp_contexts. And so, we also no longer need to have the key here.

Bug: 142672293
Test: Happy builds.
Change-Id: I0d67844db5a59c445f76e2aef0a13446e486a193
2019-10-31 14:12:08 -07:00
Ashwini Oruganti
33175af3f3 Add keys for GooglePermissionController
Bug: 142672293
Test: Builds are no longer complaining about missing key file
Change-Id: I9bdeca0225c9218695ce4f4b2dfd5e9cba2b37f4
2019-10-28 14:06:48 -07:00
Tianjie Xu
2df23d7f41 Stop creating update_engine_payload_key
Now the update_engine is able to read public keysfrom otacerts directly.
So the update_engine_payload_key is no longer needed.

Also remove the key replace in sign_target_files_apks.py. So we should
not use the new script to sign the old target files.

Bug: 116660991
Test: build the system image, unit tests pass
Change-Id: I9dae1f8b397f2b5efafed66a8faac1cb9087c741
2019-10-16 18:27:22 +00:00
Tao Bao
c99819311c Also install verity_key to ramdisk for non-system-as-root target.
The commit in d14b895665
(https://android-review.googlesource.com/c/platform/build/+/728287)
changed partition layout, to always build the root dir into system.img,
even for devices not using system-as-root (i.e. the ones with separate
boot ramdisk).

With the new layout, there will be two root dirs for non-system-as-root
targets during the boot. If such a device uses Verified Boot 1.0,
/verity_key needs to be available in both roots, to establish the chain
of trust.
 - bootloader uses the baked-in key to verify boot.img; it then loads
   the ramdisk from the verified boot.img
 - First stage init uses /verity_key (in ramdisk) to verify and mount
   system.img at /system, then chroot's to it
 - Second stage init uses /verity_key (in system.img) to verify and
   mount other partitions

This CL adds rules to additionally install verity_key into ramdisk for
such targets.

Bug: 139770257
Test: Set up a target to use non-system-as-root
      (BOARD_BUILD_SYSTEM_ROOT_IMAGE != true). `m dist`.
Test: Check that both ROOT/verity_key and BOOT/RAMDISK/verity_key exist
      in the built target_files.zip.
Test: Run validate_target_files to validate the above target_files.zip.
      $ validate_target_files \
          --verity_key_mincrypt /path/to/verity_key \
          target_files.zip
Test: Run sign_target_files_apks to sign the above target. Re-run
      validate_target_files on the signed target_files.zip.
Test: python -m unittest test_validate_target_files
Change-Id: Ibe7e771c8c376429add85851ac86055564765d3c
2019-09-17 08:53:16 -07:00
Sasha Smundak
f222dfbb0c Provide android_app_certificate module that always points to AOSP
certificate.

See the comment in cts/tests/tests/carrierapi/Android.bp

Bug: 122332514
Test: atest CtsCarrierApiTestCases
(same failures as baseline)
Change-Id: I80b9a1e466a3556486d05befe60d3522e6980ef5
2019-05-02 22:22:47 -07:00
Tao Bao
0733fbeaf8 Move update-payload-key.pub.pem into a module.
This allows update_engine listing the file as a required module,
regardless of the value in AB_OTA_UPDATER.

Bug: 130516531
Test: Build aosp_arm64-userdebug w/o setting AB_OTA_UPDATER. Check that
      /system/etc/update_engine/update-payload-key.pub.pem is available.
Change-Id: Ied041aca750e7260402ae8dbf65ff740d0b87205
2019-04-21 18:25:24 -07:00
Tao Bao
6f34013ba6 Build otacerts as a module.
Bug: 30414428
Test: `m -j dist` with aosp_taimen-userdebug. Check
      /system/etc/security/otacerts.zip available under system and
      recovery images.
Change-Id: I5abeb2da441fb3e3231e094063c2383eb3807852
Merged-In: I5abeb2da441fb3e3231e094063c2383eb3807852
2019-04-21 14:24:43 -07:00
Dan Willemsen
0ab1be6fe2 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: Idf89b2e6a0b777adbfb6370ea34f35faee6d4965
2019-04-09 21:35:37 -07:00
Remi NGUYEN VAN
fc35e5aaa5 Merge "Add test keys for networkstack" 2019-02-15 04:11:07 +00:00
Jiyong Park
2237d06a78 Revert "Add APK container signing key/cert pairs for APEXes"
This reverts commit 74f27716f3.

The key/cert pairs for APEXes are moved to the same directory where the
APEXes are defined.

Test: Check this for all APEXes
jarsigner -verify -verbose -certs out/target/product/blueline/system/apex/com.android.tzdata.apex shows
...
X.509, CN=com.android.tzdata, OU=Android, O=Android, L=Mountain View, ST=California, C=US

Change-Id: I8d867b434b93aa68cbc707fa20ed8dbd4cef755e
2019-02-15 00:39:47 +09:00
Remi NGUYEN VAN
333c98517b Add test keys for networkstack
The networkstack is using shared test keys for NetworkStack.apk,
CaptivePortalLogin.apk and NetworkStackPermissionStub.apk.

This allows NetworkStackPermissionStub.apk to define signature
permissions without the platform certificate, and enforce that the other
packages match the signature to use the permissions if they are
installed.

Bug: 124033493
Test: m
Change-Id: I7257a472d702e82acdadffc4e0535c63a8bd591d
2019-02-13 00:57:41 +09:00
Jiyong Park
74f27716f3 Add APK container signing key/cert pairs for APEXes
Created via
openssl req -x509 -newkey rsa:4096 -nodes -days 999999 -keyout key.pem -out com.android.tzdata.x509.pem
openssl pkcs8 -topk8 -inform PEM -outform DER -in key.pem -out com.android.tzdata.pk8 -nocrypt

Test: m com.android.tzdata
jarsigner -verify -verbose -certs out/target/product/blueline/system/apex/com.android.tzdata.apex shows
...
X.509, CN=com.android.tzdata, OU=Android, O=Android, L=Mountain View, ST=California, C=US

Change-Id: I19f6efaaa6468e65e9891e4e61704fb48f0b986a
2019-01-26 02:19:58 +09:00
Jiyong Park
90418404d4 Remove apex_debug_key
Remove apex_debug_key, in favor of apex.test.key which is under
/system/apex and is built with soong.

Bug: 118213152
Test: /system/etc/security/apex/testkey exists
Change-Id: Iaa0facea2d26cadd48783778e8915bc3c560de10
2018-11-02 14:36:08 +09:00
Martijn Coenen
3508ef69fc Add keys for APEX images for eng/userdebug.
These keys will be used to sign and verify APEX modules on
eng/userdebug devices. The keys may still change, but are
added now to unblock apexd development.

The keys were generated as follows:

$ openssl genrsa -out apex_debug_key.pem 4096
$ avbtool extract_public_key --key apex_debug_key.pem --output apex_debug_key

We'll probably need PRODUCT_APEX_KEYS at some point, but we'll wait
with that until we have build support.

Bug: 112684055
Test: /system/etc/security/apex/apex_debug_key found on-device
Change-Id: I5f4b1cb1eb11be6431146aa4297b50205fbc382e
2018-09-20 06:48:51 +00:00
Dan Willemsen
0bd793815e Add PRODUCT_ADB_KEYS
This easily allow products to add custom adb keys for debuggable builds.
To use, provide a public key created by `adb keygen` to
PRODUCT_ADB_KEYS.

This way automated test farms don't need manual intervention to
authenticate to the device over adb, but we don't disable security for
everyone else.

Add an inherit-product-if-exists hook to aosp_* targets so that our
build servers can add a key for our test farms.

Bug: 32891559
Test: lunch aosp_marlin-userdebug; m bootimage
Test: lunch aosp_marlin-user; m bootimage
Change-Id: I1720644d89ec5289fbe99f95ebcdfbb3f3b20e67
2017-11-03 15:57:38 -07:00
Colin Cross
6cdc5d20f3 Update references to build/core to build/make/core
sed -i -e 's"\([^/]\)build/core"\1build/make/core"g' $(git grep -l build/core)

Test: m checkbuild
Change-Id: Idf3a2fed79aee5d2c07bd8e42f0c0660f253ddc2
2017-10-20 12:49:28 -07:00
Kevin Cernekee
ed1710eb7b README: Update docs
Add a pointer to the online signing document and delete some redundant
information.  Update the "embedding" section and add more background info
on what it is used for.  Eliminate references to $BUILD_SECURE which no
longer exists.

Change-Id: I6d971849cc21697de9cf4fd891423f331f083830
Signed-off-by: Kevin Cernekee <cernekee@google.com>
2015-05-15 14:37:33 -07:00
Sami Tolvanen
8d212ea873 DO NOT MERGE: Change verity key formats
Change boot, recovery, and verity metadata signing keys to use the
same PKCS8 / X.509 PEM format as the other signing keys, and update
build scripts to use correct arguments for the updated signing
tools.

Bug: 15984840
Bug: 18120110
Change-Id: I23ed5a004ecdad6cf7696487935ad5031eb8adf8
(cherry picked from commit 72d90eb189)
2014-11-13 23:23:31 +00:00
Geremy Condra
7afae2c115 Add verity dev keys to build.
These will be used when making images from your dev machine.

Change-Id: Ib1c894f6874a8e1a7d3d6e8133c8e897d40080d4
2014-04-02 18:17:39 -07:00
Geremy Condra
fd6f7513f8 Add support for verity builds to the build system.
Change-Id: I3ef908d8d52ec88de453b161bbc3f198517a72f1
2013-11-17 16:09:34 -08:00
Doug Zongker
9b3c88e19f remove mkkey.sh from build
Update README with instructions on using the new make_key script
instead.
2009-12-01 12:42:30 -08:00
The Android Open Source Project
88b607994a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
05806d7af6 auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
b6c1cf6de7 Initial Contribution 2008-10-21 07:00:00 -07:00