summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-07-01 23:35:26 +0100
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-07-03 00:46:16 +0100
commit4c66ff45e65ba83c734396f472d32da7b1d41d1b (patch)
treee5dfa61a49ef6c41c20f5b146f055082cb61dc13
parent767350772b93c8dad1a438b67ef04ebab9b7cafe (diff)
downloadbuild-4c66ff45e65ba83c734396f472d32da7b1d41d1b.zip
build-4c66ff45e65ba83c734396f472d32da7b1d41d1b.tar.gz
build-4c66ff45e65ba83c734396f472d32da7b1d41d1b.tar.bz2
Sign final packages with a different key if requested
...and throw it into recovery builds as well Change-Id: Ic96d4d49d821cb03d5318e3e9ad93d02fb92573e
-rw-r--r--core/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/Makefile b/core/Makefile
index 44338de..78bc02e 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -313,6 +313,9 @@ endif
# exist with the suffixes ".x509.pem" and ".pk8".
DEFAULT_KEY_CERT_PAIR := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
+ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
+ DEFAULT_KEY_CERT_PAIR := $(OTA_PACKAGE_SIGNING_KEY)
+endif
# Rules that need to be present for the all targets, even
# if they don't do anything.
@@ -687,6 +690,11 @@ INTERNAL_RECOVERY_FILES := $(filter $(TARGET_RECOVERY_OUT)/%, \
# substitute other keys for this one.
OTA_PUBLIC_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
+ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
+ OTA_PUBLIC_KEYS := $(OTA_PACKAGE_SIGNING_KEY).x509.pem
+ PRODUCT_EXTRA_RECOVERY_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
+endif
+
# Generate a file containing the keys that will be read by the
# recovery binary.
RECOVERY_INSTALL_OTA_KEYS := \