Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13b6962e authored by Tao Bao's avatar Tao Bao
Browse files

releasetools: Fix the payload public key replacement.

update_engine expects the extracted public key instead of the
certificate.

Bug: 28701652
Change-Id: I292d39da9e039f96d01a4214226aeb46f8cb881d
(cherry picked from commit afaf295c)
parent c78147c6
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -502,10 +502,14 @@ def ReplaceOtaKeys(input_tf_zip, output_tf_zip, misc_info):
            " as payload verification key.\n\n")

    print "Using %s for payload verification." % (mapped_keys[0],)
    common.ZipWrite(
    cmd = common.Run(
        ["openssl", "x509", "-pubkey", "-noout", "-in", mapped_keys[0]],
        stdout=subprocess.PIPE)
    pubkey, _ = cmd.communicate()
    common.ZipWriteStr(
        output_tf_zip,
        mapped_keys[0],
        arcname="SYSTEM/etc/update_engine/update-payload-key.pub.pem")
        "SYSTEM/etc/update_engine/update-payload-key.pub.pem",
        pubkey)

  return new_recovery_keys