Merge "Define otacerts_zip module in soong" into main am: 2fb3964e21

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3160437

Change-Id: I8523694c1a3faefc4bb5b1aee5a096220a068c9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2024-07-04 23:17:22 +00:00
committed by Automerger Merge Worker
4 changed files with 168 additions and 3 deletions

View File

@@ -1060,6 +1060,22 @@ func (c *config) DefaultAppCertificate(ctx PathContext) (pem, key SourcePath) {
return defaultDir.Join(ctx, "testkey.x509.pem"), defaultDir.Join(ctx, "testkey.pk8")
}
func (c *config) ExtraOtaKeys(ctx PathContext, recovery bool) []SourcePath {
var otaKeys []string
if recovery {
otaKeys = c.productVariables.ExtraOtaRecoveryKeys
} else {
otaKeys = c.productVariables.ExtraOtaKeys
}
otaPaths := make([]SourcePath, len(otaKeys))
for i, key := range otaKeys {
otaPaths[i] = PathForSource(ctx, key+".x509.pem")
}
return otaPaths
}
func (c *config) BuildKeys() string {
defaultCert := String(c.productVariables.DefaultAppCertificate)
if defaultCert == "" || defaultCert == filepath.Join(testKeyDir, "testkey") {