Commit 1b0265d9 authored by Łukasz Nowak's avatar Łukasz Nowak

Parse certificates which are transmitted as text.

parent 30f98a9d
...@@ -77,8 +77,13 @@ class Download(object): ...@@ -77,8 +77,13 @@ class Download(object):
self.upload_dir_url = options.get('__networkcache__upload-dir-url') self.upload_dir_url = options.get('__networkcache__upload-dir-url')
self.upload_cache_url = options.get( self.upload_cache_url = options.get(
'__networkcache__upload-cache-url') '__networkcache__upload-cache-url')
self.signature_certificate_list = options.get( signature_certificate_list = options.get(
'__networkcache__signature-certificate-list') '__networkcache__signature-certificate-list', '')
# parse signature list
cert_marker = '-----BEGIN CERTIFICATE-----'
self.signature_certificate_list = [cert_marker + '\n' + q.strip() \
for q in signature_certificate_list.split(cert_marker) \
if q.strip()]
self.signature_private_key_file = options.get( self.signature_private_key_file = options.get(
'__networkcache__signature-private-key-file') '__networkcache__signature-private-key-file')
......
...@@ -96,7 +96,13 @@ class Eggs(object): ...@@ -96,7 +96,13 @@ class Eggs(object):
('__networkcache__signature-private-key-file', 'signature_private_key_file'), ('__networkcache__signature-private-key-file', 'signature_private_key_file'),
('__networkcache__signature-certificate-list', 'signature_certificate_list')): ('__networkcache__signature-certificate-list', 'signature_certificate_list')):
if option_key in b_options: if option_key in b_options:
kw[kw_key] = b_options[option_key] if option_key == '__networkcache__signature-certificate-list':
cert_marker = '-----BEGIN CERTIFICATE-----'
kw[kw_key] = [cert_marker + '\n' + q.strip() \
for q in b_options[option_key].split(cert_marker) if
q.strip()]
else:
kw[kw_key] = b_options[option_key]
ws = zc.buildout.easy_install.install( ws = zc.buildout.easy_install.install(
distributions, options['eggs-directory'], distributions, options['eggs-directory'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment