Merge "releasetools: Fix the payload public key replacement."
This commit is contained in:
commit
8a09095c34
1 changed files with 7 additions and 3 deletions
|
@ -502,10 +502,14 @@ def ReplaceOtaKeys(input_tf_zip, output_tf_zip, misc_info):
|
||||||
" as payload verification key.\n\n")
|
" as payload verification key.\n\n")
|
||||||
|
|
||||||
print "Using %s for payload verification." % (mapped_keys[0],)
|
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,
|
output_tf_zip,
|
||||||
mapped_keys[0],
|
"SYSTEM/etc/update_engine/update-payload-key.pub.pem",
|
||||||
arcname="SYSTEM/etc/update_engine/update-payload-key.pub.pem")
|
pubkey)
|
||||||
|
|
||||||
return new_recovery_keys
|
return new_recovery_keys
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue