diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-21 00:38:10 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-21 02:29:21 +0200 |
commit | 20d04d6938a104124ac06271f17978a290cccf6c (patch) | |
tree | 59f5510e7a423fde2f99b35aa783920d717783ed /onlineupdate/source | |
parent | 3964bfa04f5aa09a9199225a8763cdec74d92ee3 (diff) |
take the certifcate info from the update config
Change-Id: I15856f21d19b45ec50bd3d63d2e526c9e8db450d
Diffstat (limited to 'onlineupdate/source')
-rwxr-xr-x | onlineupdate/source/update/updater/gen_cert_header.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/onlineupdate/source/update/updater/gen_cert_header.py b/onlineupdate/source/update/updater/gen_cert_header.py index 5b70758db3f2..8fedcd9bcf62 100755 --- a/onlineupdate/source/update/updater/gen_cert_header.py +++ b/onlineupdate/source/update/updater/gen_cert_header.py @@ -2,6 +2,7 @@ import sys import binascii +import configparser def file_byte_generator(filename): with open(filename, "rb") as f: @@ -17,6 +18,8 @@ def create_header(array_name, in_filename): if __name__ == '__main__': if len(sys.argv) < 3: - print('ERROR: usage: gen_cert_header.py array_name in_filename') + print('ERROR: usage: gen_cert_header.py array_name update_config_file') sys.exit(1); - sys.exit(create_header(sys.argv[1], sys.argv[2])) + config = configparser.ConfigParser() + config.read(sys.argv[2]) + sys.exit(create_header(sys.argv[1], config['Updater']['certificate-der'])) |