mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
f3e672fb18
PRODUCT_OTA_PUBLIC_KEYS is meant to be set by a vendor tree, something we don't use. Override it at the source and set it explicitely as well. This ensures that the compiled recovery.img and the one generated by sign_target_files_apks.py includes the real public keys for verification. 11.0 signing is ignored. This will need to be extensively tested as breakage can mean brick on locked devices. Although in failure cases it seems test-keys are accepted. -- After much testing there appears to be a deeper issue with how keys are inserted into the recovery and handled
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
From e09adb8a973f11208058c4c74aa32b9899b1d6df Mon Sep 17 00:00:00 2001
|
|
From: Tad <tad@spotco.us>
|
|
Date: Mon, 5 Apr 2021 22:53:31 -0400
|
|
Subject: [PATCH] Allow setting OTA public keys from environment variable
|
|
|
|
Change-Id: Ic8076ff80fbf39c47e20a2fbfda4a6d8592d431b
|
|
---
|
|
core/product_config.mk | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/core/product_config.mk b/core/product_config.mk
|
|
index a16af05cf..4849d5009 100644
|
|
--- a/core/product_config.mk
|
|
+++ b/core/product_config.mk
|
|
@@ -283,6 +283,11 @@ ENFORCE_SYSTEM_CERTIFICATE_ALLOW_LIST := $(PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_R
|
|
PRODUCT_OTA_PUBLIC_KEYS := $(sort $(PRODUCT_OTA_PUBLIC_KEYS))
|
|
PRODUCT_EXTRA_RECOVERY_KEYS := $(sort $(PRODUCT_EXTRA_RECOVERY_KEYS))
|
|
|
|
+ifneq ($(OTA_KEY_OVERRIDE_DIR),)
|
|
+ PRODUCT_OTA_PUBLIC_KEYS := $(OTA_KEY_OVERRIDE_DIR)/releasekey.x509.pem
|
|
+ PRODUCT_EXTRA_RECOVERY_KEYS := $(OTA_KEY_OVERRIDE_DIR)/extra
|
|
+endif
|
|
+
|
|
# Resolve and setup per-module dex-preopt configs.
|
|
DEXPREOPT_DISABLED_MODULES :=
|
|
# If a module has multiple setups, the first takes precedence.
|
|
--
|
|
2.30.2
|
|
|