Support certs in fetcher
This commit is contained in:
@@ -22,6 +22,10 @@ parser.add_argument(
|
||||
dest='chroot_path',
|
||||
action='store',
|
||||
required=True)
|
||||
parser.add_argument(
|
||||
'--https-ca-cert',
|
||||
dest='https_ca_cert',
|
||||
action='store')
|
||||
parser.add_argument(
|
||||
'--max-images',
|
||||
dest='max_images',
|
||||
@@ -60,6 +64,12 @@ def main():
|
||||
FLAGS.ca_cert,
|
||||
os.path.join(FLAGS.chroot_path, 'icon', 'config', 'ca.image.cert.pem'))
|
||||
|
||||
if FLAGS.https_ca_cert:
|
||||
shutil.copyfile(
|
||||
FLAGS.https_ca_cert,
|
||||
os.path.join(FLAGS.chroot_path, 'icon', 'config', 'ca.www.cert.pem'))
|
||||
|
||||
|
||||
path = os.path.join(FLAGS.chroot_path, 'icon', 'config', 'fetcher.flags')
|
||||
with open(path, 'w') as fh:
|
||||
fh.write('--base-url=%(base_url)s --max-images=%(max_images)d\n' % {
|
||||
|
||||
Reference in New Issue
Block a user