Merge "Skip signing key check in some cases"

This commit is contained in:
Treehugger Robot
2021-11-10 00:48:27 +00:00
committed by Gerrit Code Review

View File

@@ -1475,6 +1475,11 @@ def main(argv):
"build/make/target/product/security/testkey") "build/make/target/product/security/testkey")
# Get signing keys # Get signing keys
OPTIONS.key_passwords = common.GetKeyPasswords([OPTIONS.package_key]) OPTIONS.key_passwords = common.GetKeyPasswords([OPTIONS.package_key])
# Only check for existence of key file if using the default signer.
# Because the custom signer might not need the key file AT all.
# b/191704641
if not OPTIONS.signapk_path:
private_key_path = OPTIONS.package_key + OPTIONS.private_key_suffix private_key_path = OPTIONS.package_key + OPTIONS.private_key_suffix
if not os.path.exists(private_key_path): if not os.path.exists(private_key_path):
raise common.ExternalError( raise common.ExternalError(
@@ -1533,8 +1538,5 @@ if __name__ == '__main__':
try: try:
common.CloseInheritedPipes() common.CloseInheritedPipes()
main(sys.argv[1:]) main(sys.argv[1:])
except common.ExternalError:
logger.exception("\n ERROR:\n")
sys.exit(1)
finally: finally:
common.Cleanup() common.Cleanup()